compiler warnings, code clean up
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/jaxb-ri/bundles/runtime/src/main/java/module-info.java b/jaxb-ri/bundles/runtime/src/main/java/module-info.java
index fdf4620..1d104d9 100644
--- a/jaxb-ri/bundles/runtime/src/main/java/module-info.java
+++ b/jaxb-ri/bundles/runtime/src/main/java/module-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022 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
@@ -9,7 +9,6 @@
*/
module com.sun.xml.bind {
- requires java.compiler;
requires java.desktop;
requires java.logging;
diff --git a/jaxb-ri/codemodel/codemodel-annotation-compiler/src/main/java/com/sun/codemodel/ac/ACTask.java b/jaxb-ri/codemodel/codemodel-annotation-compiler/src/main/java/com/sun/codemodel/ac/ACTask.java
index 0af76e8..11d9577 100644
--- a/jaxb-ri/codemodel/codemodel-annotation-compiler/src/main/java/com/sun/codemodel/ac/ACTask.java
+++ b/jaxb-ri/codemodel/codemodel-annotation-compiler/src/main/java/com/sun/codemodel/ac/ACTask.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -59,8 +59,6 @@
*/
private final Path classpath;
- private final List<URL> endorsedJars = new ArrayList<>();
-
private final List<Classes> patterns = new ArrayList<>();
/**
@@ -134,6 +132,8 @@
Pattern include;
Pattern exclude;
+ public Classes() {}
+
public void setIncludes(String pattern) {
try {
include = Pattern.compile(convertToRegex(pattern));
@@ -157,10 +157,9 @@
for (int i = 0; i < pattern.length(); i++) {
char c = pattern.charAt(i);
- int j = i;
nc = ' ';
- if ((j + 1) != pattern.length()) {
- nc = pattern.charAt(j + 1);
+ if ((i + 1) != pattern.length()) {
+ nc = pattern.charAt(i + 1);
}
//escape single '.'
if ((c == '.') && (nc != '.')) {
@@ -200,26 +199,6 @@
patterns.add(c);
}
- /**
- * Nested {@code <endorse>} elements.
- */
- public static class Endorse {
-
- URL endorsedJar;
-
- public void setPath(String jar) throws MalformedURLException {
- endorsedJar = new File(jar).toURI().toURL();
- }
- }
-
- /**
- * List of endorsed jars
- * @param e endorsed jar
- */
- public void addConfiguredEndorse(Endorse e) {
- endorsedJars.add(e.endorsedJar);
- }
-
@Override
public void execute() throws BuildException {
userLoader = new AntClassLoader(getProject(), classpath);
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationArrayMember.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationArrayMember.java
index 8243fab..93986a6 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationArrayMember.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationArrayMember.java
@@ -239,7 +239,7 @@
return TypedAnnotationWriter.create(clazz,this);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
@Override
public Collection<JAnnotationUse> annotations() {
// this invocation is invalid if the caller isn't adding annotations into an array
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationUse.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationUse.java
index cd2f003..6aee994 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationUse.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationUse.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -375,8 +375,7 @@
*/
@Deprecated
public JAnnotationUse annotate(Class <? extends Annotation> clazz) {
- JAnnotationUse annotationUse = new JAnnotationUse(owner().ref(clazz));
- return annotationUse;
+ return new JAnnotationUse(owner().ref(clazz));
}
@Override
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JArrayClass.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JArrayClass.java
index fb11ddf..88349f9 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JArrayClass.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JArrayClass.java
@@ -95,11 +95,8 @@
@Override
public boolean equals(Object obj) {
if(!(obj instanceof JArrayClass)) return false;
-
- if( componentType.equals( ((JArrayClass)obj).componentType ) )
- return true;
-
- return false;
+
+ return componentType.equals(((JArrayClass) obj).componentType);
}
@Override
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JBlock.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JBlock.java
index c9c0cb0..124ffd6 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JBlock.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JBlock.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -34,8 +34,8 @@
/**
* Whether or not this block must be braced and indented
*/
- private boolean bracesRequired = true;
- private boolean indentRequired = true;
+ private boolean bracesRequired;
+ private boolean indentRequired;
/**
* Current position.
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JCase.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JCase.java
index b3baa4c..08cf272 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JCase.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -28,7 +28,7 @@
/**
* is this a regular case statement or a default case statement?
*/
- private boolean isDefaultCase = false;
+ private boolean isDefaultCase;
/**
* Construct a case statement
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JCodeModel.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JCodeModel.java
index 1f6d129..bbca727 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JCodeModel.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JCodeModel.java
@@ -21,7 +21,6 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.stream.Collectors;
import com.sun.codemodel.writer.FileCodeWriter;
import com.sun.codemodel.writer.ProgressCodeWriter;
@@ -93,7 +92,7 @@
* If the flag is true, we will consider two classes "Foo" and "foo"
* as a collision.
*/
- protected static final boolean isCaseSensitiveFileSystem = getFileSystemCaseSensitivity();
+ /* package */ static final boolean isCaseSensitiveFileSystem = getFileSystemCaseSensitivity();
private static boolean getFileSystemCaseSensitivity() {
try {
@@ -457,7 +456,6 @@
try {
return JType.parse(this,name);
} catch (IllegalArgumentException e) {
- ;
}
// existing class
@@ -508,10 +506,8 @@
}
node.jClass = new TypeNameParser(node.value).parseTypeName();
if (!node.childs.isEmpty()) {
- List<JClass> args = node.childs.stream().map(n -> n.jClass).collect(Collectors.toList());
- JClass[] argsA = args.toArray(new JClass[0]);
- JClass clazz = node.jClass.narrow(argsA);
- node.jClass = clazz;
+ JClass[] argsA = node.childs.stream().map(n -> n.jClass).toArray(JClass[]::new);
+ node.jClass = node.jClass.narrow(argsA);
}
}
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JConditional.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JConditional.java
index 2e8a8ab..2d05558 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JConditional.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JConditional.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -19,7 +19,7 @@
/**
* JExpression to test to determine branching
*/
- private JExpression test = null;
+ private JExpression test;
/**
* JBlock of statements for "then" clause
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDefinedClass.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDefinedClass.java
index 7a7df2e..bed0618 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDefinedClass.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDefinedClass.java
@@ -39,7 +39,7 @@
implements JDeclaration, JClassContainer, JGenerifiable, JAnnotatable, JDocCommentable {
/** Name of this class. Null if anonymous. */
- private String name = null;
+ private String name;
/** Modifiers for the class declaration */
private JMods mods;
@@ -105,7 +105,7 @@
* If this is a nested class, this is {@link JDefinedClass}.
* If this is an anonymous class, this constructor shouldn't be used.
*/
- private JClassContainer outer = null;
+ private JClassContainer outer;
/** Default value is class or interface
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDocComment.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDocComment.java
index 9ad9b12..0f622e4 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDocComment.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDocComment.java
@@ -114,8 +114,7 @@
* add an xdoclet.
*/
public Map<String,String> addXdoclet(String name) {
- Map<String, String> p = atXdoclets.computeIfAbsent(name, k -> new HashMap<>());
- return p;
+ return atXdoclets.computeIfAbsent(name, k -> new HashMap<>());
}
/**
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JExpr.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JExpr.java
index 55b1fb5..de341cf 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JExpr.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JExpr.java
@@ -158,7 +158,7 @@
}
public static JExpression lit(long n) {
- return new JAtom(Long.toString(n) + "L");
+ return new JAtom(n + "L");
}
public static JExpression lit(float f) {
@@ -176,7 +176,7 @@
}
else
{
- return new JAtom(Float.toString(f) + "F");
+ return new JAtom(f + "F");
}
}
@@ -195,7 +195,7 @@
}
else
{
- return new JAtom(Double.toString(d) + "D");
+ return new JAtom(d + "D");
}
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JFormatter.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JFormatter.java
index 4ceab85..d1752d9 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JFormatter.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JFormatter.java
@@ -169,17 +169,14 @@
if (c1 == ';') return true;
if (c1 == CLOSE_TYPE_ARGS) {
// e.g., "public Foo<Bar> test;"
- if(c2=='(') // but not "new Foo<Bar>()"
- return false;
- return true;
+ // but not "new Foo<Bar>()"
+ return c2 != '(';
}
if ((c1 == ')') && (c2 == '{')) return true;
if ((c1 == ',') || (c1 == '=')) return true;
if (c2 == '=') return true;
if (Character.isDigit(c1)) {
- if ((c2 == '(') || (c2 == ')') || (c2 == ';') || (c2 == ','))
- return false;
- return true;
+ return (c2 != '(') && (c2 != ')') && (c2 != ';') && (c2 != ',');
}
if (Character.isJavaIdentifierPart(c1)) {
switch (c2) {
@@ -205,8 +202,7 @@
}
}
if (Character.isDigit(c2)) {
- if (c1 == '(') return false;
- return true;
+ return c1 != '(';
}
return false;
}
@@ -486,9 +482,7 @@
// inner classes require an import stmt.
// All other pkg local classes do not need an
// import stmt for ref.
- if(clazz.outer()==null) {
- return true; // no need to explicitly import a class into itself
- }
+ return clazz.outer() == null; // no need to explicitly import a class into itself
}
return false;
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JMethod.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JMethod.java
index ad22afb..cf24e1a 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JMethod.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JMethod.java
@@ -32,12 +32,12 @@
/**
* Return type for this method
*/
- private JType type = null;
+ private JType type;
/**
* Name of this method
*/
- private String name = null;
+ private String name;
/**
* List of parameters for this method's declaration
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JMods.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JMods.java
index 47d4d2b..afee727 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JMods.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JMods.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -48,7 +48,7 @@
if ((mods & ~legal) != 0) {
throw new IllegalArgumentException("Illegal modifiers for "
+ what + ": "
- + new JMods(mods).toString());
+ + new JMods(mods));
}
/* ## check for illegal combinations too */
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JType.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JType.java
index 0f3e41f..d08e669 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JType.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JType.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -25,26 +25,28 @@
* Obtains a reference to the primitive type object from a type name.
*/
public static JPrimitiveType parse(JCodeModel codeModel, String typeName) {
- if (typeName.equals("void"))
- return codeModel.VOID;
- else if (typeName.equals("boolean"))
- return codeModel.BOOLEAN;
- else if (typeName.equals("byte"))
- return codeModel.BYTE;
- else if (typeName.equals("short"))
- return codeModel.SHORT;
- else if (typeName.equals("char"))
- return codeModel.CHAR;
- else if (typeName.equals("int"))
- return codeModel.INT;
- else if (typeName.equals("float"))
- return codeModel.FLOAT;
- else if (typeName.equals("long"))
- return codeModel.LONG;
- else if (typeName.equals("double"))
- return codeModel.DOUBLE;
- else
- throw new IllegalArgumentException("Not a primitive type: " + typeName);
+ switch (typeName) {
+ case "void":
+ return codeModel.VOID;
+ case "boolean":
+ return codeModel.BOOLEAN;
+ case "byte":
+ return codeModel.BYTE;
+ case "short":
+ return codeModel.SHORT;
+ case "char":
+ return codeModel.CHAR;
+ case "int":
+ return codeModel.INT;
+ case "float":
+ return codeModel.FLOAT;
+ case "long":
+ return codeModel.LONG;
+ case "double":
+ return codeModel.DOUBLE;
+ default:
+ throw new IllegalArgumentException("Not a primitive type: " + typeName);
+ }
}
/** Gets the owner code model object. */
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/TypedAnnotationWriter.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/TypedAnnotationWriter.java
index abd2fa3..8d75d6b 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/TypedAnnotationWriter.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/TypedAnnotationWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -138,7 +138,7 @@
return proxy;
}
- throw new IllegalArgumentException("Unable to handle this method call "+method.toString());
+ throw new IllegalArgumentException("Unable to handle this method call "+ method);
}
@SuppressWarnings({"unchecked", "rawtypes"})
@@ -205,7 +205,7 @@
/**
* Creates a proxy and returns it.
*/
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings({"unchecked"})
private W createProxy() {
return (W)Proxy.newProxyInstance(
SecureLoader.getClassClassLoader(writerType),new Class<?>[]{writerType},this);
@@ -220,7 +220,7 @@
return (W)new TypedAnnotationWriter(a,w,annotatable.annotate(a)).createProxy();
}
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings({"unchecked"})
private static Class<? extends Annotation> findAnnotationType(Class<?> clazz) {
for( Type t : clazz.getGenericInterfaces()) {
if(t instanceof ParameterizedType) {
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/JStaticJavaFile.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/JStaticJavaFile.java
index d53c00f..f119e00 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/JStaticJavaFile.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/JStaticJavaFile.java
@@ -85,7 +85,7 @@
try (
InputStream is = source.getResourceAsStream();
BufferedReader r = new BufferedReader(new InputStreamReader(is));
- PrintWriter w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(os)));
+ PrintWriter w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(os)))
) {
LineFilter filter = createLineFilter();
String line;
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/package-info.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/package-info.java
index 84374c7..b1c9c97 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/package-info.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -22,8 +22,8 @@
*
* <p>
* You bulid this tree mostly from top-down. So, you first create
- * a new {@link JDefinedClass} from {@link JCodeModel}, then you
- * create a {@link JMethod} from {@link JDefinedClass}, and so on.
+ * a new {@link com.sun.codemodel.JDefinedClass} from {@link com.sun.codemodel.JCodeModel}, then you
+ * create a {@link com.sun.codemodel.JMethod} from {@link com.sun.codemodel.JDefinedClass}, and so on.
*
* <p>
* This design brings the following benefits:
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/util/EncoderFactory.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/util/EncoderFactory.java
index 761f4c4..9c42151 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/util/EncoderFactory.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/util/EncoderFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -30,7 +30,6 @@
Charset cs = Charset.forName(encoding == null
? System.getProperty("file.encoding")
: encoding);
- CharsetEncoder encoder = cs.newEncoder();
- return encoder;
+ return cs.newEncoder();
}
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/util/UnicodeEscapeWriter.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/util/UnicodeEscapeWriter.java
index 642f04a..0f96e22 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/util/UnicodeEscapeWriter.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/util/UnicodeEscapeWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -51,9 +51,7 @@
if(ch>=128) return true;
// control characters
- if( ch<0x20 && " \t\r\n".indexOf(ch)==-1 ) return true;
-
- return false;
+ return ch < 0x20 && " \t\r\n".indexOf(ch) == -1;
}
@Override
diff --git a/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/tests/VarArgsTest.java b/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/tests/VarArgsTest.java
index 2c24cae..e88a360 100644
--- a/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/tests/VarArgsTest.java
+++ b/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/tests/VarArgsTest.java
@@ -10,8 +10,6 @@
package com.sun.codemodel.tests;
-import java.io.IOException;
-
import org.junit.Test;
import com.sun.codemodel.*;
diff --git a/jaxb-ri/core/src/main/java/module-info.java b/jaxb-ri/core/src/main/java/module-info.java
index f48c018..dad4a1e 100644
--- a/jaxb-ri/core/src/main/java/module-info.java
+++ b/jaxb-ri/core/src/main/java/module-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022 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
@@ -17,7 +17,6 @@
module org.glassfish.jaxb.core {
requires transitive jakarta.xml.bind;
requires java.compiler;
- requires java.desktop;
requires java.logging;
requires transitive jakarta.activation;
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/ParameterizedTypeImpl.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/ParameterizedTypeImpl.java
index f755038..4de1c17 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/ParameterizedTypeImpl.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/ParameterizedTypeImpl.java
@@ -15,6 +15,7 @@
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.Arrays;
+import java.util.Objects;
/**
@@ -108,12 +109,8 @@
return
- (ownerType == null ?
- thatOwner == null :
- ownerType.equals(thatOwner)) &&
- (rawType == null ?
- thatRawType == null :
- rawType.equals(thatRawType)) &&
+ (Objects.equals(ownerType, thatOwner)) &&
+ (Objects.equals(rawType, thatRawType)) &&
Arrays.equals(actualTypeArguments, // avoid clone
that.getActualTypeArguments());
} else
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/IllegalAnnotationException.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/IllegalAnnotationException.java
index 3e9cff6..bcb2b2c 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/IllegalAnnotationException.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/IllegalAnnotationException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -31,9 +31,9 @@
/**
* Read-only list of {@link Location}s.
*/
- private final List<List<Location>> pos;
+ private transient final List<List<Location>> pos;
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 407680563506515709L;
public IllegalAnnotationException(String message, Locatable src) {
super(message);
@@ -154,7 +154,7 @@
* together in one string.
*
* <p>
- * Overriding this method (instead of {@link #printStackTrace} allows
+ * Overriding this method (instead of {@link #printStackTrace()} allows
* this crucial detail to show up even when this exception is nested
* inside other exceptions.
*/
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/util/XmlFactory.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/util/XmlFactory.java
index 98f6c83..64d5272 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/util/XmlFactory.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/util/XmlFactory.java
@@ -200,10 +200,10 @@
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA));
}
- } catch (SAXException ignored) {
+ } catch (SAXException se) {
// nothing to do; support depends on version JDK or SAX implementation
if (LOGGER.isLoggable(Level.CONFIG)) {
- LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), ignored);
+ LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), se);
}
}
return sf;
@@ -231,10 +231,10 @@
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD));
}
- } catch (SAXException ignored) {
+ } catch (SAXException se) {
// nothing to do; support depends on version JDK or SAX implementation
if (LOGGER.isLoggable(Level.CONFIG)) {
- LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD), ignored);
+ LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD), se);
}
}
return sf;
diff --git a/jaxb-ri/core/src/test/java/org/glassfish/jaxb/core/unmarshaller/DOMScannerTest.java b/jaxb-ri/core/src/test/java/org/glassfish/jaxb/core/unmarshaller/DOMScannerTest.java
index 2bf005d..82d3785 100644
--- a/jaxb-ri/core/src/test/java/org/glassfish/jaxb/core/unmarshaller/DOMScannerTest.java
+++ b/jaxb-ri/core/src/test/java/org/glassfish/jaxb/core/unmarshaller/DOMScannerTest.java
@@ -29,6 +29,8 @@
import junit.framework.TestCase;
+import static junit.framework.TestCase.assertEquals;
+
public class DOMScannerTest extends TestCase {
public void testParentDefaultNamespace() throws ParserConfigurationException, SAXException, IOException {
@@ -50,7 +52,7 @@
scanner.scan(testElem);
}
- private class MockContentHandler implements ContentHandler {
+ private static class MockContentHandler implements ContentHandler {
private Map<String,String> prefixMapping = new HashMap<>();
@@ -68,54 +70,54 @@
}
@Override
- public void startDocument() throws SAXException {
+ public void startDocument() {
}
@Override
- public void endDocument() throws SAXException {
+ public void endDocument() {
}
@Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ public void startPrefixMapping(String prefix, String uri) {
prefixMapping.put(prefix, uri);
}
@Override
- public void endPrefixMapping(String prefix) throws SAXException {
+ public void endPrefixMapping(String prefix) {
prefixMapping.remove(prefix);
}
@Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
+ public void startElement(String uri, String localName, String qName, Attributes atts) {
if (assertElement != null && assertElement.equals(localName)) {
- assertTrue("Prefix mapping does not match expected mapping", prefixMapping.equals(assertMapping));
+ assertEquals("Prefix mapping does not match expected mapping", prefixMapping, assertMapping);
}
}
@Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
+ public void endElement(String uri, String localName, String qName) {
}
@Override
- public void characters(char[] ch, int start, int length) throws SAXException {
+ public void characters(char[] ch, int start, int length) {
}
@Override
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
+ public void ignorableWhitespace(char[] ch, int start, int length) {
}
@Override
- public void processingInstruction(String target, String data) throws SAXException {
+ public void processingInstruction(String target, String data) {
}
@Override
- public void skippedEntity(String name) throws SAXException {
+ public void skippedEntity(String name) {
}
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/ParseException.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/ParseException.java
index 0658614..4075db8 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/ParseException.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/ParseException.java
@@ -145,7 +145,7 @@
} else {
retval.append("Was expecting one of:").append(eol).append(" ");
}
- retval.append(expected.toString());
+ retval.append(expected);
return retval.toString();
}
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/AnnotationParser.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/AnnotationParser.java
index 76a006d..21dc60b 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/AnnotationParser.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/AnnotationParser.java
@@ -28,7 +28,7 @@
import javax.lang.model.element.TypeElement;
import javax.lang.model.util.ElementFilter;
import jakarta.xml.bind.SchemaOutputResolver;
-import javax.xml.namespace.QName;
+
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/Const.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/Const.java
index b44ee7a..95e16bd 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/Const.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/Const.java
@@ -28,7 +28,7 @@
DEBUG_OPTION("jaxb.debug");
- private String value;
+ private final String value;
Const(String value) {
this.value = value;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/SchemaGenerator.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/SchemaGenerator.java
index 219665b..9ef8fb3 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/SchemaGenerator.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/SchemaGenerator.java
@@ -26,7 +26,7 @@
import javax.tools.Diagnostic;
import javax.tools.StandardLocation;
import jakarta.xml.bind.SchemaOutputResolver;
-import javax.xml.namespace.QName;
+
import javax.xml.transform.Result;
import javax.xml.transform.stream.StreamResult;
import java.io.File;
diff --git a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaAntTaskTestBase.java b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaAntTaskTestBase.java
index 5c21c73..8789073 100644
--- a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaAntTaskTestBase.java
+++ b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaAntTaskTestBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022 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
@@ -51,18 +51,18 @@
}
}
- protected static File copy(File dest, String name, InputStream is) throws FileNotFoundException, IOException {
+ protected static File copy(File dest, String name, InputStream is) throws IOException {
return copy(dest, name, is, null);
}
protected static File copy(File dest, String name, InputStream is, String targetEncoding)
- throws FileNotFoundException, IOException {
+ throws IOException {
File destFile = new File(dest, name);
OutputStream os = new BufferedOutputStream(new FileOutputStream(destFile));
Writer w = targetEncoding != null ?
new OutputStreamWriter(os, targetEncoding) : new OutputStreamWriter(os);
byte[] b = new byte[4096];
- int len = -1;
+ int len;
while ((len = is.read(b)) > 0) {
w.write(new String(b), 0, len);
}
diff --git a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaGeneratorTest.java b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaGeneratorTest.java
index a0cae55..b912262 100644
--- a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaGeneratorTest.java
+++ b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaGeneratorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022 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
@@ -53,10 +53,9 @@
new MockUp<URLClassLoader>() {
@Mock
URL[] getURLs() {
- URL[] urls = {
+ return new URL[]{
cUrl
};
- return urls;
}
};
diff --git a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaTaskTest.java b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaTaskTest.java
index b24ef3a..48a2c69 100644
--- a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaTaskTest.java
+++ b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/SchemaTaskTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022 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
@@ -41,7 +41,7 @@
super.tearDown();
}
- public void testFork() throws FileNotFoundException, IOException {
+ public void testFork() throws IOException {
copy(pkg, "MyTrackingOrder.java", SchemaTaskTest.class.getResourceAsStream("resources/MyTrackingOrder.java_"));
assertEquals(0, AntExecutor.exec(script, "schemagen-fork"));
}
diff --git a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/model/nav/ApNavigatorTest.java b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/model/nav/ApNavigatorTest.java
index 7796314..f6f7145 100644
--- a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/model/nav/ApNavigatorTest.java
+++ b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/model/nav/ApNavigatorTest.java
@@ -15,7 +15,6 @@
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.PrimitiveType;
import javax.lang.model.type.TypeKind;
import mockit.Expectations;
import mockit.Mocked;
diff --git a/jaxb-ri/pom.xml b/jaxb-ri/pom.xml
index 82d611d..db36b8a 100644
--- a/jaxb-ri/pom.xml
+++ b/jaxb-ri/pom.xml
@@ -249,14 +249,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<configuration>
- <doclint>${jdoc.doclint}</doclint>
- <quiet>true</quiet>
- <archive>
- <manifest>
- <addDefaultEntries>false</addDefaultEntries>
- </manifest>
- </archive>
- <notimestamp>true</notimestamp>
<dependencySourceExcludes>
<dependencySourceExclude>com.sun.xml.bind:*</dependencySourceExclude>
<dependencySourceExclude>com.sun.tools.xjc:*</dependencySourceExclude>
@@ -550,6 +542,20 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <doclint>${jdoc.doclint}</doclint>
+ <quiet>true</quiet>
+ <archive>
+ <manifest>
+ <addDefaultEntries>false</addDefaultEntries>
+ </manifest>
+ </archive>
+ <notimestamp>true</notimestamp>
+ </configuration>
+ </plugin>
</plugins>
</build>
diff --git a/jaxb-ri/runtime/impl/src/main/java/module-info.java b/jaxb-ri/runtime/impl/src/main/java/module-info.java
index 9f010b1..27ff2d6 100644
--- a/jaxb-ri/runtime/impl/src/main/java/module-info.java
+++ b/jaxb-ri/runtime/impl/src/main/java/module-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022 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
@@ -14,7 +14,6 @@
*/
module org.glassfish.jaxb.runtime {
requires transitive jakarta.xml.bind;
- requires java.compiler;
requires java.desktop;
requires java.logging;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/AnyTypeAdapter.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/AnyTypeAdapter.java
index f7fd7a6..0080abe 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/AnyTypeAdapter.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/AnyTypeAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -22,6 +22,12 @@
* @since JAXB 2.1
*/
public final class AnyTypeAdapter extends XmlAdapter<Object,Object> {
+
+ /**
+ * Default constructor.
+ */
+ public AnyTypeAdapter() {}
+
/**
* Noop. Just returns the object given as the argument.
*/
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/DatatypeConverterImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/DatatypeConverterImpl.java
index 0c8be4c..3620f10 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/DatatypeConverterImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/DatatypeConverterImpl.java
@@ -703,10 +703,7 @@
if ('0' <= ch && ch <= '9') {
return true;
}
- if (ch == '+' || ch == '-' || ch == '.') {
- return true;
- }
- return false;
+ return ch == '+' || ch == '-' || ch == '.';
}
private static final Map<ClassLoader, DatatypeFactory> DF_CACHE = Collections.synchronizedMap(new WeakHashMap<>());
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/IDResolver.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/IDResolver.java
index e3bb00a..e99ec20 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/IDResolver.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/IDResolver.java
@@ -55,6 +55,11 @@
public abstract class IDResolver {
/**
+ * Default constructor.
+ */
+ protected IDResolver() {}
+
+ /**
* Called when the unmarshalling starts.
*
* <p>
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/ClassResolver.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/ClassResolver.java
index ee719c1..cfc7419 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/ClassResolver.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/ClassResolver.java
@@ -59,6 +59,12 @@
* @since 2.1
*/
public abstract class ClassResolver {
+
+ /**
+ * Default constructor.
+ */
+ protected ClassResolver() {}
+
/**
* JAXB calls this method when it sees an unknown element.
*
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/CompositeStructure.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/CompositeStructure.java
index a0202ca..bfc16ac 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/CompositeStructure.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/CompositeStructure.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -33,4 +33,9 @@
public class CompositeStructure {
public Bridge[] bridges;
public Object[] values;
+
+ /**
+ * Default constructor.
+ */
+ public CompositeStructure() {}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/RawAccessor.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/RawAccessor.java
index 877c4fd..3f96db4 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/RawAccessor.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/RawAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -28,6 +28,11 @@
public abstract class RawAccessor<B,V> {
/**
+ * Default constructor.
+ */
+ protected RawAccessor() {}
+
+ /**
* Gets the value of the property of the given bean object.
*
* @param bean
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/TypeReference.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/TypeReference.java
index f304d28..440484c 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/TypeReference.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/TypeReference.java
@@ -103,9 +103,7 @@
if (!Arrays.equals(annotations, that.annotations)) return false;
if (!tagName.equals(that.tagName)) return false;
- if (!type.equals(that.type)) return false;
-
- return true;
+ return type.equals(that.type);
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/marshaller/NamespacePrefixMapper.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/marshaller/NamespacePrefixMapper.java
index f7f46d0..ff8321e 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/marshaller/NamespacePrefixMapper.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/marshaller/NamespacePrefixMapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -43,6 +43,11 @@
private static final String[] EMPTY_STRING = new String[0];
/**
+ * Default constructor.
+ */
+ protected NamespacePrefixMapper() {}
+
+ /**
* Returns a preferred prefix for the given namespace URI.
*
* This method is intended to be overrided by a derived class.
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/unmarshaller/Messages.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/unmarshaller/Messages.java
index bce8212..5da2698 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/unmarshaller/Messages.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/unmarshaller/Messages.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,8 +18,13 @@
*
* @since JAXB 1.0
*/
-public class Messages
-{
+public final class Messages {
+
+ /**
+ * Default private constructor.
+ */
+ private Messages() {}
+
public static String format( String property ) {
return format( property, null );
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/ContextFactory.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/ContextFactory.java
index 1b7368f..79f753b 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/ContextFactory.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/ContextFactory.java
@@ -30,9 +30,7 @@
import java.util.logging.Level;
/**
- * This class is responsible for producing RI JAXBContext objects. In
- * the RI, this is the class that the jakarta.xml.bind.context.factory
- * property will point to.
+ * This class is responsible for producing RI JAXBContext objects.
*
* <p>
* Used to create JAXBContext objects for v1.0.1 and forward
@@ -43,6 +41,11 @@
public class ContextFactory {
/**
+ * Private constructor.
+ */
+ private ContextFactory() {}
+
+ /**
* The API will invoke this method via reflection
*/
public static JAXBContext createContext(Class[] classes, Map<String,Object> properties ) throws JAXBException {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/AbstractInlineAnnotationReaderImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/AbstractInlineAnnotationReaderImpl.java
index 6232fbb..84604b4 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/AbstractInlineAnnotationReaderImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/AbstractInlineAnnotationReaderImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -30,6 +30,11 @@
private ErrorHandler errorHandler;
+ /**
+ * Default constructor.
+ */
+ protected AbstractInlineAnnotationReaderImpl() {}
+
@Override
public void setErrorHandler(ErrorHandler errorHandler) {
if(errorHandler==null)
@@ -51,10 +56,7 @@
A a2 = setter==null?null:getMethodAnnotation(annotation,setter,srcPos);
if(a1==null) {
- if(a2==null)
- return null;
- else
- return a2;
+ return a2;
} else {
if(a2==null)
return a1;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/LocatableAnnotation.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/LocatableAnnotation.java
index 413cdec..37cb240 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/LocatableAnnotation.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/LocatableAnnotation.java
@@ -32,6 +32,7 @@
* Wraps the annotation into a proxy so that the returned object will also implement
* {@link Locatable}.
*/
+ @SuppressWarnings({"unchecked"})
public static <A extends Annotation> A create( A annotation, Locatable parentSourcePos ) {
if(annotation==null) return null;
Class<? extends Annotation> type = annotation.annotationType();
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/RuntimeInlineAnnotationReader.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/RuntimeInlineAnnotationReader.java
index 3c32308..8ab965a 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/RuntimeInlineAnnotationReader.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/RuntimeInlineAnnotationReader.java
@@ -29,6 +29,11 @@
public final class RuntimeInlineAnnotationReader extends AbstractInlineAnnotationReaderImpl<Type,Class,Field,Method>
implements RuntimeAnnotationReader {
+ /**
+ * Default constructor.
+ */
+ public RuntimeInlineAnnotationReader() {}
+
@Override
public <A extends Annotation> A getFieldAnnotation(Class<A> annotation, Field field, Locatable srcPos) {
return LocatableAnnotation.create(field.getAnnotation(annotation),srcPos);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ClassInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ClassInfoImpl.java
index 574da81..a532612 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ClassInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ClassInfoImpl.java
@@ -517,14 +517,16 @@
/**
* Picks the first non-null argument, or null if all arguments are null.
*/
- private static <T> T pickOne( T... args ) {
+ @SafeVarargs
+ private static <T> T pickOne(T... args ) {
for( T arg : args )
if(arg!=null)
return arg;
return null;
}
- private static <T> List<T> makeSet( T... args ) {
+ @SafeVarargs
+ private static <T> List<T> makeSet(T... args ) {
List<T> l = new FinalArrayList<>();
for( T arg : args )
if(arg!=null) l.add(arg);
@@ -570,6 +572,7 @@
*/
final Class<? extends Annotation>[] members;
+ @SafeVarargs
SecondaryAnnotation(int bitMask, Class<? extends Annotation>... members) {
this.bitMask = bitMask;
this.members = members;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
index d06c6f8..db27484 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
@@ -89,8 +89,9 @@
@Override
- public final Transducer getTransducer() {
- return this;
+ @SuppressWarnings({"unchecked"})
+ public final <V> Transducer<V> getTransducer() {
+ return (Transducer<V>) this;
}
@Override
@@ -111,7 +112,7 @@
* Those built-in types that print to {@link String}.
*/
private static abstract class StringImpl<T> extends RuntimeBuiltinLeafInfoImpl<T> {
- protected StringImpl(Class type, QName... typeNames) {
+ protected StringImpl(Class<T> type, QName... typeNames) {
super(type,typeNames);
}
@@ -133,7 +134,7 @@
* Those built-in types that print to {@link Pcdata}.
*/
private static abstract class PcdataImpl<T> extends RuntimeBuiltinLeafInfoImpl<T> {
- protected PcdataImpl(Class type, QName... typeNames) {
+ protected PcdataImpl(Class<T> type, QName... typeNames) {
super(type,typeNames);
}
@@ -1002,7 +1003,7 @@
if (buf.length() > 0){
throw new jakarta.xml.bind.MarshalException(
Messages.XMLGREGORIANCALENDAR_INVALID.format(type.getLocalPart())
- + buf.toString());
+ + buf);
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeClassInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeClassInfoImpl.java
index 2503e87..c5468cb 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeClassInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeClassInfoImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -123,32 +123,33 @@
}
@Override
- protected ReferencePropertyInfoImpl createReferenceProperty(PropertySeed<Type,Class,Field,Method> seed) {
+ protected ReferencePropertyInfoImpl<Type,Class,Field,Method> createReferenceProperty(PropertySeed<Type,Class,Field,Method> seed) {
return new RuntimeReferencePropertyInfoImpl(this,seed);
}
@Override
- protected AttributePropertyInfoImpl createAttributeProperty(PropertySeed<Type,Class,Field,Method> seed) {
+ protected AttributePropertyInfoImpl<Type,Class,Field,Method> createAttributeProperty(PropertySeed<Type,Class,Field,Method> seed) {
return new RuntimeAttributePropertyInfoImpl(this,seed);
}
@Override
- protected ValuePropertyInfoImpl createValueProperty(PropertySeed<Type,Class,Field,Method> seed) {
+ protected ValuePropertyInfoImpl<Type,Class,Field,Method> createValueProperty(PropertySeed<Type,Class,Field,Method> seed) {
return new RuntimeValuePropertyInfoImpl(this,seed);
}
@Override
- protected ElementPropertyInfoImpl createElementProperty(PropertySeed<Type,Class,Field,Method> seed) {
+ protected ElementPropertyInfoImpl<Type,Class,Field,Method> createElementProperty(PropertySeed<Type,Class,Field,Method> seed) {
return new RuntimeElementPropertyInfoImpl(this,seed);
}
@Override
- protected MapPropertyInfoImpl createMapProperty(PropertySeed<Type,Class,Field,Method> seed) {
+ protected MapPropertyInfoImpl<Type,Class,Field,Method> createMapProperty(PropertySeed<Type,Class,Field,Method> seed) {
return new RuntimeMapPropertyInfoImpl(this,seed);
}
@Override
+ @SuppressWarnings({"unchecked"})
public List<? extends RuntimePropertyInfo> getProperties() {
return (List<? extends RuntimePropertyInfo>)super.getProperties();
}
@@ -168,6 +169,7 @@
private Accessor<?,Map<QName,String>> attributeWildcardAccessor;
@Override
+ @SuppressWarnings({"unchecked"})
public <B> Accessor<B,Map<QName,String>> getAttributeWildcard() {
for( RuntimeClassInfoImpl c=this; c!=null; c=c.getBaseClass() ) {
if(c.attributeWildcard!=null) {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeElementInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeElementInfoImpl.java
index f27789c..9d4b2eb 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeElementInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeElementInfoImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -79,6 +79,7 @@
}
@Override
+ @SuppressWarnings({"unchecked"})
public List<? extends RuntimeNonElement> ref() {
return (List<? extends RuntimeNonElement>)super.ref();
}
@@ -94,7 +95,7 @@
}
@Override
- public Transducer getTransducer() {
+ public <V> Transducer<V> getTransducer() {
return RuntimeModelBuilder.createTransducer(this);
}
}
@@ -110,6 +111,7 @@
}
@Override
+ @SuppressWarnings({"unchecked"})
public Class<? extends JAXBElement> getType() {
//noinspection unchecked
return (Class<? extends JAXBElement>) Utils.REFLECTION_NAVIGATOR.erasure(super.getType());
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeMapPropertyInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeMapPropertyInfoImpl.java
index 0e3230d..6952fd0 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeMapPropertyInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeMapPropertyInfoImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -52,6 +52,7 @@
}
@Override
+ @SuppressWarnings({"unchecked"})
public List<? extends RuntimeTypeInfo> ref() {
return (List<? extends RuntimeTypeInfo>)super.ref();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeModelBuilder.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeModelBuilder.java
index 8bcb2ea..d90bd39 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeModelBuilder.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/RuntimeModelBuilder.java
@@ -67,8 +67,8 @@
}
@Override
- protected RuntimeEnumLeafInfoImpl createEnumLeafInfo(Class clazz, Locatable upstream) {
- return new RuntimeEnumLeafInfoImpl(this,upstream,clazz);
+ protected EnumLeafInfoImpl<Type, Class, Field, Method> createEnumLeafInfo(Class clazz, Locatable upstream) {
+ return new RuntimeEnumLeafInfoImpl<>(this,upstream,clazz);
}
@Override
@@ -104,29 +104,30 @@
*
* TODO: this is not the proper place for this class to be in.
*/
- public static Transducer createTransducer(RuntimeNonElementRef ref) {
- Transducer t = ref.getTarget().getTransducer();
+ @SuppressWarnings({"unchecked"})
+ public static <V> Transducer<V> createTransducer(RuntimeNonElementRef ref) {
+ Transducer<V> t = ref.getTarget().getTransducer();
RuntimePropertyInfo src = ref.getSource();
ID id = src.id();
if(id==ID.IDREF)
- return RuntimeBuiltinLeafInfoImpl.STRING;
+ return (Transducer<V>) RuntimeBuiltinLeafInfoImpl.STRING;
if(id==ID.ID)
- t = new IDTransducerImpl(t);
+ t = new IDTransducerImpl<>(t);
MimeType emt = src.getExpectedMimeType();
if(emt!=null)
- t = new MimeTypedTransducer(t,emt);
+ t = new MimeTypedTransducer<>(t,emt);
if(src.inlineBinaryData())
- t = new InlineBinaryTransducer(t);
+ t = new InlineBinaryTransducer<>(t);
if(src.getSchemaType()!=null) {
if (src.getSchemaType().equals(createXSSimpleType())) {
- return RuntimeBuiltinLeafInfoImpl.STRING;
+ return (Transducer<V>) RuntimeBuiltinLeafInfoImpl.STRING;
}
- t = new SchemaTypeTransducer(t,src.getSchemaType());
+ t = new SchemaTypeTransducer<>(t,src.getSchemaType());
}
return t;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/runtime/RuntimeNonElementRef.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/runtime/RuntimeNonElementRef.java
index 095ec8a..7026ade 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/runtime/RuntimeNonElementRef.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/runtime/RuntimeNonElementRef.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -37,7 +37,7 @@
* If the XML representation of the referenced Java type is just a text,
* return a transducer that converts between the bean and XML.
*/
- Transducer getTransducer();
+ <V> Transducer<V> getTransducer();
// TransducedAccessor should be created
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AnyTypeBeanInfo.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AnyTypeBeanInfo.java
index feabdba..d5f41e0 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AnyTypeBeanInfo.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AnyTypeBeanInfo.java
@@ -135,11 +135,10 @@
if ("xmlns".equals(a.getName())) {
if (element instanceof org.w3c.dom.Element) {
context.declareNamespace(a.getValue(), null, false);
- continue;
} else {
context.force(a.getValue(), "");
- continue;
}
+ continue;
}
String nsUri = a.getNamespaceURI();
if(nsUri!=null && nsUri.length()>0)
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AssociationMap.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AssociationMap.java
index 66715ad..142dce7 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AssociationMap.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AssociationMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -51,6 +51,11 @@
private final Map<Object,Entry<XmlNode>> byPeer = new IdentityHashMap<>();
private final Set<XmlNode> usedNodes = new HashSet<>();
+ /**
+ * Default constructor.
+ */
+ public AssociationMap() {}
+
/** Records the new {@code element <->inner} peer association. */
public void addInner( XmlNode element, Object inner ) {
Entry<XmlNode> e = byElement.get(element);
@@ -81,13 +86,12 @@
if(e!=null) {
if(e.outer!=null)
byPeer.remove(e.outer);
- e.outer = outer;
} else {
e = new Entry<>();
e.element = element;
- e.outer = outer;
}
-
+ e.outer = outer;
+
byElement.put(element,e);
Entry<XmlNode> old = byPeer.put(outer,e);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/BinderImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/BinderImpl.java
index ce79c91..da27327 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/BinderImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/BinderImpl.java
@@ -162,6 +162,7 @@
}
@Override
+ @SuppressWarnings({"unchecked"})
public XmlNode updateXML(Object jaxbObject, XmlNode xmlNode) throws JAXBException {
if(jaxbObject==null || xmlNode==null) throw new IllegalArgumentException();
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/BridgeImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/BridgeImpl.java
index 88edc26..b4ccf15 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/BridgeImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/BridgeImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -92,26 +92,30 @@
m.write(tagName,bi,t, m.createXmlOutput(result),m.createPostInitAction(result));
}
- public @NotNull@Override
- T unmarshal(Unmarshaller _u, XMLStreamReader in) throws JAXBException {
+ @Override
+ @SuppressWarnings({"unchecked"})
+ public @NotNull T unmarshal(Unmarshaller _u, XMLStreamReader in) throws JAXBException {
UnmarshallerImpl u = (UnmarshallerImpl)_u;
return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
}
- public @NotNull@Override
- T unmarshal(Unmarshaller _u, Source in) throws JAXBException {
+ @Override
+ @SuppressWarnings({"unchecked"})
+ public @NotNull T unmarshal(Unmarshaller _u, Source in) throws JAXBException {
UnmarshallerImpl u = (UnmarshallerImpl)_u;
return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
}
- public @NotNull@Override
- T unmarshal(Unmarshaller _u, InputStream in) throws JAXBException {
+ @Override
+ @SuppressWarnings({"unchecked"})
+ public @NotNull T unmarshal(Unmarshaller _u, InputStream in) throws JAXBException {
UnmarshallerImpl u = (UnmarshallerImpl)_u;
return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
}
- public @NotNull@Override
- T unmarshal(Unmarshaller _u, Node n) throws JAXBException {
+ @Override
+ @SuppressWarnings({"unchecked"})
+ public @NotNull T unmarshal(Unmarshaller _u, Node n) throws JAXBException {
UnmarshallerImpl u = (UnmarshallerImpl)_u;
return ((JAXBElement<T>)u.unmarshal0(n,bi)).getValue();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ContentHandlerAdaptor.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ContentHandlerAdaptor.java
index 8869e30..9a805d6 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ContentHandlerAdaptor.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ContentHandlerAdaptor.java
@@ -115,8 +115,7 @@
private String getPrefix(String qname) {
int idx = qname.indexOf(':');
- String prefix = (idx == -1) ? "" : qname.substring(0, idx);
- return prefix;
+ return (idx == -1) ? "" : qname.substring(0, idx);
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Coordinator.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Coordinator.java
index 02434a1..0d78937 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Coordinator.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Coordinator.java
@@ -50,6 +50,10 @@
private final HashMap<Class<? extends XmlAdapter>,XmlAdapter> adapters =
new HashMap<>();
+ /**
+ * Default constructor.
+ */
+ protected Coordinator() {};
public final XmlAdapter putAdapter(Class<? extends XmlAdapter> c, XmlAdapter a) {
if(a==null)
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/IllegalAnnotationsException.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/IllegalAnnotationsException.java
index b1069f8..87f0996 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/IllegalAnnotationsException.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/IllegalAnnotationsException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -30,7 +30,7 @@
* @author Kohsuke Kawaguchi
*/
public class IllegalAnnotationsException extends JAXBException {
- private final List<IllegalAnnotationException> errors;
+ private transient final List<IllegalAnnotationException> errors;
private static final long serialVersionUID = 1L;
@@ -64,6 +64,11 @@
public static class Builder implements ErrorHandler {
private final List<IllegalAnnotationException> list = new ArrayList<>();
+ /**
+ * Default constructor.
+ */
+ public Builder() {}
+
@Override
public void error(IllegalAnnotationException e) {
list.add(e);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/JAXBContextImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/JAXBContextImpl.java
index 03bb093..9374855 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/JAXBContextImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/JAXBContextImpl.java
@@ -788,14 +788,10 @@
});
if (e[0]!=null) {
- IOException x = new IOException(Messages.FAILED_TO_GENERATE_SCHEMA.format());
- x.initCause(e[0]);
- throw x;
+ throw new IOException(Messages.FAILED_TO_GENERATE_SCHEMA.format(), e[0]);
}
if (w[0]!=null) {
- IOException x = new IOException(Messages.ERROR_PROCESSING_SCHEMA.format());
- x.initCause(w[0]);
- throw x;
+ throw new IOException(Messages.ERROR_PROCESSING_SCHEMA.format(), w[0]);
}
}
@@ -1009,7 +1005,7 @@
private Boolean backupWithParentNamespace = null; // null for System property to be used
private int maxErrorsCount;
- public JAXBContextBuilder() {};
+ public JAXBContextBuilder() {}
public JAXBContextBuilder(JAXBContextImpl baseImpl) {
this.supressAccessorWarnings = baseImpl.supressAccessorWarnings;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/JaxBeanInfo.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/JaxBeanInfo.java
index d63bc39..183fb48 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/JaxBeanInfo.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/JaxBeanInfo.java
@@ -411,6 +411,7 @@
* use reflection to determine which of the 4 object lifecycle methods exist on
* the JAXB bound type.
*/
+ @SuppressWarnings({"unchecked"})
protected final void setLifecycleFlags() {
try {
Class<BeanT> jt = jaxbType;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/NameBuilder.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/NameBuilder.java
index b06ff9a..fd5a88a 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/NameBuilder.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/NameBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -36,6 +36,11 @@
private QNameMap<Integer> elementQNameIndexMap = new QNameMap<>();
private QNameMap<Integer> attributeQNameIndexMap = new QNameMap<>();
+ /**
+ * Default constructor.
+ */
+ public NameBuilder() {}
+
public Name createElementName(QName name) {
return createElementName(name.getNamespaceURI(),name.getLocalPart());
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Utils.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Utils.java
index 93c16d9..3a741b6 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Utils.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Utils.java
@@ -39,7 +39,7 @@
static { // we statically initializing REFLECTION_NAVIGATOR property
try {
- final Class refNav = Class.forName("org.glassfish.jaxb.core.v2.model.nav.ReflectionNavigator");
+ final Class<?> refNav = Class.forName("org.glassfish.jaxb.core.v2.model.nav.ReflectionNavigator");
// requires accessClassInPackage privilege
final Method getInstance = AccessController.doPrivileged(
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/FastInfosetStreamWriterOutput.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/FastInfosetStreamWriterOutput.java
index 67bba17..475a355 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/FastInfosetStreamWriterOutput.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/FastInfosetStreamWriterOutput.java
@@ -213,7 +213,7 @@
final VocabularyApplicationData vocabAppData = fiout.getVocabularyApplicationData();
AppData appData = null;
- if (vocabAppData == null || !(vocabAppData instanceof AppData)) {
+ if (!(vocabAppData instanceof AppData)) {
appData = new AppData();
fiout.setVocabularyApplicationData(appData);
} else {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/Pcdata.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/Pcdata.java
index 952a5a6..eb7b368 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/Pcdata.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/Pcdata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -33,6 +33,11 @@
public abstract class Pcdata implements CharSequence {
/**
+ * Default constructor.
+ */
+ protected Pcdata() {}
+
+ /**
* Writes itself to {@link UTF8XmlOutput}.
*
* <p>
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/package-info.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/package-info.java
index d987c11..cdecc0a 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/package-info.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -9,6 +9,6 @@
*/
/**
- * Code that writes well-formed XML ({@link XmlOutput} and its implementations}.
+ * Code that writes well-formed XML ({@link org.glassfish.jaxb.runtime.v2.runtime.output.XmlOutput} and its implementations}.
*/
package org.glassfish.jaxb.runtime.v2.runtime.output;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/PropertyFactory.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/PropertyFactory.java
index 5ec5b70..02f16ff 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/PropertyFactory.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/PropertyFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -131,9 +131,6 @@
// in which case it will still produce PCDATA in this reference.
return false;
- if(!info.getIndividualType().equals(rti.getType()))
- return false;
-
- return true;
+ return info.getIndividualType().equals(rti.getType());
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/SingleElementLeafProperty.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/SingleElementLeafProperty.java
index bc1a4b6..a047e81 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/SingleElementLeafProperty.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/SingleElementLeafProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -79,7 +79,7 @@
try {
obj = acc.getUnadapted(o);
} catch (AccessorException ae) {
- ; // noop
+ // noop
}
Class valueType = acc.getValueType();
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/SingleReferenceNodeProperty.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/SingleReferenceNodeProperty.java
index a8eaf2e..02a95f2 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/SingleReferenceNodeProperty.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/SingleReferenceNodeProperty.java
@@ -31,7 +31,6 @@
import javax.xml.stream.XMLStreamException;
import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
/**
* @author Kohsuke Kawaguchi
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Accessor.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Accessor.java
index 1d3d24e..0c0376b 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Accessor.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Accessor.java
@@ -117,11 +117,13 @@
* This ugly entry point is only used by JAX-WS.
* See {@link JAXBRIContext#getElementPropertyAccessor}
*/
+ @SuppressWarnings({"unchecked"})
public void setUnadapted(BeanT bean, Object value) throws AccessorException {
set(bean, (ValueT) value);
}
@Override
+ @SuppressWarnings({"unchecked"})
public void receive(UnmarshallingContext.State state, Object o) throws SAXException {
try {
set((BeanT) state.getTarget(), (ValueT) o);
@@ -171,6 +173,7 @@
return new AdaptedAccessor<>(targetType, this, adapter);
}
+ @SuppressWarnings({"unchecked"})
public final <T> Accessor<BeanT, T> adapt(Adapter<Type, Class> adapter) {
return new AdaptedAccessor<>(
(Class<T>) Utils.REFLECTION_NAVIGATOR.erasure(adapter.defaultType),
@@ -197,6 +200,7 @@
this(f, false);
}
+ @SuppressWarnings({"unchecked"})
public FieldReflection(Field f, boolean supressAccessorWarnings) {
super((Class<ValueT>) f.getType());
this.f = f;
@@ -221,6 +225,7 @@
}
@Override
+ @SuppressWarnings({"unchecked"})
public ValueT get(BeanT bean) {
try {
return (ValueT) f.get(bean);
@@ -230,6 +235,7 @@
}
@Override
+ @SuppressWarnings({"unchecked"})
public void set(BeanT bean, ValueT value) {
try {
if (value == null)
@@ -278,6 +284,7 @@
private static final Logger logger = org.glassfish.jaxb.core.Utils.getClassLogger();
+ @SuppressWarnings({"unchecked"})
public GetterSetterReflection(Method getter, Method setter) {
super(
(Class<ValueT>) (getter != null ?
@@ -309,6 +316,7 @@
}
@Override
+ @SuppressWarnings({"unchecked"})
public ValueT get(BeanT bean) throws AccessorException {
try {
return (ValueT) getter.invoke(bean);
@@ -320,6 +328,7 @@
}
@Override
+ @SuppressWarnings({"unchecked"})
public void set(BeanT bean, ValueT value) throws AccessorException {
try {
if (value == null)
@@ -423,7 +432,7 @@
/**
* Uninitialized map keyed by their classes.
*/
- private static final Map<Class, Object> uninitializedValues = new HashMap<>();
+ private static final Map<Class<?>, Object> uninitializedValues = new HashMap<>();
static {
/*
@@ -436,14 +445,14 @@
static long default_value_long = 0;
static short default_value_short = 0;
*/
- uninitializedValues.put(byte.class, Byte.valueOf((byte) 0));
+ uninitializedValues.put(byte.class, (byte) 0);
uninitializedValues.put(boolean.class, false);
- uninitializedValues.put(char.class, Character.valueOf((char) 0));
- uninitializedValues.put(float.class, Float.valueOf(0));
- uninitializedValues.put(double.class, Double.valueOf(0));
- uninitializedValues.put(int.class, Integer.valueOf(0));
- uninitializedValues.put(long.class, Long.valueOf(0));
- uninitializedValues.put(short.class, Short.valueOf((short) 0));
+ uninitializedValues.put(char.class, (char) 0);
+ uninitializedValues.put(float.class, (float) 0);
+ uninitializedValues.put(double.class, (double) 0);
+ uninitializedValues.put(int.class, 0);
+ uninitializedValues.put(long.class, 0L);
+ uninitializedValues.put(short.class, (short) 0);
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/DefaultTransducedAccessor.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/DefaultTransducedAccessor.java
index 8b17198..c6c0b8d 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/DefaultTransducedAccessor.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/DefaultTransducedAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -31,6 +31,11 @@
*/
public abstract class DefaultTransducedAccessor<T> extends TransducedAccessor<T> {
+ /**
+ * Default constructor.
+ */
+ protected DefaultTransducedAccessor() {}
+
@Override
public abstract String print(T o) throws AccessorException, SAXException;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Lister.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Lister.java
index 9c2db5f..553a426 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Lister.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Lister.java
@@ -177,7 +177,7 @@
}
@Override
- public Pack startPacking(BeanT current, Accessor<BeanT, ItemT[]> acc) {
+ public Pack<ItemT> startPacking(BeanT current, Accessor<BeanT, ItemT[]> acc) {
return new Pack<>(itemType);
}
@@ -244,9 +244,9 @@
}
@Override
- public org.glassfish.jaxb.runtime.v2.runtime.reflect.ListIterator iterator(T collection, XMLSerializer context) {
- final Iterator itr = collection.iterator();
- return new org.glassfish.jaxb.runtime.v2.runtime.reflect.ListIterator() {
+ public org.glassfish.jaxb.runtime.v2.runtime.reflect.ListIterator<Object> iterator(T collection, XMLSerializer context) {
+ final Iterator<?> itr = collection.iterator();
+ return new org.glassfish.jaxb.runtime.v2.runtime.reflect.ListIterator<Object>() {
@Override
public boolean hasNext() {
return itr.hasNext();
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/TransducedAccessor.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/TransducedAccessor.java
index 211645e..faa7bef 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/TransducedAccessor.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/TransducedAccessor.java
@@ -53,6 +53,11 @@
public abstract class TransducedAccessor<BeanT> {
/**
+ * Default constructor.
+ */
+ protected TransducedAccessor() {}
+
+ /**
* @see Transducer#useNamespace()
*/
public boolean useNamespace() {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Boolean.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Boolean.java
index cf03666..b0209da 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Boolean.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Boolean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * All the FieldAccessors are generated from <code>FieldAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Boolean extends Accessor {
+public class FieldAccessor_Boolean<B> extends Accessor<B, Boolean> {
public FieldAccessor_Boolean() {
super(Boolean.class);
}
@Override
- public Object get(Object bean) {
+ public Boolean get(B bean) {
return ((Bean)bean).f_boolean;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_boolean = value==null ? Const.default_value_boolean : (Boolean)value;
+ public void set(B bean, Boolean value) {
+ ((Bean)bean).f_boolean = value==null ? Const.default_value_boolean : value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Byte.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Byte.java
index 19c33f8..56a080c 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Byte.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Byte.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -16,22 +16,22 @@
* Template {@link Accessor} for byte fields.
*
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * All the FieldAccessors are generated from <code>FieldAccessor_Byte</code>
*
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Byte extends Accessor {
+public class FieldAccessor_Byte<B> extends Accessor<B, Byte> {
public FieldAccessor_Byte() {
super(Byte.class);
}
@Override
- public Object get(Object bean) {
+ public Byte get(B bean) {
return ((Bean)bean).f_byte;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_byte = value==null ? Const.default_value_byte : (Byte)value;
+ public void set(B bean, Byte value) {
+ ((Bean)bean).f_byte = value==null ? Const.default_value_byte : value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Character.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Character.java
index 8ca10f2..fe399cf 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Character.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Character.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * All the FieldAccessors are generated from <code>FieldAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Character extends Accessor {
+public class FieldAccessor_Character<B> extends Accessor<B, Character> {
public FieldAccessor_Character() {
super(Character.class);
}
@Override
- public Object get(Object bean) {
+ public Character get(B bean) {
return ((Bean)bean).f_char;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_char = value==null ? Const.default_value_char : (Character)value;
+ public void set(B bean, Character value) {
+ ((Bean)bean).f_char = value==null ? Const.default_value_char : value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Double.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Double.java
index 44f0d92..7016a03 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Double.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Double.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * All the FieldAccessors are generated from <code>FieldAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Double extends Accessor {
+public class FieldAccessor_Double<B> extends Accessor<B, Double> {
public FieldAccessor_Double() {
super(Double.class);
}
@Override
- public Object get(Object bean) {
+ public Double get(B bean) {
return ((Bean)bean).f_double;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_double = value==null ? Const.default_value_double : (Double)value;
+ public void set(B bean, Double value) {
+ ((Bean)bean).f_double = value==null ? Const.default_value_double : value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Float.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Float.java
index 4fbb14f..9581448 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Float.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Float.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * All the FieldAccessors are generated from <code>FieldAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Float extends Accessor {
+public class FieldAccessor_Float<B> extends Accessor<B, Float> {
public FieldAccessor_Float() {
super(Float.class);
}
@Override
- public Object get(Object bean) {
+ public Float get(B bean) {
return ((Bean)bean).f_float;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_float = value==null ? Const.default_value_float : (Float)value;
+ public void set(B bean, Float value) {
+ ((Bean)bean).f_float = value==null ? Const.default_value_float : value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Integer.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Integer.java
index b8c854d..09e5fb1 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Integer.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Integer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * All the FieldAccessors are generated from <code>FieldAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Integer extends Accessor {
+public class FieldAccessor_Integer<B> extends Accessor<B, Integer> {
public FieldAccessor_Integer() {
super(Integer.class);
}
@Override
- public Object get(Object bean) {
+ public Integer get(B bean) {
return ((Bean)bean).f_int;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_int = value==null ? Const.default_value_int : (Integer)value;
+ public void set(B bean, Integer value) {
+ ((Bean)bean).f_int = value==null ? Const.default_value_int : value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Long.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Long.java
index b01d5da..44c5cb0 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Long.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Long.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * All the FieldAccessors are generated from <code>FieldAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Long extends Accessor {
+public class FieldAccessor_Long<B> extends Accessor<B, Long> {
public FieldAccessor_Long() {
super(Long.class);
}
@Override
- public Object get(Object bean) {
+ public Long get(B bean) {
return ((Bean)bean).f_long;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_long = value==null ? Const.default_value_long : (Long)value;
+ public void set(B bean, Long value) {
+ ((Bean)bean).f_long = value==null ? Const.default_value_long : value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Ref.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Ref.java
index 8beac52..2294f62 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Ref.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Ref.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -17,18 +17,18 @@
*
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Ref extends Accessor {
+public class FieldAccessor_Ref<B> extends Accessor<B, Ref> {
public FieldAccessor_Ref() {
super(Ref.class);
}
@Override
- public Object get(Object bean) {
+ public Ref get(B bean) {
return ((Bean)bean).f_ref;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_ref = (Ref)value;
+ public void set(B bean, Ref value) {
+ ((Bean)bean).f_ref = value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Short.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Short.java
index 984069c..aad4a49 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Short.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/FieldAccessor_Short.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * All the FieldAccessors are generated from <code>FieldAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class FieldAccessor_Short extends Accessor {
+public class FieldAccessor_Short<B> extends Accessor<B, Short> {
public FieldAccessor_Short() {
super(Short.class);
}
@Override
- public Object get(Object bean) {
+ public Short get(B bean) {
return ((Bean)bean).f_short;
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).f_short = value==null ? Const.default_value_short : (Short)value;
+ public void set(B bean, Short value) {
+ ((Bean)bean).f_short = value==null ? Const.default_value_short : value;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/Injector.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/Injector.java
index 20eb961..9b2e2a4 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/Injector.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/Injector.java
@@ -185,7 +185,6 @@
try {
return Class.forName(name);
} catch (ClassNotFoundException e) {
- continue;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Boolean.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Boolean.java
index d776aca..9becb27 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Boolean.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Boolean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * All the MethodAccessors are generated from <code>MethodAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Boolean extends Accessor {
+public class MethodAccessor_Boolean<B> extends Accessor<B, Boolean> {
public MethodAccessor_Boolean() {
super(Boolean.class);
}
@Override
- public Object get(Object bean) {
+ public Boolean get(B bean) {
return ((Bean)bean).get_boolean();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_boolean( value==null ? Const.default_value_boolean : (Boolean)value );
+ public void set(B bean, Boolean value) {
+ ((Bean)bean).set_boolean( value==null ? Const.default_value_boolean : value );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Byte.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Byte.java
index 309453e..9085901 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Byte.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Byte.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -16,22 +16,22 @@
* Template {@link Accessor} for boolean getter/setter.
*
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * All the MethodAccessors are generated from <code>MethodAccessor_Byte</code>
*
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Byte extends Accessor {
+public class MethodAccessor_Byte<B> extends Accessor<B, Byte> {
public MethodAccessor_Byte() {
super(Byte.class);
}
@Override
- public Object get(Object bean) {
+ public Byte get(B bean) {
return ((Bean)bean).get_byte();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_byte( value==null ? Const.default_value_byte : (Byte)value );
+ public void set(B bean, Byte value) {
+ ((Bean)bean).set_byte( value==null ? Const.default_value_byte : value );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Character.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Character.java
index 37e09f1..2c0041f 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Character.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Character.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * All the MethodAccessors are generated from <code>MethodAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Character extends Accessor {
+public class MethodAccessor_Character<B> extends Accessor<B, Character> {
public MethodAccessor_Character() {
super(Character.class);
}
@Override
- public Object get(Object bean) {
+ public Character get(B bean) {
return ((Bean)bean).get_char();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_char( value==null ? Const.default_value_char : (Character)value );
+ public void set(B bean, Character value) {
+ ((Bean)bean).set_char( value==null ? Const.default_value_char : value );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Double.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Double.java
index 2ca4e9f..9c6071d 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Double.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Double.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * All the MethodAccessors are generated from <code>MethodAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Double extends Accessor {
+public class MethodAccessor_Double<B> extends Accessor<B, Double> {
public MethodAccessor_Double() {
super(Double.class);
}
@Override
- public Object get(Object bean) {
+ public Double get(B bean) {
return ((Bean)bean).get_double();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_double( value==null ? Const.default_value_double : (Double)value );
+ public void set(B bean, Double value) {
+ ((Bean)bean).set_double( value==null ? Const.default_value_double : value );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Float.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Float.java
index ad5cd88..54724a1 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Float.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Float.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * All the MethodAccessors are generated from <code>MethodAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Float extends Accessor {
+public class MethodAccessor_Float<B> extends Accessor<B, Float> {
public MethodAccessor_Float() {
super(Float.class);
}
@Override
- public Object get(Object bean) {
+ public Float get(B bean) {
return ((Bean)bean).get_float();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_float( value==null ? Const.default_value_float : (Float)value );
+ public void set(B bean, Float value) {
+ ((Bean)bean).set_float( value==null ? Const.default_value_float : value );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Integer.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Integer.java
index 02d4cb2..77d9143 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Integer.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Integer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * All the MethodAccessors are generated from <code>MethodAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Integer extends Accessor {
+public class MethodAccessor_Integer<B> extends Accessor<B, Integer> {
public MethodAccessor_Integer() {
super(Integer.class);
}
@Override
- public Object get(Object bean) {
+ public Integer get(B bean) {
return ((Bean)bean).get_int();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_int( value==null ? Const.default_value_int : (Integer)value );
+ public void set(B bean, Integer value) {
+ ((Bean)bean).set_int( value==null ? Const.default_value_int : value );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Long.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Long.java
index b4f2cd3..abcc9d7 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Long.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Long.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * All the MethodAccessors are generated from <code>MethodAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Long extends Accessor {
+public class MethodAccessor_Long<B> extends Accessor<B, Long> {
public MethodAccessor_Long() {
super(Long.class);
}
@Override
- public Object get(Object bean) {
+ public Long get(B bean) {
return ((Bean)bean).get_long();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_long( value==null ? Const.default_value_long : (Long)value );
+ public void set(B bean, Long value) {
+ ((Bean)bean).set_long( value==null ? Const.default_value_long : value );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Ref.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Ref.java
index e509618..5e5f83b 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Ref.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Ref.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -17,18 +17,18 @@
*
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Ref extends Accessor {
+public class MethodAccessor_Ref<B> extends Accessor<B, Ref> {
public MethodAccessor_Ref() {
super(Ref.class);
}
@Override
- public Object get(Object bean) {
+ public Ref get(B bean) {
return ((Bean)bean).get_ref();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_ref((Ref)value);
+ public void set(B bean, Ref value) {
+ ((Bean)bean).set_ref(value);
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Short.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Short.java
index 4c4494a..2a43c41 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Short.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/MethodAccessor_Short.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -18,22 +18,22 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * All the MethodAccessors are generated from <code>MethodAccessor_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*/
-public class MethodAccessor_Short extends Accessor {
+public class MethodAccessor_Short<B> extends Accessor<B, Short> {
public MethodAccessor_Short() {
super(Short.class);
}
@Override
- public Object get(Object bean) {
+ public Short get(B bean) {
return ((Bean)bean).get_short();
}
@Override
- public void set(Object bean, Object value) {
- ((Bean)bean).set_short( value==null ? Const.default_value_short : (Short)value );
+ public void set(B bean, Short value) {
+ ((Bean)bean).set_short( value==null ? Const.default_value_short : value );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Boolean.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Boolean.java
index 65c81d3..33e0151 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Boolean.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Boolean.java
@@ -18,21 +18,21 @@
* Template {@link TransducedAccessor} for a boolean field.
*
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
*
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_field_Boolean extends DefaultTransducedAccessor {
+public final class TransducedAccessor_field_Boolean<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printBoolean( ((Bean)o).f_boolean );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
Boolean b = DatatypeConverterImpl._parseBoolean(lexical);
if(b != null)
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Byte.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Byte.java
index 8ba5259..ffcf42e 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Byte.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Byte.java
@@ -18,26 +18,26 @@
* Template {@link TransducedAccessor} for a byte field.
*
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
*
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_field_Byte extends DefaultTransducedAccessor {
+public final class TransducedAccessor_field_Byte<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printByte( ((Bean)o).f_byte );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).f_byte=DatatypeConverterImpl._parseByte(lexical);
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java
index 6d71eee..013fc9e 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java
@@ -20,26 +20,26 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_field_Double extends DefaultTransducedAccessor {
+public final class TransducedAccessor_field_Double<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printDouble( ((Bean)o).f_double );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).f_double=DatatypeConverterImpl._parseDouble(lexical);
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java
index d8ec4ae..4905028 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java
@@ -20,26 +20,26 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_field_Float extends DefaultTransducedAccessor {
+public final class TransducedAccessor_field_Float<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printFloat( ((Bean)o).f_float );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).f_float=DatatypeConverterImpl._parseFloat(lexical);
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Integer.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Integer.java
index 3eab3b9..2a0fba2 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Integer.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Integer.java
@@ -25,31 +25,31 @@
* Template {@link TransducedAccessor} for a byte field.
*
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
*
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_field_Integer extends DefaultTransducedAccessor {
+public final class TransducedAccessor_field_Integer<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printInt( ((Bean)o).f_int );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).f_int=DatatypeConverterImpl._parseInt(lexical);
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
@Override
- public void writeLeafElement(XMLSerializer w, Name tagName, Object o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
+ public void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
w.leafElement(tagName, ((Bean)o).f_int, fieldName );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java
index 39ab021..fc08bd0 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java
@@ -20,26 +20,26 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_field_Long extends DefaultTransducedAccessor {
+public final class TransducedAccessor_field_Long<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printLong( ((Bean)o).f_long );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).f_long=DatatypeConverterImpl._parseLong(lexical);
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java
index e9112af..115305c 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java
@@ -20,26 +20,26 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_field_Short extends DefaultTransducedAccessor {
+public final class TransducedAccessor_field_Short<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printShort( ((Bean)o).f_short );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).f_short=DatatypeConverterImpl._parseShort(lexical);
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java
index 35a36ec..d699dc4 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java
@@ -20,30 +20,30 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_method_Boolean extends DefaultTransducedAccessor {
+public final class TransducedAccessor_method_Boolean<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printBoolean( ((Bean)o).get_boolean() );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).set_boolean(DatatypeConverterImpl._parseBoolean(lexical));
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
+// public void writeLeafElement(T o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
// w.leafElement(tagName, ((Bean)o).get_boolean(), fieldName );
// }
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Byte.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Byte.java
index d97bc9c..51e20ca 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Byte.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Byte.java
@@ -18,30 +18,30 @@
* Template {@link TransducedAccessor} for a byte field.
*
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
*
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_method_Byte extends DefaultTransducedAccessor {
+public final class TransducedAccessor_method_Byte<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printByte( ((Bean)o).get_byte() );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).set_byte(DatatypeConverterImpl._parseByte(lexical));
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
+// public void writeLeafElement(T o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
// w.leafElement(tagName, ((Bean)o).get_byte(), fieldName );
// }
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java
index d06626f..3cf4bb0 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java
@@ -27,23 +27,23 @@
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_method_Double extends DefaultTransducedAccessor {
+public final class TransducedAccessor_method_Double<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printDouble( ((Bean)o).get_double() );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).set_double(DatatypeConverterImpl._parseDouble(lexical));
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
+// public void writeLeafElement(T o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
// w.leafElement(tagName, ((Bean)o).get_double(), fieldName );
// }
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java
index cfdc60b..bf092e9 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java
@@ -20,26 +20,26 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_method_Float extends DefaultTransducedAccessor {
+public final class TransducedAccessor_method_Float <T>extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printFloat( ((Bean)o).get_float() );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).set_float(DatatypeConverterImpl._parseFloat(lexical));
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
//
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Integer.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Integer.java
index 30cfbc0..3e7a74f 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Integer.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Integer.java
@@ -25,31 +25,31 @@
* Template {@link TransducedAccessor} for a byte field.
*
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
*
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_method_Integer extends DefaultTransducedAccessor {
+public final class TransducedAccessor_method_Integer<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printInt( ((Bean)o).get_int() );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).set_int(DatatypeConverterImpl._parseInt(lexical));
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
@Override
- public void writeLeafElement(XMLSerializer w, Name tagName, Object o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
+ public void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
w.leafElement(tagName, ((Bean)o).get_int(), fieldName );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java
index 8fef389..b872ce6 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java
@@ -20,30 +20,30 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_method_Long extends DefaultTransducedAccessor {
+public final class TransducedAccessor_method_Long<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printLong( ((Bean)o).get_long() );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).set_long(DatatypeConverterImpl._parseLong(lexical));
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
+// public void writeLeafElement(T o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
// w.leafElement(tagName, ((Bean)o).get_long(), fieldName );
// }
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java
index 112ed47..5d705d1 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java
@@ -20,30 +20,30 @@
* Auto-generated, do not edit.
* </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_Byte</code>
* </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
*/
@SuppressWarnings({"deprecation"})
-public final class TransducedAccessor_method_Short extends DefaultTransducedAccessor {
+public final class TransducedAccessor_method_Short<T> extends DefaultTransducedAccessor<T> {
@Override
- public String print(Object o) {
+ public String print(T o) {
return DatatypeConverterImpl._printShort( ((Bean)o).get_short() );
}
@Override
- public void parse(Object o, CharSequence lexical) {
+ public void parse(T o, CharSequence lexical) {
((Bean)o).set_short(DatatypeConverterImpl._parseShort(lexical));
}
@Override
- public boolean hasValue(Object o) {
+ public boolean hasValue(T o) {
return true;
}
//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
+// public void writeLeafElement(T o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
// w.leafElement(tagName, ((Bean)o).get_short(), fieldName );
// }
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/AttributesExImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/AttributesExImpl.java
index 5f30476..47a6875 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/AttributesExImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/AttributesExImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -20,6 +20,12 @@
* @author Kohsuke Kawaguchi
*/
public final class AttributesExImpl extends AttributesImpl implements AttributesEx {
+
+ /**
+ * Default constructor.
+ */
+ public AttributesExImpl() {}
+
@Override
public CharSequence getData(int idx) {
return getValue(idx);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/Base64Data.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/Base64Data.java
index 874d5f1..e8fb9cf 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/Base64Data.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/Base64Data.java
@@ -63,6 +63,11 @@
String mimeType;
/**
+ * Default constructor.
+ */
+ public Base64Data() {}
+
+ /**
* Fills in the data object by a portion of the byte[].
*
* @param len
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/IntData.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/IntData.java
index 00f84d8..4851479 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/IntData.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/IntData.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -34,6 +34,11 @@
*/
private int length;
+ /**
+ * Default constructor.
+ */
+ public IntData() {}
+
public void reset(int i) {
this.data = i;
if(i==Integer.MIN_VALUE)
@@ -42,8 +47,8 @@
length = (i < 0) ? stringSizeOfInt(-i) + 1 : stringSizeOfInt(i);
}
- private final static int [] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999,
- 99999999, 999999999, Integer.MAX_VALUE };
+ private final static int [] sizeTable = { 9, 99, 999, 9999, 20229, 999999, 9999999,
+ 99999999, 202299999, Integer.MAX_VALUE };
// Requires positive x
private static int stringSizeOfInt(int x) {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/UnmarshallingContext.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/UnmarshallingContext.java
index 234cdff..36ba2c6 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/UnmarshallingContext.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/UnmarshallingContext.java
@@ -21,7 +21,6 @@
import org.glassfish.jaxb.runtime.v2.runtime.AssociationMap;
import org.glassfish.jaxb.runtime.v2.runtime.Coordinator;
import org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl;
-import org.glassfish.jaxb.runtime.v2.runtime.ElementBeanInfoImpl;
import org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo;
import org.glassfish.jaxb.core.v2.runtime.unmarshaller.LocatorEx;
import jakarta.xml.bind.*;
@@ -34,7 +33,6 @@
import javax.xml.XMLConstants;
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;
import java.util.concurrent.Callable;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/XsiTypeLoader.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/XsiTypeLoader.java
index e7b87d3..2d1297e 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/XsiTypeLoader.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/XsiTypeLoader.java
@@ -12,7 +12,6 @@
import com.sun.istack.Nullable;
import org.glassfish.jaxb.runtime.DatatypeConverterImpl;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/XmlSchemaGenerator.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/XmlSchemaGenerator.java
index ac3f542..146adeb 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/XmlSchemaGenerator.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/XmlSchemaGenerator.java
@@ -376,7 +376,7 @@
if(logger.isLoggable(Level.FINE)) {
// debug logging to see what's going on.
- logger.log(Level.FINE,"Writing XML Schema for "+toString(),new StackRecorder());
+ logger.log(Level.FINE,"Writing XML Schema for "+ this, new StackRecorder());
}
// make it fool-proof
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/QNameMap.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/QNameMap.java
index 802efe3..eb29500 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/QNameMap.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/QNameMap.java
@@ -213,14 +213,15 @@
* number of keys in this map reaches its threshold.
*/
private void resize(int newCapacity) {
- Entry[] oldTable = table;
+ Entry<V>[] oldTable = table;
int oldCapacity = oldTable.length;
if (oldCapacity == MAXIMUM_CAPACITY) {
threshold = Integer.MAX_VALUE;
return;
}
- Entry[] newTable = new Entry[newCapacity];
+ @SuppressWarnings({"unchecked"})
+ Entry<V>[] newTable = (Entry<V>[]) new Entry[newCapacity];
transfer(newTable);
table = newTable;
threshold = newCapacity;
@@ -373,11 +374,10 @@
String k3 = localName;
String k4 = e.localName;
if (k1 == k2 || (k1 != null && k1.equals(k2)) &&
- (k3 == k4 ||(k3 !=null && k3.equals(k4)))) {
+ (Objects.equals(k3, k4))) {
Object v1 = getValue();
Object v2 = e.getValue();
- if (v1 == v2 || (v1 != null && v1.equals(v2)))
- return true;
+ return Objects.equals(v1, v2);
}
return false;
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/StackRecorder.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/StackRecorder.java
index 038a25e..c52be45 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/StackRecorder.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/StackRecorder.java
@@ -17,4 +17,10 @@
*/
public class StackRecorder extends Throwable {
private static final long serialVersionUID = 1296878485146023581L;
+
+ /**
+ * Default constructor.
+ */
+ public StackRecorder() {}
+
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/TypeCast.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/TypeCast.java
index 33b84ce..4f3d327 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/TypeCast.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/util/TypeCast.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -16,13 +16,20 @@
* @author Kohsuke Kawaguchi
*/
public class TypeCast {
+
+ /**
+ * Private constructor.
+ */
+ private TypeCast() {}
+
/**
* Makes sure that a map contains the right type, and returns it to the desirable type.
*/
+ @SuppressWarnings({"unchecked"})
public static <K,V> Map<K,V> checkedCast( Map<?,?> m, Class<K> keyType, Class<V> valueType ) {
if(m==null)
return null;
- for (Map.Entry e : m.entrySet()) {
+ for (Map.Entry<?, ?> e : m.entrySet()) {
if(!keyType.isInstance(e.getKey()))
throw new ClassCastException(e.getKey().getClass().toString());
if(!valueType.isInstance(e.getValue()))
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages.properties
index ce171ef..7d543d3 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -48,7 +48,7 @@
# Not concatenated with any other string (written on a separate line).
Unmarshaller.NullReader = \
- reader can not be null
+ reader can not be null
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = \
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_de.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_de.properties
index efbf524..5c50040 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_de.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_de.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = unerwartetes Pr\u00e4fix: {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = Reader darf nicht null sein\t
+Unmarshaller.NullReader = Reader darf nicht null sein
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = Reader muss auf ein START_ELEMENT-Ereignis gesetzt sein und kein {0}-Ereignis
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_es.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_es.properties
index 6425d55..262e7f1 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_es.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_es.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = prefijo no definido: {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = El lector no puede ser nulo.\t
+Unmarshaller.NullReader = El lector no puede ser nulo.
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = El lector debe estar en un evento START_ELEMENT, no en un evento {0}.
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_fr.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_fr.properties
index ca89aa4..563a0d8 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_fr.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_fr.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = pr\u00e9fixe non d\u00e9fini : {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = le processus de lecture ne peut pas \u00eatre NULL\t
+Unmarshaller.NullReader = le processus de lecture ne peut pas \u00eatre NULL
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = le processus de lecture doit figurer sur un \u00e9v\u00e9nement START_ELEMENT, et non un \u00e9v\u00e9nement {0}
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_it.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_it.properties
index a001fb8..0ac5591 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_it.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_it.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = prefisso non definito: {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = il processo di lettura non pu\u00f2 essere nullo\t
+Unmarshaller.NullReader = il processo di lettura non pu\u00f2 essere nullo
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = il processo di lettura deve trovarsi su un evento START_ELEMENT non su un evento {0}
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_ja.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_ja.properties
index d9fd254..683c1e4 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_ja.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_ja.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = \u672a\u5b9a\u7fa9\u306e\u63a5\u982d\u8f9e: {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \u30ea\u30fc\u30c0\u30fc\u306fnull\u306b\u3067\u304d\u307e\u305b\u3093\t
+Unmarshaller.NullReader = \u30ea\u30fc\u30c0\u30fc\u306fnull\u306b\u3067\u304d\u307e\u305b\u3093
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = \u30ea\u30fc\u30c0\u30fc\u306f{0}\u30a4\u30d9\u30f3\u30c8\u3067\u306f\u306a\u304f\u3001START_ELEMENT\u306b\u5b58\u5728\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_ko.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_ko.properties
index f2572db..926d6c1 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_ko.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_ko.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = \uc815\uc758\ub418\uc9c0 \uc54a\uc740 \uc811\ub450\uc5b4: {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \uc77d\uae30 \uc7a5\uce58\ub294 \ub110\uc77c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\t
+Unmarshaller.NullReader = \uc77d\uae30 \uc7a5\uce58\ub294 \ub110\uc77c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = \uc77d\uae30 \uc7a5\uce58\ub294 {0} \uc774\ubca4\ud2b8\uac00 \uc544\ub2cc START_ELEMENT \uc774\ubca4\ud2b8\uc5d0 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_pt_BR.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_pt_BR.properties
index 84918f5..0f06f91 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_pt_BR.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_pt_BR.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = prefixo indefinido: {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = o leitor n\u00e3o pode ser nulo\t
+Unmarshaller.NullReader = o leitor n\u00e3o pode ser nulo
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = o leitor deve estar em um evento START_ELEMENT, n\u00e3o em um evento {0}
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_zh_CN.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_zh_CN.properties
index 2fec902..28a7299 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_zh_CN.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_zh_CN.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = \u672a\u5b9a\u4e49\u7684\u524d\u7f00: {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \u8bfb\u8fdb\u7a0b\u4e0d\u80fd\u4e3a\u7a7a\u503c\t
+Unmarshaller.NullReader = \u8bfb\u8fdb\u7a0b\u4e0d\u80fd\u4e3a\u7a7a\u503c
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = \u8bfb\u8fdb\u7a0b\u5fc5\u987b\u4f4d\u4e8e START_ELEMENT \u4e8b\u4ef6\u4e0a, \u800c\u4e0d\u662f{0}\u4e8b\u4ef6\u4e0a
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_zh_TW.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_zh_TW.properties
index cd8277c..a859b3a 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_zh_TW.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/unmarshaller/Messages_zh_TW.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -40,7 +40,7 @@
Util.UndefinedPrefix = \u672a\u5b9a\u7fa9\u7684\u524d\u7f6e\u78bc: {0}
# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \u8b80\u53d6\u5668\u4e0d\u53ef\u70ba\u7a7a\u503c\t
+Unmarshaller.NullReader = \u8b80\u53d6\u5668\u4e0d\u53ef\u70ba\u7a7a\u503c
# Not concatenated with any other string (written on a separate line).
Unmarshaller.IllegalReaderState = \u8b80\u53d6\u5668\u5fc5\u9808\u4f4d\u65bc START_ELEMENT \u4e8b\u4ef6, \u800c\u975e {0} \u4e8b\u4ef6
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages.properties
index e81b152..dd3253a 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -39,7 +39,7 @@
Property "{0}" appears more than once in the @XmlType.propOrder
DUPLICATE_PROPERTIES = \
- There are two properties named "{0}"
+ There are two properties named "{0}"
XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = \
The {0} method has @XmlElementMapping on it, but it doesn''t return a sub-type of JAXBElement.
@@ -155,7 +155,7 @@
in the classpath (at {0}) Please remove the JAXB 1.0 runtime for 2.0 runtime to work correctly.
UNMATCHABLE_ADAPTER = \
- Adapter {0} is not applicable to the field type {1}.
+ Adapter {0} is not applicable to the field type {1}.
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = \
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_de.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_de.properties
index 55be914..d97bf94 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_de.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_de.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -106,7 +106,7 @@
# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
RUNNING_WITH_1_0_RUNTIME = Sie versuchen, JAXB 2.0 Runtime (aus {1}) auszuf\u00fchren, es ist jedoch an fr\u00fcherer Stelle im Classpath ein altes JAXB 1.0 Runtime (bei {0}) vorhanden. Entfernen Sie JAXB 1.0 Runtime, damit 2.0 Runtime ordnungsgem\u00e4\u00df ausgef\u00fchrt werden kann.
-UNMATCHABLE_ADAPTER = Adapter {0} ist f\u00fcr den Feldtyp {1} nicht anwendbar.
+UNMATCHABLE_ADAPTER = Adapter {0} ist f\u00fcr den Feldtyp {1} nicht anwendbar.
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = Instanz von AccessorFactory {0} f\u00fcr Klasse {1} kann nicht erstellt werden.
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_es.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_es.properties
index 10c497f..92c70b0 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_es.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_es.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -30,7 +30,7 @@
DUPLICATE_ENTRY_IN_PROP_ORDER = La propiedad "{0}" aparece m\u00e1s de una vez en @XmlType.propOrder
-DUPLICATE_PROPERTIES = Hay dos propiedades con el nombre "{0}"
+DUPLICATE_PROPERTIES = Hay dos propiedades con el nombre "{0}"
XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = El m\u00e9todo {0} incluye @XmlElementMapping, pero no devuelve un subtipo del elemento JAXB.
@@ -106,7 +106,7 @@
# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
RUNNING_WITH_1_0_RUNTIME = Est\u00e1 intentando ejecutar JAXB 2.0 en tiempo de ejecuci\u00f3n (desde {1}), pero tiene un JAXB 1.0 en tiempo de ejecuci\u00f3n antiguo en la classpath (en {0}). Elimine JAXB 1.0 en tiempo de ejecuci\u00f3n para que la versi\u00f3n 2.0 en tiempo de ejecuci\u00f3n funcione correctamente.
-UNMATCHABLE_ADAPTER = El adaptador {0} no es aplicable al tipo de campo {1}.
+UNMATCHABLE_ADAPTER = El adaptador {0} no es aplicable al tipo de campo {1}.
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = No se ha podido crear la instancia de AccessorFactory, {0} para la clase {1}.
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_fr.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_fr.properties
index 7f3d9a5..b2d7876 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_fr.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_fr.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -30,7 +30,7 @@
DUPLICATE_ENTRY_IN_PROP_ORDER = La propri\u00e9t\u00e9 "{0}" appara\u00eet plusieurs fois dans l''annotation @XmlType.propOrder
-DUPLICATE_PROPERTIES = Il existe deux propri\u00e9t\u00e9s nomm\u00e9es "{0}"
+DUPLICATE_PROPERTIES = Il existe deux propri\u00e9t\u00e9s nomm\u00e9es "{0}"
XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = L''annotation @XmlElementMapping figure sur la m\u00e9thode {0}, mais elle ne renvoie aucun sous-type de JAXBElement.
@@ -106,7 +106,7 @@
# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
RUNNING_WITH_1_0_RUNTIME = Vous essayez d''ex\u00e9cuter le runtime JAXB 2.0 (\u00e0 partir de {1}) mais l''ancien runtime JAXB 1.0 figure avant dans le classpath (au niveau de {0}). Enlevez le runtime JAXB 1.0 pour que le runtime 2.0 fonctionne correctement.
-UNMATCHABLE_ADAPTER = L''adaptateur {0} n''est pas applicable au type de champ {1}.
+UNMATCHABLE_ADAPTER = L''adaptateur {0} n''est pas applicable au type de champ {1}.
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = Impossible de cr\u00e9er une instance d''AccessorFactory {0} pour la classe {1}.
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_it.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_it.properties
index 666b3e3..4371cec 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_it.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_it.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -30,7 +30,7 @@
DUPLICATE_ENTRY_IN_PROP_ORDER = La propriet\u00e0 "{0}" \u00e8 presente pi\u00f9 volte in @XmlType.propOrder
-DUPLICATE_PROPERTIES = Esistono due propriet\u00e0 denominate "{0}"
+DUPLICATE_PROPERTIES = Esistono due propriet\u00e0 denominate "{0}"
XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = Sul metodo {0} \u00e8 presente @XmlElementMapping ma non restituisce un sottotipo di JAXBElement.
@@ -106,7 +106,7 @@
# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
RUNNING_WITH_1_0_RUNTIME = Si sta tentando di eseguire il runtime JAXB 2.0 (da {1}) ma si dispone di un runtime JAXB 1.0 di versione precedente nel classpath (in {0}). Rimuovere il runtime JAXB 1.0 affinch\u00e9 il runtime 2.0 possa funzionare correttamente.
-UNMATCHABLE_ADAPTER = L''adattatore {0} non \u00e8 applicabile al tipo di campo {1}.
+UNMATCHABLE_ADAPTER = L''adattatore {0} non \u00e8 applicabile al tipo di campo {1}.
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = Impossibile creare l''istanza di AccessorFactory, {0} per la classe {1}.
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_ja.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_ja.properties
index a6906b7..fddf4a8 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_ja.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_ja.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -30,7 +30,7 @@
DUPLICATE_ENTRY_IN_PROP_ORDER = \u30d7\u30ed\u30d1\u30c6\u30a3"{0}"\u304c@XmlType.propOrder\u306b\u8907\u6570\u3042\u308a\u307e\u3059
-DUPLICATE_PROPERTIES = "{0}"\u3068\u3044\u3046\u540d\u524d\u306e2\u3064\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u5b58\u5728\u3057\u307e\u3059
+DUPLICATE_PROPERTIES = "{0}"\u3068\u3044\u3046\u540d\u524d\u306e2\u3064\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u5b58\u5728\u3057\u307e\u3059
XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = {0}\u30e1\u30bd\u30c3\u30c9\u306b\u306f@XmlElementMapping\u304c\u3042\u308a\u307e\u3059\u304c\u3001JAXBElement\u306e\u30b5\u30d6\u30bf\u30a4\u30d7\u3092\u8fd4\u3057\u307e\u305b\u3093\u3002
@@ -106,7 +106,7 @@
# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
RUNNING_WITH_1_0_RUNTIME = ({1}\u304b\u3089)JAXB 2.0\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u5b9f\u884c\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u304c\u3001({0}\u306e)\u30af\u30e9\u30b9\u30d1\u30b9\u306b\u4ee5\u524d\u306eJAXB 1.0\u30e9\u30f3\u30bf\u30a4\u30e0\u304c\u3042\u308a\u307e\u3059\u30022.0\u30e9\u30f3\u30bf\u30a4\u30e0\u304c\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u3001JAXB 1.0\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002
-UNMATCHABLE_ADAPTER = \u30a2\u30c0\u30d7\u30bf{0}\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u30fb\u30bf\u30a4\u30d7{1}\u306b\u9069\u7528\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002
+UNMATCHABLE_ADAPTER = \u30a2\u30c0\u30d7\u30bf{0}\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u30fb\u30bf\u30a4\u30d7{1}\u306b\u9069\u7528\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = \u30af\u30e9\u30b9{1}\u306eAccessorFactory {0}\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3002
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_ko.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_ko.properties
index 6b697f0..2cdd449 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_ko.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_ko.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -30,7 +30,7 @@
DUPLICATE_ENTRY_IN_PROP_ORDER = "{0}" \uc18d\uc131\uc774 @XmlType.propOrder\uc5d0\uc11c \ub450 \ubc88 \uc774\uc0c1 \ub098\ud0c0\ub0a9\ub2c8\ub2e4.
-DUPLICATE_PROPERTIES = \uc774\ub984\uc774 "{0}"\uc778 \uc18d\uc131\uc774 \ub450 \uac1c \uc788\uc2b5\ub2c8\ub2e4.
+DUPLICATE_PROPERTIES = \uc774\ub984\uc774 "{0}"\uc778 \uc18d\uc131\uc774 \ub450 \uac1c \uc788\uc2b5\ub2c8\ub2e4.
XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = {0} \uba54\uc18c\ub4dc\uc5d0 @XmlElementMapping\uc774 \uc788\uc9c0\ub9cc JAXBElement\uc758 \ud558\uc704 \uc720\ud615\uc744 \ubc18\ud658\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
@@ -106,7 +106,7 @@
# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
RUNNING_WITH_1_0_RUNTIME = {1}\uc5d0\uc11c JAXB 2.0 \ub7f0\ud0c0\uc784\uc744 \uc2e4\ud589\ud558\ub824\uace0 \uc2dc\ub3c4\ud558\uace0 \uc788\uc9c0\ub9cc {0}\uc758 \ud074\ub798\uc2a4 \uacbd\ub85c\uc5d0 \uc774\ubbf8 \uc774\uc804 JAXB 1.0 \ub7f0\ud0c0\uc784\uc774 \uc788\uc2b5\ub2c8\ub2e4. 2.0 \ub7f0\ud0c0\uc784\uc774 \uc81c\ub300\ub85c \uc791\ub3d9\ub418\ub3c4\ub85d JAXB 1.0 \ub7f0\ud0c0\uc784\uc744 \uc81c\uac70\ud558\uc2ed\uc2dc\uc624.
-UNMATCHABLE_ADAPTER = {0} \uc5b4\ub311\ud130\ub294 \ud544\ub4dc \uc720\ud615 {1}\uc5d0 \uc801\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
+UNMATCHABLE_ADAPTER = {0} \uc5b4\ub311\ud130\ub294 \ud544\ub4dc \uc720\ud615 {1}\uc5d0 \uc801\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = {1} \ud074\ub798\uc2a4\uc5d0 \ub300\ud55c AccessorFactory {0}\uc758 \uc778\uc2a4\ud134\uc2a4\ub97c \uc0dd\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_pt_BR.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_pt_BR.properties
index bbe45ef..435e388 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_pt_BR.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_pt_BR.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -30,7 +30,7 @@
DUPLICATE_ENTRY_IN_PROP_ORDER = A propriedade "{0}" aparece mais de uma vez em @XmlType.propOrder
-DUPLICATE_PROPERTIES = H\u00e1 duas propriedades com o nome "{0}"
+DUPLICATE_PROPERTIES = H\u00e1 duas propriedades com o nome "{0}"
XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = O m\u00e9todo {0} tem @XmlElementMapping nele, mas ele n\u00e3o retorna um subtipo de JAXBElement.
@@ -106,7 +106,7 @@
# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
RUNNING_WITH_1_0_RUNTIME = Voc\u00ea est\u00e1 tentando executar o runtime do JAXB 2.0 (de {1}) mas voc\u00ea tem o runtime do JAXB 1.0 antigo no classpath (em {0}). Remova o runtime do JAXB 1.0 do runtime do 2.0 para funcionar corretamente.
-UNMATCHABLE_ADAPTER = O adaptador {0} n\u00e3o \u00e9 aplic\u00e1vel ao tipo de campo {1}.
+UNMATCHABLE_ADAPTER = O adaptador {0} n\u00e3o \u00e9 aplic\u00e1vel ao tipo de campo {1}.
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = N\u00e3o \u00e9 poss\u00edvel criar a inst\u00e2ncia de AccessorFactory {0} para a classe {1}.
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_zh_CN.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_zh_CN.properties
index c47ac02..026e196 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_zh_CN.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_zh_CN.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -30,7 +30,7 @@
DUPLICATE_ENTRY_IN_PROP_ORDER = \u5c5e\u6027 "{0}" \u5728 @XmlType.propOrder \u4e2d\u51fa\u73b0\u591a\u6b21
-DUPLICATE_PROPERTIES = \u6709\u4e24\u4e2a\u540d\u4e3a "{0}" \u7684\u5c5e\u6027
+DUPLICATE_PROPERTIES = \u6709\u4e24\u4e2a\u540d\u4e3a "{0}" \u7684\u5c5e\u6027
XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = {0}\u65b9\u6cd5\u5177\u6709 @XmlElementMapping, \u4f46\u8be5\u65b9\u6cd5\u672a\u8fd4\u56de JAXBElement \u7684\u5b50\u7c7b\u578b\u3002
diff --git a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_zh_TW.properties b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_zh_TW.properties
index c6e306f..97c33bc 100644
--- a/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_zh_TW.properties
+++ b/jaxb-ri/runtime/impl/src/main/resources/org/glassfish/jaxb/runtime/v2/model/impl/Messages_zh_TW.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2022 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
@@ -106,7 +106,7 @@
# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
RUNNING_WITH_1_0_RUNTIME = \u60a8\u6b63\u5728\u5617\u8a66\u57f7\u884c JAXB 2.0 \u7a0b\u5f0f\u5be6\u969b\u57f7\u884c (\u5f9e {1}), \u4f46\u5148\u524d\u65bc\u985e\u5225\u8def\u5f91\u4e2d\u5df2\u7d93\u6709\u820a\u7684 JAXB 1.0 \u7a0b\u5f0f\u5be6\u969b\u57f7\u884c (\u4f4d\u65bc {0}). \u8acb\u79fb\u9664 JAXB 1.0 \u7a0b\u5f0f\u5be6\u969b\u57f7\u884c, \u4f7f 2.0 \u7a0b\u5f0f\u5be6\u969b\u57f7\u884c\u80fd\u9806\u5229\u904b\u4f5c.
-UNMATCHABLE_ADAPTER = \u8f49\u63a5\u5668 {0} \u4e0d\u9069\u7528\u65bc\u6b04\u4f4d\u985e\u578b {1}.
+UNMATCHABLE_ADAPTER = \u8f49\u63a5\u5668 {0} \u4e0d\u9069\u7528\u65bc\u6b04\u4f4d\u985e\u578b {1}.
# {0} - XmlAccessorFactory, {1} - class name
ACCESSORFACTORY_INSTANTIATION_EXCEPTION = \u7121\u6cd5\u5efa\u7acb\u985e\u5225 {1} \u4e4b AccessorFactory \u7684\u57f7\u884c\u8655\u7406 {0}.
diff --git a/jaxb-ri/runtime/impl/src/test/java/FilterList.java b/jaxb-ri/runtime/impl/src/test/java/FilterList.java
index 8723ed5..0d24ccd 100644
--- a/jaxb-ri/runtime/impl/src/test/java/FilterList.java
+++ b/jaxb-ri/runtime/impl/src/test/java/FilterList.java
@@ -102,7 +102,7 @@
itr.previous();
return false;
} catch( NoSuchElementException e ) {
- ; // this is cool.
+ // this is cool.
return false;
} catch( ConcurrentModificationException e ) {
itr = core.listIterator();
diff --git a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/XmlSchemaGeneratorTest.java b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/XmlSchemaGeneratorTest.java
index 77f52d9..004b6d1 100644
--- a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/XmlSchemaGeneratorTest.java
+++ b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/XmlSchemaGeneratorTest.java
@@ -91,7 +91,7 @@
boolean match = result.equals(uris[i+2]);
// is this particular test case expected to resolve?
- boolean resolvable = Boolean.valueOf(uris[i+3]);
+ boolean resolvable = Boolean.parseBoolean(uris[i+3]);
boolean resolve = resolve(uris[i], uris[i+1], result);
diff --git a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbContainer.java b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbContainer.java
index 2492baa..f06763c 100644
--- a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbContainer.java
+++ b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbContainer.java
@@ -13,6 +13,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Objects;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -75,7 +76,7 @@
JaxbContainer that = (JaxbContainer) o;
- return !(deployments != null ? !deployments.equals(that.deployments) : that.deployments != null);
+ return !(!Objects.equals(deployments, that.deployments));
}
diff --git a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbDeployment.java b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbDeployment.java
index b53fea3..c1c5a05 100644
--- a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbDeployment.java
+++ b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbDeployment.java
@@ -17,6 +17,8 @@
import jakarta.xml.bind.annotation.XmlSeeAlso;
import jakarta.xml.bind.annotation.XmlType;
+import java.util.Objects;
+
/**
*/
@XmlAccessorType(XmlAccessType.FIELD)
@@ -52,7 +54,7 @@
JaxbDeployment that = (JaxbDeployment) o;
- return contextRoot != null ? contextRoot.equals(that.contextRoot) : that.contextRoot == null;
+ return Objects.equals(contextRoot, that.contextRoot);
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbDistribution.java b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbDistribution.java
index 96ff771..6afdee6 100644
--- a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbDistribution.java
+++ b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbDistribution.java
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -74,15 +75,13 @@
final JaxbDistribution that = (JaxbDistribution) o;
- return deployments != null ? deployments.equals(that.deployments) : that
- .deployments == null;
+ return Objects.equals(deployments, that.deployments);
}
@Override
public int hashCode() {
- int result = deployments.hashCode();
- return result;
+ return deployments.hashCode();
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbEnvironmentModel.java b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbEnvironmentModel.java
index 1b8c78f..ed70ae4 100644
--- a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbEnvironmentModel.java
+++ b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/JaxbEnvironmentModel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -16,6 +16,8 @@
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
+import java.util.Objects;
+
/**
*/
@XmlRootElement(name = "environmentModel")
@@ -55,8 +57,8 @@
JaxbEnvironmentModel that = (JaxbEnvironmentModel) o;
- if (container != null ? !container.equals(that.container) : that.container != null) return false;
- return !(distribution != null ? !distribution.equals(that.distribution) : that.distribution != null);
+ if (!Objects.equals(container, that.container)) return false;
+ return !(!Objects.equals(distribution, that.distribution));
}
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/DatatypeWriter.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/DatatypeWriter.java
index 90e2e13..97b2ea1 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/DatatypeWriter.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/DatatypeWriter.java
@@ -45,7 +45,7 @@
List<DatatypeWriter<Object>> BUILTIN = Collections.unmodifiableList(new AbstractList<>() {
- @SuppressWarnings({"unchecked"})
+ @SuppressWarnings({"unchecked", "rawtypes"})
private DatatypeWriter<Object>[] BUILTIN_ARRAY = new DatatypeWriter[]{
new DatatypeWriter<String>() {
@Override
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/BeanGenerator.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/BeanGenerator.java
index e05a974..76e3c49 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/BeanGenerator.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/BeanGenerator.java
@@ -217,7 +217,7 @@
}
CClassInfoParent base = cc.target.parent();
- if ((base != null) && (base instanceof CClassInfo)) {
+ if ((base instanceof CClassInfo)) {
String pkg = base.getOwnerPackage().name();
String shortName = base.fullName().substring(base.fullName().indexOf(pkg)+pkg.length()+1);
if (cc.target.shortName.equals(shortName)) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/PackageOutlineImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/PackageOutlineImpl.java
index b52a9ac..7fff1c8 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/PackageOutlineImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/PackageOutlineImpl.java
@@ -185,8 +185,7 @@
elementFormDefault = getFormDefault();
attributeFormDefault = XmlNsForm.UNQUALIFIED;
try {
- XmlNsForm modelValue = _model.getAttributeFormDefault(mostUsedNamespaceURI);
- attributeFormDefault = modelValue;
+ attributeFormDefault = _model.getAttributeFormDefault(mostUsedNamespaceURI);
} catch (Exception e) {
// ignore and accept default
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ConstField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ConstField.java
index 60540ec..0463cb9 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ConstField.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ConstField.java
@@ -79,7 +79,7 @@
@Override
public void unsetValues( JBlock body ) {
- ; // can't unset values
+ // can't unset values
}
@Override
public JExpression hasSetValue() {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Multiplicity.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Multiplicity.java
index f7cf939..b2ece35 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Multiplicity.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Multiplicity.java
@@ -66,9 +66,7 @@
Multiplicity that = (Multiplicity) o;
if (!this.min.equals(that.min)) return false;
- if (this.max != null ? !this.max.equals(that.max) : that.max != null) return false;
-
- return true;
+ return this.max != null ? this.max.equals(that.max) : that.max == null;
}
@Override
@@ -170,7 +168,7 @@
}
private static boolean isZero(BigInteger i) {
- return (i != null && BigInteger.ZERO.equals(i));
+ return (BigInteger.ZERO.equals(i));
}
public static Multiplicity oneOrMore( Multiplicity c ) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/TypeUseImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/TypeUseImpl.java
index ffc180e..538f212 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/TypeUseImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/TypeUseImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -21,6 +21,8 @@
import org.glassfish.jaxb.core.v2.model.core.ID;
import com.sun.xml.xsom.XmlString;
+import java.util.Objects;
+
/**
* General-purpose {@link TypeUse} implementation.
@@ -77,10 +79,8 @@
if (collection != that.collection) return false;
if (this.id != that.id ) return false;
- if (adapter != null ? !adapter.equals(that.adapter) : that.adapter != null) return false;
- if (coreType != null ? !coreType.equals(that.coreType) : that.coreType != null) return false;
-
- return true;
+ if (!Objects.equals(adapter, that.adapter)) return false;
+ return coreType != null ? coreType.equals(that.coreType) : that.coreType == null;
}
@Override
@@ -94,6 +94,7 @@
@Override
+ @SuppressWarnings({"unchecked", "rawtypes"})
public JExpression createConstant(Outline outline, XmlString lexical) {
if(isCollection()) return null;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/nav/NavigatorImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/nav/NavigatorImpl.java
index f48af69..bf3d765 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/nav/NavigatorImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/nav/NavigatorImpl.java
@@ -221,7 +221,6 @@
return create(primitiveType);
}
- @SuppressWarnings("FinalStaticMethod")
public static NType create(Type t) {
if(t==null) return null;
if(t instanceof Class)
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/Ring.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/Ring.java
index aa48f65..1b2d9dc 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/Ring.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/Ring.java
@@ -47,7 +47,7 @@
*/
public final class Ring {
- private final Map<Class,Object> components = new HashMap<>();
+ private final Map<Class<?>,Object> components = new HashMap<>();
private static final ThreadLocal<Ring> instances = new ThreadLocal<>();
@@ -58,11 +58,13 @@
get().components.put(clazz,instance);
}
+ @SuppressWarnings({"unchecked"})
public static <T> void add( T o ) {
add((Class<T>)o.getClass(),o);
}
public static <T> T get( Class<T> key ) {
+ @SuppressWarnings({"unchecked"})
T t = (T)get().components.get(key);
if(t==null) {
try {
@@ -82,7 +84,7 @@
}
/**
- * A instance is associated with a thread.
+ * An instance is associated with a thread.
*/
public static Ring get() {
return instances.get();
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/ModelGroup.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/ModelGroup.java
index 9c22cc2..78f3108 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/ModelGroup.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/ModelGroup.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -39,7 +39,6 @@
Block b = new Block(isOptional()||optional,isRepeated());
addAllElements(b);
r.add(b);
- return;
}
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/Internalizer.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/Internalizer.java
index e723281..a27f410 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/Internalizer.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/Internalizer.java
@@ -226,10 +226,8 @@
if(required) {
reportError( bindings,
Messages.format(Messages.ERR_XPATH_EVAL,e.getMessage()), e );
- return; // abort processing this <jaxb:bindings>
- } else {
- return;
}
+ return; // abort processing this <jaxb:bindings>
}
if( nlst.getLength()==0 ) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ClassSelector.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ClassSelector.java
index d5f3f82..3d04298 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ClassSelector.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ClassSelector.java
@@ -346,9 +346,7 @@
if(!(sc instanceof XSElementDecl)) return false;
XSElementDecl decl = (XSElementDecl)sc;
- if(!decl.getType().isSimpleType()) return false;
-
- return true;
+ return decl.getType().isSimpleType();
}
private static final String[] reservedClassNames = new String[]{"ObjectFactory"};
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/DefaultClassBinder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/DefaultClassBinder.java
index 60ca8e2..a4c6198 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/DefaultClassBinder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/DefaultClassBinder.java
@@ -152,9 +152,8 @@
CClassInfoParent scope;
- if( parentType!=null
- && parentType instanceof CElementInfo
- && ((CElementInfo)parentType).hasClass() ) {
+ if(parentType instanceof CElementInfo
+ && ((CElementInfo) parentType).hasClass()) {
// special case where we put a nested 'Type' element
scope = (CElementInfo)parentType;
className = "Type";
@@ -216,10 +215,7 @@
}
}
- if(!type.isLocal() || !type.isComplexType())
- return false;
-
- return true;
+ return type.isLocal() && type.isComplexType();
}
/**
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ParticleBinder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ParticleBinder.java
index 97558d5..1c6b45e 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ParticleBinder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ParticleBinder.java
@@ -94,9 +94,7 @@
// if not, the term might have one.
cust = builder.getBindInfo(p.getTerm()).get(type);
- if(cust!=null) return cust;
-
- return null;
+ return cust;
}
/**
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java
index b73b010..656390c 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java
@@ -824,8 +824,7 @@
XSFacet enumf = initiatingType.getFacet(XSFacet.FACET_ENUMERATION);
if(enumf!=null) {
String v = enumf.getValue().value;
- if(v.equals("0") || v.equals("1"))
- return true;
+ return v.equals("0") || v.equals("1");
}
return false;
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BindInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BindInfo.java
index c2887b1..a91b0b2 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BindInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BindInfo.java
@@ -78,10 +78,7 @@
*/
public boolean isPointless() {
if(size()>0) return false;
- if(documentation!=null && !documentation.contents.isEmpty())
- return false;
-
- return true;
+ return documentation == null || documentation.contents.isEmpty();
}
private static final class Documentation {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/ChoiceContentComplexTypeBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/ChoiceContentComplexTypeBuilder.java
index fa157c0..8c1a94e 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/ChoiceContentComplexTypeBuilder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/ChoiceContentComplexTypeBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -47,10 +47,7 @@
if( mg.getCompositor()!=XSModelGroup.CHOICE )
return false;
- if( p.isRepeated() )
- return false;
-
- return true;
+ return !p.isRepeated();
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/MixedComplexTypeBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/MixedComplexTypeBuilder.java
index 0f20156..d06f5f8 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/MixedComplexTypeBuilder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/MixedComplexTypeBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 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
@@ -38,10 +38,7 @@
!bt.asComplexType().isMixed() &&
ct.isMixed() &&
ct.getDerivationMethod() == XSType.EXTENSION) {
- if (!bgmBuilder.isGenerateMixedExtensions() && (ct.getContentType().asParticle() == null)) {
- return false;
- }
- return true;
+ return bgmBuilder.isGenerateMixedExtensions() || (ct.getContentType().asParticle() != null);
}
return false;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java
index 7e2dbfd..ba8d51e 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java
@@ -29,17 +29,12 @@
if (!bgmBuilder.isGenerateMixedExtensions()) return false;
XSType bt = ct.getBaseType();
- if (bt.isComplexType() &&
- bt.asComplexType().isMixed() &&
- ct.isMixed() &&
- ct.getDerivationMethod()==XSType.EXTENSION &&
- ct.getContentType().asParticle() != null &&
- ct.getExplicitContent().asEmpty() == null
- ) {
- return true;
- }
-
- return false;
+ return bt.isComplexType() &&
+ bt.asComplexType().isMixed() &&
+ ct.isMixed() &&
+ ct.getDerivationMethod() == XSType.EXTENSION &&
+ ct.getContentType().asParticle() != null &&
+ ct.getExplicitContent().asEmpty() == null;
}
@Override
diff --git a/jaxb-ri/xjc/src/main/java/module-info.java b/jaxb-ri/xjc/src/main/java/module-info.java
index 4c99aa0..040118a 100644
--- a/jaxb-ri/xjc/src/main/java/module-info.java
+++ b/jaxb-ri/xjc/src/main/java/module-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022 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
@@ -19,7 +19,6 @@
requires java.logging;
requires transitive java.compiler;
requires transitive java.xml;
- requires jdk.compiler;
requires java.desktop;
requires com.sun.tools.rngdatatype;
@@ -29,7 +28,7 @@
requires com.sun.istack.runtime;
requires com.sun.istack.tools;
requires transitive com.sun.xml.xsom;
- requires com.sun.tools.rngom;
+ requires transitive com.sun.tools.rngom;
requires com.sun.xml.dtdparser;
requires com.sun.xml.txw2;
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_fr.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_fr.properties
index 154f491..3362d42 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_fr.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_fr.properties
@@ -30,8 +30,6 @@
\ \ sig : videz les signatures du code g\u00e9n\u00e9r\u00e9\n\
\ \ forest : le vidage a transform\u00e9 la for\u00eat DOM
-Driver.AddonUsage = \nExtensions :
-
Driver.Public.Usage = Syntaxe : xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
Si le r\u00e9pertoire est indiqu\u00e9, tous les fichiers de sch\u00e9ma qu'il contient seront compil\u00e9s.\n\
Si le fichier JAR est indiqu\u00e9, le fichier de binding /META-INF/sun-jaxb.episode sera compil\u00e9.\n\
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_zh_CN.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_zh_CN.properties
index 761c1df..8d9200a 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_zh_CN.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_zh_CN.properties
@@ -29,8 +29,6 @@
\ \ sig : \u8f6c\u50a8\u6240\u751f\u6210\u4ee3\u7801\u7684\u7b7e\u540d\n\
\ \ forest : \u8f6c\u50a8\u8f6c\u6362\u7684 DOM \u76ee\u5f55\u6797
-Driver.AddonUsage = \n\u6269\u5c55:
-
Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
\u5982\u679c\u6307\u5b9a dir, \u5c06\u7f16\u8bd1\u8be5\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6a21\u5f0f\u6587\u4ef6\u3002\n\
\u5982\u679c\u6307\u5b9a jar, \u5c06\u7f16\u8bd1 /META-INF/sun-jaxb.episode \u7ed1\u5b9a\u6587\u4ef6\u3002\n\
diff --git a/jaxb-ri/xjc/src/test/java/Driver.java b/jaxb-ri/xjc/src/test/java/Driver.java
index b8db9ff..96e5e68 100644
--- a/jaxb-ri/xjc/src/test/java/Driver.java
+++ b/jaxb-ri/xjc/src/test/java/Driver.java
@@ -35,12 +35,10 @@
cl.setPackageAssertionStatus("com.sun", true);
}
- Class driver = cl.loadClass("com.sun.tools.xjc.Driver");
+ Class<?> driver = cl.loadClass("com.sun.tools.xjc.Driver");
Method mainMethod = driver.getDeclaredMethod("main", String[].class);
try {
mainMethod.invoke(null,new Object[]{args});
- } catch (IllegalAccessException e) {
- throw e;
} catch (InvocationTargetException e) {
if(e.getTargetException()!=null)
throw e.getTargetException();
diff --git a/jaxb-ri/xjc/src/test/java/SchemaGenerator.java b/jaxb-ri/xjc/src/test/java/SchemaGenerator.java
index bcace45..74db5eb 100644
--- a/jaxb-ri/xjc/src/test/java/SchemaGenerator.java
+++ b/jaxb-ri/xjc/src/test/java/SchemaGenerator.java
@@ -37,12 +37,10 @@
cl.setPackageAssertionStatus("com.sun", true);
}
- Class driver = cl.loadClass("com.sun.tools.jxc.SchemaGenerator");
+ Class<?> driver = cl.loadClass("com.sun.tools.jxc.SchemaGenerator");
Method mainMethod = driver.getDeclaredMethod("main", String[].class);
try {
mainMethod.invoke(null,new Object[]{args});
- } catch (IllegalAccessException e) {
- throw e;
} catch (InvocationTargetException e) {
if(e.getTargetException()!=null)
throw e.getTargetException();
diff --git a/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/addon/DebugPlugin.java b/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/addon/DebugPlugin.java
index 6309872..ff7907d 100644
--- a/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/addon/DebugPlugin.java
+++ b/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/addon/DebugPlugin.java
@@ -10,7 +10,6 @@
package com.sun.tools.xjc.addon;
-import java.util.Arrays;
import java.util.List;
import com.sun.tools.xjc.Options;