Skip to content

Commit

Permalink
jakartaee#188: Remove deprecated jakarta.xml.bind.Validator
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Jun 16, 2021
1 parent f2897d7 commit fb072c4
Show file tree
Hide file tree
Showing 31 changed files with 52 additions and 571 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -51,10 +51,6 @@ public Marshaller createMarshaller() throws JAXBException {
return null;
}

@Override
public Validator createValidator() throws JAXBException {
return null;
}
}

@Test
Expand Down
8 changes: 1 addition & 7 deletions jaxb-api-test/src/test/java/jaxb/factory/legacy/Valid.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -14,7 +14,6 @@
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.Validator;
import java.util.Map;

/**
Expand Down Expand Up @@ -43,10 +42,5 @@ public Unmarshaller createUnmarshaller() throws JAXBException {
public Marshaller createMarshaller() throws JAXBException {
return null;
}

@Override
public Validator createValidator() throws JAXBException {
return null;
}
}
}
8 changes: 1 addition & 7 deletions jaxb-api-test/src/test/java/jaxb/factory/legacy/Valid2.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -14,7 +14,6 @@
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.Validator;
import java.util.Map;

/**
Expand Down Expand Up @@ -44,10 +43,5 @@ public Unmarshaller createUnmarshaller() throws JAXBException {
public Marshaller createMarshaller() throws JAXBException {
return null;
}

@Override
public Validator createValidator() throws JAXBException {
return null;
}
}
}
8 changes: 1 addition & 7 deletions jaxb-api-test/src/test/java/jaxb/factory/legacy/Valid3.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -14,7 +14,6 @@
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.Validator;
import java.util.Map;

/**
Expand Down Expand Up @@ -44,10 +43,5 @@ public Unmarshaller createUnmarshaller() throws JAXBException {
public Marshaller createMarshaller() throws JAXBException {
return null;
}

@Override
public Validator createValidator() throws JAXBException {
return null;
}
}
}
8 changes: 1 addition & 7 deletions jaxb-api-test/src/test/java/jaxb/factory/spi/Valid.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,7 +15,6 @@
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.Validator;
import java.util.Map;

/**
Expand Down Expand Up @@ -43,11 +42,6 @@ public Unmarshaller createUnmarshaller() throws JAXBException {
public Marshaller createMarshaller() throws JAXBException {
return null;
}

@Override
public Validator createValidator() throws JAXBException {
return null;
}
}

}
8 changes: 1 addition & 7 deletions jaxb-api-test/src/test/java/jaxb/factory/spi/Valid2.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,7 +15,6 @@
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.Validator;
import java.util.Map;

/**
Expand Down Expand Up @@ -43,11 +42,6 @@ public Unmarshaller createUnmarshaller() throws JAXBException {
public Marshaller createMarshaller() throws JAXBException {
return null;
}

@Override
public Validator createValidator() throws JAXBException {
return null;
}
}

}
7 changes: 1 addition & 6 deletions jaxb-api-test/src/test/java/jaxb/factory/spi/Valid3.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,7 +15,6 @@
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.Validator;
import java.util.Map;

/**
Expand Down Expand Up @@ -44,10 +43,6 @@ public Marshaller createMarshaller() throws JAXBException {
return null;
}

@Override
public Validator createValidator() throws JAXBException {
return null;
}
}

}
26 changes: 2 additions & 24 deletions jaxb-api/src/main/java/jakarta/xml/bind/JAXBContext.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -159,14 +159,8 @@
*
* <h3>Validation</h3>
* <p>
* Validation has been changed significantly since JAXB 1.0. The {@link Validator}
* class has been deprecated and made optional. This means that you are advised
* not to use this class and, in fact, it may not even be available depending on
* your Jakarta XML Binding provider. JAXB 1.0 client applications that rely on {@code Validator}
* will still work properly when deployed with the JAXB 1.0 runtime system.
*
* In Jakarta XML Binding, the {@link Unmarshaller} has included convenience methods that expose
* the JAXP 1.3 {@link javax.xml.validation} framework. Please refer to the
* the JAXP {@link javax.xml.validation} framework. Please refer to the
* {@link Unmarshaller#setSchema(javax.xml.validation.Schema)} API for more
* information.
*
Expand Down Expand Up @@ -715,22 +709,6 @@ public static JAXBContext newInstance( Class<?>[] classesToBeBound, Map<String,?
public abstract Marshaller createMarshaller() throws JAXBException;


/**
* {@link Validator} has been made optional and deprecated in Jakarta XML Binding. Please
* refer to the javadoc for {@link Validator} for more detail.
* <p>
* Create a {@code Validator} object that can be used to validate a
* java content tree against its source schema.
*
* @return a {@code Validator} object
*
* @throws JAXBException if an error was encountered while creating the
* {@code Validator} object
* @deprecated since JAXB2.0
*/
@Deprecated
public abstract Validator createValidator() throws JAXBException;

/**
* Creates a {@code Binder} object that can be used for
* associative/in-place unmarshalling/marshalling.
Expand Down
7 changes: 3 additions & 4 deletions jaxb-api/src/main/java/jakarta/xml/bind/Marshaller.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -294,7 +294,6 @@
*
* @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
* @see JAXBContext
* @see Validator
* @see Unmarshaller
* @since 1.6, JAXB 1.0
*/
Expand Down Expand Up @@ -701,7 +700,7 @@ public ValidationEventHandler getEventHandler()
AttachmentMarshaller getAttachmentMarshaller();

/**
* Specify the JAXP 1.3 {@link javax.xml.validation.Schema Schema}
* Specify the JAXP {@link javax.xml.validation.Schema Schema}
* object that should be used to validate subsequent marshal operations
* against. Passing null into this method will disable validation.
*
Expand All @@ -720,7 +719,7 @@ public ValidationEventHandler getEventHandler()
public void setSchema( Schema schema );

/**
* Get the JAXP 1.3 {@link javax.xml.validation.Schema Schema} object
* Get the JAXP {@link javax.xml.validation.Schema Schema} object
* being used to perform marshal-time validation. If there is no
* Schema set on the marshaller, then this method will return null
* indicating that marshal-time validation will not be performed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,7 +15,6 @@
*
*
* @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
* @see Validator
* @see ValidationEventHandler
* @since 1.6, JAXB 1.0
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -18,7 +18,6 @@
*
* @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
* @see JAXBContext
* @see Validator
* @see Unmarshaller
* @since 1.6, JAXB 1.0
*/
Expand Down
Loading

0 comments on commit fb072c4

Please sign in to comment.