project cleanup
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/jaxb-ri/boms/bom-ext/pom.xml b/jaxb-ri/boms/bom-ext/pom.xml
index ea9f22c..df20467 100644
--- a/jaxb-ri/boms/bom-ext/pom.xml
+++ b/jaxb-ri/boms/bom-ext/pom.xml
@@ -35,7 +35,7 @@
<properties>
<codemodel.version>${project.version}</codemodel.version>
- <dtd-parser.version>1.4.5</dtd-parser.version>
+ <dtd-parser.version>1.5.0</dtd-parser.version>
<relaxng.version>${project.version}</relaxng.version>
<xsom.version>${project.version}</xsom.version>
<ant.version>1.10.12</ant.version>
diff --git a/jaxb-ri/codemodel/codemodel-annotation-compiler/pom.xml b/jaxb-ri/codemodel/codemodel-annotation-compiler/pom.xml
index 17e4cf1..3941f79 100644
--- a/jaxb-ri/codemodel/codemodel-annotation-compiler/pom.xml
+++ b/jaxb-ri/codemodel/codemodel-annotation-compiler/pom.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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,7 +34,7 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
- <version>1.10.11</version>
+ <version>1.10.12</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotatable.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotatable.java
index cf161ee..11f0f80 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotatable.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotatable.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
@@ -45,14 +45,11 @@
/**
* Adds an annotation to this program element
* and returns a type-safe writer to fill in the values of such annotations.
- * @param <W>
- * @param clazz
- * @return
*/
<W extends JAnnotationWriter<? extends Annotation>> W annotate2(Class<W> clazz);
/**
- * Read-only live view of all annotations on this {@link JAnnotatable}
+ * Read-only live view of all annotations on this
*
* @return
* Can be empty but never null.
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 4f8e582..8243fab 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,9 +239,6 @@
return TypedAnnotationWriter.create(clazz,this);
}
- /**
- * {@link JAnnotatable#annotations()}
- */
@SuppressWarnings("unchecked")
@Override
public Collection<JAnnotationUse> annotations() {
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 8296ed1..fb11ddf 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
@@ -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
@@ -64,7 +64,7 @@
@Override
public Iterator<JClass> _implements() {
- return Collections.<JClass>emptyList().iterator();
+ return Collections.emptyIterator();
}
@Override
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JClass.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JClass.java
index 210cab9..d4957b0 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JClass.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JClass.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
@@ -65,10 +65,10 @@
*
* @return
* Returns the JClass representing the superclass of the
- * entity (class or interface) represented by this {@link JClass}.
- * Even if no super class is given explicitly or this {@link JClass}
+ * entity (class or interface) represented by this .
+ * Even if no super class is given explicitly or this
* is not a class, this method still returns
- * {@link JClass} for {@link Object}.
+ * for {@link Object}.
* If this JClass represents {@link Object}, return null.
*/
abstract public JClass _extends();
@@ -79,7 +79,7 @@
*
* @return
* A non-null valid iterator that iterates all
- * {@link JClass} objects that represents those interfaces
+ * objects that represents those interfaces
* implemented by this object.
*/
abstract public Iterator<JClass> _implements();
@@ -88,7 +88,7 @@
* Iterates all the type parameters of this class/interface.
*
* <p>
- * For example, if this {@link JClass} represents
+ * For example, if this represents
* {@code Set<T>}, this method returns an array
* that contains single {@link JTypeVar} for 'T'.
*/
@@ -118,11 +118,6 @@
*/
public JPrimitiveType getPrimitiveType() { return null; }
- /**
- * @deprecated calling this method from {@link JClass}
- * would be meaningless, since it's always guaranteed to
- * return {@code this}.
- */
@Deprecated
@Override
public JClass boxify() { return this; }
@@ -298,7 +293,7 @@
* <p>
* For example, when this class is {@code Map<String,Map<V>>},
* (where V then doing
- * substituteParams( V, Integer ) returns a {@link JClass}
+ * substituteParams( V, Integer ) returns a
* for {@code Map<String,Map<Integer>>}.
*
* <p>
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JClassContainer.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JClassContainer.java
index a4d41c4..f59f639 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JClassContainer.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JClassContainer.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 @@
* @exception JClassAlreadyExistsException
* When the specified class/interface was already created.
*/
- public JDefinedClass _class(String name) throws JClassAlreadyExistsException;
+ JDefinedClass _class(String name) throws JClassAlreadyExistsException;
/**
* Add an interface to this class/package.
@@ -64,7 +64,7 @@
* @exception JClassAlreadyExistsException
* When the specified class/interface was already created.
*/
- public JDefinedClass _interface(int mods, String name) throws JClassAlreadyExistsException;
+ JDefinedClass _interface(int mods, String name) throws JClassAlreadyExistsException;
/**
* Adds a public interface to this package.
@@ -72,7 +72,7 @@
* @exception JClassAlreadyExistsException
* When the specified class/interface was already created.
*/
- public JDefinedClass _interface(String name) throws JClassAlreadyExistsException;
+ JDefinedClass _interface(String name) throws JClassAlreadyExistsException;
/**
* Create a new class or a new interface.
@@ -81,13 +81,13 @@
* use {@link #_class(int, String, ClassType)}
*/
@Deprecated
- public JDefinedClass _class(int mods, String name, boolean isInterface )
+ JDefinedClass _class(int mods, String name, boolean isInterface)
throws JClassAlreadyExistsException;
/**
* Creates a new class/enum/interface/annotation.
*/
- public JDefinedClass _class(int mods, String name, ClassType kind )
+ JDefinedClass _class(int mods, String name, ClassType kind)
throws JClassAlreadyExistsException;
@@ -95,7 +95,7 @@
* Returns an iterator that walks the nested classes defined in this
* class.
*/
- public Iterator<JDefinedClass> classes();
+ Iterator<JDefinedClass> classes();
/**
* Parent JClassContainer.
@@ -109,7 +109,7 @@
* If this is an inner class, this method returns the outer
* class.
*/
- public JClassContainer parentContainer();
+ JClassContainer parentContainer();
/**
* Gets the nearest package parent.
@@ -117,12 +117,12 @@
* <p>
* If {@code this.isPackage()}, then return {@code this}.
*/
- public JPackage getPackage();
+ JPackage getPackage();
/**
* Get the root code model object.
*/
- public JCodeModel owner();
+ JCodeModel owner();
/**
* Add an annotationType Declaration to this package
@@ -134,7 +134,7 @@
* When the specified class/interface was already created.
*/
- public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException;
+ JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException;
/**
* Add a public enum to this package
@@ -146,6 +146,6 @@
* When the specified class/interface was already created.
*/
- public JDefinedClass _enum (String name) throws JClassAlreadyExistsException;
+ JDefinedClass _enum(String name) throws JClassAlreadyExistsException;
}
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 882258d..1f6d129 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
@@ -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
@@ -32,7 +32,7 @@
* <p>
* Here's your typical CodeModel application.
*
- * <pre>
+ * <pre>{@code
* JCodeModel cm = new JCodeModel();
*
* // generate source code by populating the 'cm' tree.
@@ -41,7 +41,7 @@
*
* // write them out
* cm.build(new File("."));
- * </pre>
+ * }</pre>
*
* <p>
* Every CodeModel node is always owned by one {@link JCodeModel} object
@@ -171,7 +171,7 @@
module._requires(requires);
}
- public final JPackage rootPackage() {
+ public JPackage rootPackage() {
return _package("");
}
@@ -325,7 +325,7 @@
* Generates Java source code.
*/
public void build( CodeWriter source, CodeWriter resource ) throws IOException {
- JPackage[] pkgs = packages.values().toArray(new JPackage[packages.size()]);
+ JPackage[] pkgs = packages.values().toArray(new JPackage[0]);
// avoid concurrent modification exception
for( JPackage pkg : pkgs ) {
pkg.build(source,resource);
@@ -343,7 +343,7 @@
*/
public int countArtifacts() {
int r = 0;
- JPackage[] pkgs = packages.values().toArray(new JPackage[packages.size()]);
+ JPackage[] pkgs = packages.values().toArray(new JPackage[0]);
// avoid concurrent modification exception
for( JPackage pkg : pkgs )
r += pkg.countArtifacts();
@@ -509,7 +509,7 @@
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[args.size()]);
+ JClass[] argsA = args.toArray(new JClass[0]);
JClass clazz = node.jClass.narrow(argsA);
node.jClass = clazz;
}
@@ -535,7 +535,7 @@
@Override
public String toString() {
- StringBuilder builder = new StringBuilder(value.toString());
+ StringBuilder builder = new StringBuilder(value);
boolean hasChilds = !childs.isEmpty();
if (hasChilds) {
builder.append("<");
@@ -561,8 +561,8 @@
}
/**
- * Parses a type name token T (which can be potentially of the form Tr&ly;T1,T2,...>,
- * or "? extends/super T".)
+ * Parses a type name token T (which can be potentially of the form {@code T<T1,T2,...>},
+ * or {@code ? extends/super T}.)
*
* @return the index of the character next to T.
*/
@@ -635,9 +635,9 @@
}
/**
- * Parses '<T1,T2,...,Tn>'
+ * Parses {@code '<T1,T2,...,Tn>'}
*
- * @return the index of the character next to '>'
+ * @return the index of the character next to '{@literal >}'
*/
private JClass parseArguments(JClass rawType) throws ClassNotFoundException {
if(s.charAt(idx)!='<')
@@ -652,7 +652,7 @@
throw new IllegalArgumentException("Missing '>' in "+s);
char ch = s.charAt(idx);
if(ch=='>')
- return rawType.narrow(args.toArray(new JClass[args.size()]));
+ return rawType.narrow(args.toArray(new JClass[0]));
if(ch!=',')
throw new IllegalArgumentException(s);
@@ -735,16 +735,19 @@
@Override
public Iterator<JClass> _implements() {
final Class<?>[] interfaces = _class.getInterfaces();
- return new Iterator<JClass>() {
+ return new Iterator<>() {
private int idx = 0;
+
@Override
public boolean hasNext() {
return idx < interfaces.length;
}
+
@Override
public JClass next() {
return JCodeModel.this.ref(interfaces[idx++]);
}
+
@Override
public void remove() {
throw new UnsupportedOperationException();
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDeclaration.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDeclaration.java
index aab3288..72a0a5c 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDeclaration.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDeclaration.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,6 +18,6 @@
public interface JDeclaration {
- public void declare(JFormatter f);
+ void declare(JFormatter f);
}
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 20b0eea..7a7df2e 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
@@ -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
@@ -115,7 +115,7 @@
*/
private final ClassType classType;
- /** List containing the enum value declarations
+ /* List containing the enum value declarations
*
*/
// private List enumValues = new ArrayList();
@@ -648,7 +648,7 @@
}
/**
- * {@inheritDoc}
+ *
*
* @deprecated
*/
@@ -749,7 +749,7 @@
@Override
public final Iterator<JDefinedClass> classes() {
if(classes==null)
- return Collections.<JDefinedClass>emptyList().iterator();
+ return Collections.emptyIterator();
else
return classes.values().iterator();
}
@@ -768,7 +768,7 @@
if(classes==null)
return new JClass[0];
else
- return classes.values().toArray(new JClass[classes.values().size()]);
+ return classes.values().toArray(new JClass[0]);
}
@Override
@@ -925,9 +925,6 @@
return this.annotations.remove(annotation);
}
- /**
- * {@link JAnnotatable#annotations()}
- */
@Override
public Collection<JAnnotationUse> annotations() {
if (annotations == null)
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDirectClass.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDirectClass.java
index 5c706af..be31692 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDirectClass.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JDirectClass.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
@@ -55,7 +55,7 @@
@Override
public Iterator<JClass> _implements() {
- return Collections.<JClass>emptyList().iterator();
+ return Collections.emptyIterator();
}
@Override
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 d85a465..9ad9b12 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
@@ -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
@@ -114,9 +114,7 @@
* add an xdoclet.
*/
public Map<String,String> addXdoclet(String name) {
- Map<String,String> p = atXdoclets.get(name);
- if(p==null)
- atXdoclets.put(name,p=new HashMap<>());
+ Map<String, String> p = atXdoclets.computeIfAbsent(name, k -> new HashMap<>());
return p;
}
@@ -124,9 +122,7 @@
* add an xdoclet.
*/
public Map<String,String> addXdoclet(String name, Map<String,String> attributes) {
- Map<String,String> p = atXdoclets.get(name);
- if(p==null)
- atXdoclets.put(name,p=new HashMap<>());
+ Map<String, String> p = atXdoclets.computeIfAbsent(name, k -> new HashMap<>());
p.putAll(attributes);
return p;
}
@@ -135,9 +131,7 @@
* add an xdoclet.
*/
public Map<String,String> addXdoclet(String name, String attribute, String value) {
- Map<String,String> p = atXdoclets.get(name);
- if(p==null)
- atXdoclets.put(name,p=new HashMap<>());
+ Map<String, String> p = atXdoclets.computeIfAbsent(name, k -> new HashMap<>());
p.put(attribute, value);
return p;
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JEnumConstant.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JEnumConstant.java
index 4970205..58d5e99 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JEnumConstant.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JEnumConstant.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
@@ -130,9 +130,6 @@
public boolean removeAnnotation(JAnnotationUse annotation) {
return this.annotations.remove(annotation);
}
- /**
- * {@link JAnnotatable#annotations()}
- */
@Override
public Collection<JAnnotationUse> annotations() {
if (annotations == null)
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 6f5f8e7..55b1fb5 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
@@ -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
@@ -199,7 +199,7 @@
}
}
- static final String charEscape = "\b\t\n\f\r\"\'\\";
+ static final String charEscape = "\b\t\n\f\r\"'\\";
static final String charMacro = "btnfr\"'\\";
/**
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 b336c9a..4ceab85 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
@@ -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,14 +30,14 @@
*/
public final class JFormatter {
- /** all classes and ids encountered during the collection mode **/
- /** map from short type name to ReferenceList (list of JClass and ids sharing that name) **/
+ /* all classes and ids encountered during the collection mode */
+ /* map from short type name to ReferenceList (list of JClass and ids sharing that name) */
private HashMap<String,ReferenceList> collectedReferences;
/** set of imported types (including package java types, eventhough we won't generate imports for them) */
private HashSet<JClass> importedClasses;
- private static enum Mode {
+ private enum Mode {
/**
* Collect all the type names and identifiers.
* In this mode we don't actually generate anything.
@@ -442,7 +442,7 @@
}
// generate import statements
- JClass[] imports = importedClasses.toArray(new JClass[importedClasses.size()]);
+ JClass[] imports = importedClasses.toArray(new JClass[0]);
Arrays.sort(imports);
for (JClass clazz : imports) {
// suppress import statements for primitive types, built-in types,
@@ -498,8 +498,8 @@
/**
- * Special character token we use to differenciate '>' as an operator and
- * '>' as the end of the type arguments. The former uses '>' and it requires
+ * Special character token we use to differentiate '{@literal >}' as an operator and
+ * '{@literal >}' as the end of the type arguments. The former uses '{@literal >}' and it requires
* a preceding whitespace. The latter uses this, and it does not have a preceding
* whitespace.
*/
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JGenerable.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JGenerable.java
index f26cb28..f38e85a 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JGenerable.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JGenerable.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,6 +18,6 @@
public interface JGenerable {
- public void generate(JFormatter f);
+ void generate(JFormatter f);
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JGenerifiableImpl.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JGenerifiableImpl.java
index 8c43bb0..256ed57 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JGenerifiableImpl.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JGenerifiableImpl.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
@@ -63,7 +63,7 @@
if(typeVariables==null)
return JTypeVar.EMPTY_ARRAY;
else
- return typeVariables.toArray(new JTypeVar[typeVariables.size()]);
+ return typeVariables.toArray(new JTypeVar[0]);
}
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JInvocation.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JInvocation.java
index c1cce63..2d726f3 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JInvocation.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JInvocation.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,7 +131,7 @@
* If there's no arguments, an empty array will be returned.
*/
public JExpression[] listArgs() {
- return args.toArray(new JExpression[args.size()]);
+ return args.toArray(new JExpression[0]);
}
@Override
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JJavaName.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JJavaName.java
index 6cfafd7..12c1a8a 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JJavaName.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JJavaName.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
@@ -10,6 +10,7 @@
package com.sun.codemodel;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -110,7 +111,7 @@
/** All reserved keywords of Java. */
- private static HashSet<String> reservedKeywords = new HashSet<String>();
+ private static HashSet<String> reservedKeywords = new HashSet<>();
static {
// see http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
@@ -175,8 +176,7 @@
// and 5.0 keywords
"enum"
};
- for (String w : words)
- reservedKeywords.add(w);
+ reservedKeywords.addAll(Arrays.asList(words));
}
@@ -192,7 +192,7 @@
String apply(String word) {
Matcher m = pattern.matcher(word);
if(m.matches()) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
m.appendReplacement(buf,replacement);
return buf.toString();
} else {
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 06572b0..ad22afb 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
@@ -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
@@ -139,7 +139,7 @@
* @return List of parameters of this method. This list is not modifiable.
*/
public List<JVar> params() {
- return Collections.<JVar>unmodifiableList(params);
+ return Collections.unmodifiableList(params);
}
/**
@@ -317,7 +317,7 @@
* @return If there's no parameter, an empty array will be returned.
*/
public JVar[] listParams() {
- return params.toArray(new JVar[params.size()]);
+ return params.toArray(new JVar[0]);
}
/**
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JModule.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JModule.java
index 2d58e11..a910357 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JModule.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JModule.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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 @@
/**
* Creates an instance of Java module.
* @param name Java module name. Value can not be {@code null}
- * @param version Java module version.
*/
JModule(final String name) {
if (name == null) {
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JModuleDirective.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JModuleDirective.java
index a980a78..aef40b4 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JModuleDirective.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JModuleDirective.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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,9 +59,9 @@
/**
* Compares this module directive to the specified object.
- * @param other The object to compare this {@link JModuleDirective} against.
+ * @param other The object to compare this against.
* @return {@code true} if the argument is not {@code null}
- * and is a {@link JModuleDirective} object with the same type
+ * and is a object with the same type
* and equal name.
*/
@Override
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JNarrowedClass.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JNarrowedClass.java
index 6a75688..237beab 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JNarrowedClass.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JNarrowedClass.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,7 +17,7 @@
import java.util.ArrayList;
/**
- * Represents X<Y>.
+ * Represents {@code X<Y>}.
*
* TODO: consider separating the decl and the use.
*
@@ -144,16 +144,19 @@
@Override
public Iterator<JClass> _implements() {
- return new Iterator<JClass>() {
+ return new Iterator<>() {
private final Iterator<JClass> core = basis._implements();
+
@Override
public void remove() {
core.remove();
}
+
@Override
public JClass next() {
- return core.next().substituteParams(basis.typeParams(),args);
+ return core.next().substituteParams(basis.typeParams(), args);
}
+
@Override
public boolean hasNext() {
return core.hasNext();
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JNullType.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JNullType.java
index c078aac..65e2314 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JNullType.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JNullType.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
@@ -42,7 +42,7 @@
@Override
public Iterator<JClass> _implements() {
- return Collections.<JClass>emptyList().iterator();
+ return Collections.emptyIterator();
}
@Override
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JPackage.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JPackage.java
index 472c749..ffcc6b4 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JPackage.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JPackage.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
@@ -105,7 +105,6 @@
/**
* Gets the parent package, or null if this class is the root package.
- * @return
*/
public JPackage parent() {
if(name.length()==0) return null;
@@ -141,7 +140,7 @@
}
/**
- * {@inheritDoc}
+ *
* @deprecated
*/
@Deprecated
@@ -172,9 +171,6 @@
/**
* Adds a public class to this package.
*
- * @param name
- * @return
- * @throws JClassAlreadyExistsException
*/
@Override
public JDefinedClass _class(String name) throws JClassAlreadyExistsException {
@@ -184,20 +180,15 @@
/**
* Gets a reference to the already created {@link JDefinedClass}.
*
- * @param name
* @return null
* If the class is not yet created.
*/
public JDefinedClass _getClass(String name) {
- if(classes.containsKey(name))
- return classes.get(name);
- else
- return null;
+ return classes.getOrDefault(name, null);
}
/**
* Order is based on the lexicological order of the package name.
- * @param that
*/
@Override
public int compareTo(JPackage that) {
@@ -214,7 +205,6 @@
* Name of interface to be added to this package
*
* @return Newly generated interface
- * @throws JClassAlreadyExistsException
*/
@Override
public JDefinedClass _interface(int mods, String name) throws JClassAlreadyExistsException {
@@ -223,9 +213,6 @@
/**
* Adds a public interface to this package.
- * @param name
- * @return
- * @throws JClassAlreadyExistsException
*/
@Override
public JDefinedClass _interface(String name) throws JClassAlreadyExistsException {
@@ -263,8 +250,6 @@
}
/**
* Adds a new resource file to this package.
- * @param rsrc
- * @return
*/
public JResourceFile addResourceFile(JResourceFile rsrc) {
resources.add(rsrc);
@@ -273,8 +258,6 @@
/**
* Checks if a resource of the given name exists.
- * @param name
- * @return
*/
public boolean hasResourceFile(String name) {
for (JResourceFile r : resources)
@@ -285,7 +268,6 @@
/**
* Iterates all resource files in this package.
- * @return
*/
public Iterator<JResourceFile> propertyFiles() {
return resources.iterator();
@@ -306,7 +288,6 @@
/**
* Removes a class from this package.
- * @param c
*/
public void remove(JClass c) {
if (c._package() != this)
@@ -322,9 +303,6 @@
/**
* Reference a class within this package.
- * @param name
- * @return
- * @throws java.lang.ClassNotFoundException
*/
public JClass ref(String name) throws ClassNotFoundException {
if (name.indexOf('.') >= 0)
@@ -340,8 +318,6 @@
/**
* Gets a reference to a sub package of this package.
- * @param pkg
- * @return
*/
public JPackage subPackage( String pkg ) {
if(isUnnamed()) return owner()._package(pkg);
@@ -351,7 +327,6 @@
/**
* Returns an iterator that walks the top-level classes defined in this
* package.
- * @return
*/
@Override
public Iterator<JDefinedClass> classes() {
@@ -369,8 +344,6 @@
/**
* Checks if a given name is already defined as a class/interface
- * @param classLocalName
- * @return
*/
public boolean isDefined(String classLocalName) {
Iterator<JDefinedClass> itr = classes();
@@ -384,9 +357,8 @@
/**
* Checks if this package is the root, unnamed package.
- * @return
*/
- public final boolean isUnnamed() { return name.length() == 0; }
+ public boolean isUnnamed() { return name.length() == 0; }
/**
* Get the name of this package
@@ -402,10 +374,9 @@
/**
* Return the code model root object being used to create this package.
- * @return
*/
@Override
- public final JCodeModel owner() { return owner; }
+ public JCodeModel owner() { return owner; }
@Override
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JPrimitiveType.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JPrimitiveType.java
index eb27a79..8097906 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JPrimitiveType.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JPrimitiveType.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
@@ -69,11 +69,6 @@
return wrapperClass;
}
- /**
- * @deprecated calling this method from {@link JPrimitiveType}
- * would be meaningless, since it's always guaranteed to
- * return {@code this}.
- */
@Deprecated
@Override
public JType unboxify() {
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JStatement.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JStatement.java
index 81f90a4..2c52c7b 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JStatement.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JStatement.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,6 +18,6 @@
public interface JStatement {
- public void state(JFormatter f);
+ void state(JFormatter f);
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/SecureLoader.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/SecureLoader.java
index 051ec16..f8277b3 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/SecureLoader.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/SecureLoader.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
@@ -23,7 +23,7 @@
return Thread.currentThread().getContextClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -37,7 +37,7 @@
return c.getClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return c.getClassLoader();
@@ -51,7 +51,7 @@
return ClassLoader.getSystemClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return ClassLoader.getSystemClassLoader();
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 45e35b6..d53c00f 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
@@ -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
@@ -70,7 +70,7 @@
/**
* Returns a class object that represents a statically generated code.
*/
- public final JClass getJClass() {
+ public JClass getJClass() {
return clazz;
}
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/SecureLoader.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/SecureLoader.java
index 23214ea..2a9c278 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/SecureLoader.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/SecureLoader.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
@@ -23,7 +23,7 @@
return Thread.currentThread().getContextClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -37,7 +37,7 @@
return c.getClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return c.getClassLoader();
@@ -51,7 +51,7 @@
return ClassLoader.getSystemClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return ClassLoader.getSystemClassLoader();
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/package-info.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/package-info.java
new file mode 100644
index 0000000..c617ad6
--- /dev/null
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/fmt/package-info.java
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 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
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * Various resource file formats (classes that implement <code>JResourceFile</code>).
+ */
+package com.sun.codemodel.fmt;
diff --git a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/writer/OutputStreamCodeWriter.java b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/writer/OutputStreamCodeWriter.java
index d6bcb23..1c22b9a 100644
--- a/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/writer/OutputStreamCodeWriter.java
+++ b/jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/writer/OutputStreamCodeWriter.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
@@ -8,14 +8,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-/**
- * Output all source files into a single stream.
- *
- * This is primarily for test purposes.
- *
- * @author
- * Aleksei Valikov (valikov@gmx.net)
- */
package com.sun.codemodel.writer;
import java.io.FilterOutputStream;
@@ -27,6 +19,13 @@
import com.sun.codemodel.CodeWriter;
import com.sun.codemodel.JPackage;
+/**
+ * Output all source files into a single stream.
+ *
+ * This is primarily for test purposes.
+ *
+ * @author Aleksei Valikov (valikov@gmx.net)
+ */
public class OutputStreamCodeWriter extends CodeWriter {
private final PrintStream out;
diff --git a/jaxb-ri/codemodel/codemodel/src/main/javadoc/com/sun/codemodel/fmt/package.html b/jaxb-ri/codemodel/codemodel/src/main/javadoc/com/sun/codemodel/fmt/package.html
deleted file mode 100644
index 3f99134..0000000
--- a/jaxb-ri/codemodel/codemodel/src/main/javadoc/com/sun/codemodel/fmt/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<HTML>
-<!--
-
- Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Distribution License v. 1.0, which is available at
- http://www.eclipse.org/org/documents/edl-v10.php.
-
- SPDX-License-Identifier: BSD-3-Clause
-
--->
-
-<BODY>
-Various resource file formats (classes that implement <code>JResourceFile</code>).
-</BODY>
-</HTML>
diff --git a/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/JRequiresTest.java b/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/JRequiresTest.java
index 9e4ca62..c00839d 100644
--- a/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/JRequiresTest.java
+++ b/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/JRequiresTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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 @@
public JRequiresTest() {}
/**
- * Test of generateModifiers method with all combinations of {@code local) and {@code public) modifiers.
+ * Test of generateModifiers method with all combinations of {@code local} and {@code public} modifiers.
*/
@Test
public void testGenerateModifiers() {
diff --git a/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/tests/JCommentTest.java b/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/tests/JCommentTest.java
index 7a62f4a..8f10881 100644
--- a/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/tests/JCommentTest.java
+++ b/jaxb-ri/codemodel/codemodel/src/test/java/com/sun/codemodel/tests/JCommentTest.java
@@ -16,6 +16,8 @@
import com.sun.codemodel.JDocComment;
import com.sun.codemodel.writer.OutputStreamCodeWriter;
import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
+
import junit.framework.TestCase;
/**
@@ -36,7 +38,7 @@
OutputStreamCodeWriter fileCodeWriter = new OutputStreamCodeWriter(os, "UTF-8");
model.build(fileCodeWriter);
- String generatedClass = os.toString("UTF-8");
+ String generatedClass = os.toString(StandardCharsets.UTF_8);
System.out.println(generatedClass);
assertTrue(generatedClass.contains("<b>"));
assertTrue(generatedClass.contains("</p>"));
diff --git a/jaxb-ri/codemodel/pom.xml b/jaxb-ri/codemodel/pom.xml
index fb6486d..1554aa7 100644
--- a/jaxb-ri/codemodel/pom.xml
+++ b/jaxb-ri/codemodel/pom.xml
@@ -62,9 +62,15 @@
<spotbugs.exclude/>
<spotbugs.skip>false</spotbugs.skip>
<spotbugs.threshold>High</spotbugs.threshold>
- <spotbugs.version>4.5.0.0</spotbugs.version>
+ <spotbugs.version>4.5.3.0</spotbugs.version>
- <jdoc.doclint>all</jdoc.doclint>
+ <!-- exclude big groups from the Xlint -->
+ <comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
+ <!-- -Xdoclint:-missing does not seem to work properly on the infra -->
+ <comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
+ <warn.limit>150000</warn.limit>
+ <!-- too many to fix -->
+ <jdoc.doclint>all,-missing</jdoc.doclint>
</properties>
<modules>
@@ -78,7 +84,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
- <version>3.0.0-M3</version>
+ <version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -93,7 +99,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>5.1.1</version>
+ <version>5.1.4</version>
<configuration>
<instructions>
<_noextraheaders>true</_noextraheaders>
@@ -129,7 +135,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
+ <version>3.10.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -285,8 +291,13 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
- <compilerArgs>
- <arg>-Xlint:all</arg>
+ <compilerArgs combine.children="append">
+ <arg>${comp.xlint}</arg>
+ <arg>${comp.xdoclint}</arg>
+ <arg>-Xmaxwarns</arg>
+ <arg>${warn.limit}</arg>
+ <arg>-Xmaxerrs</arg>
+ <arg>${warn.limit}</arg>
</compilerArgs>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/api/impl/NameConverter.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/api/impl/NameConverter.java
index 1c0e4be..0006fda 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/api/impl/NameConverter.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/api/impl/NameConverter.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
@@ -76,9 +76,9 @@
*
* This is the standard name conversion for JAXB.
*/
- public static final NameConverter standard = new Standard();
+ NameConverter standard = new Standard();
- static class Standard extends NameUtil implements NameConverter {
+ class Standard extends NameUtil implements NameConverter {
/**
* Default constructor.
@@ -237,7 +237,7 @@
* The only difference is that we treat '_' as a valid character
* and not as a word separator.
*/
- public static final NameConverter jaxrpcCompatible = new Standard() {
+ NameConverter jaxrpcCompatible = new Standard() {
@Override
protected boolean isPunct(char c) {
return (c == '.' || c == '-' || c == ';' /*|| c == '_'*/ || c == '\u00b7'
@@ -258,7 +258,7 @@
/**
* Smarter converter used for RELAX NG support.
*/
- public static final NameConverter smart = new Standard() {
+ NameConverter smart = new Standard() {
@Override
public String toConstantName( String token ) {
String name = super.toConstantName(token);
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/api/impl/NameUtil.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/api/impl/NameUtil.java
index fce297c..c7e237e 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/api/impl/NameUtil.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/api/impl/NameUtil.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
@@ -11,8 +11,6 @@
package org.glassfish.jaxb.core.api.impl;
import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
import java.util.List;
import java.util.Locale;
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/DataWriter.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/DataWriter.java
index e76fa4e..65d6ea2 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/DataWriter.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/DataWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -174,7 +174,6 @@
* <p>This method is especially useful if the writer failed
* with an exception the last time through.</p>
*
- * @see XMLWriter#reset()
*/
@Override
public void reset ()
@@ -312,7 +311,7 @@
* @see XMLWriter#characters(char[], int, int)
*/
@Override
- public void characters (char ch[], int start, int length)
+ public void characters (char[] ch, int start, int length)
throws SAXException
{
state = SEEN_DATA;
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/Messages.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/Messages.java
index 679585f..a7844bf 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/Messages.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/Messages.java
@@ -74,14 +74,6 @@
"SAXMarshaller.MissingObject";
/**
- * @deprecated
- * use {@link org.glassfish.jaxb.core.v2.runtime.XMLSerializer#reportMissingObjectError(String)}
- * Usage not found. TODO Remove
- */
- // public static final String ERR_MISSING_OBJECT2 = // 1 arg
- // "SAXMarshaller.MissingObject2";
-
- /**
* @deprecated only used from 1.0
*/
@Deprecated(since="2.0", forRemoval=true)
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/XMLWriter.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/XMLWriter.java
index eada395..e7821f4 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/XMLWriter.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/XMLWriter.java
@@ -504,7 +504,7 @@
write(p);
write("=\"");
}
- char ch[] = u.toCharArray();
+ char[] ch = u.toCharArray();
writeEsc(ch, 0, ch.length, true);
write('\"');
}
@@ -577,7 +577,7 @@
* @see org.xml.sax.ContentHandler#characters(char[], int, int)
*/
@Override
- public void characters (char ch[], int start, int len)
+ public void characters (char[] ch, int start, int len)
throws SAXException
{
try {
@@ -607,7 +607,7 @@
* @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
*/
@Override
- public void ignorableWhitespace (char ch[], int start, int length)
+ public void ignorableWhitespace (char[] ch, int start, int length)
throws SAXException
{
try {
@@ -867,7 +867,7 @@
write('>');
startTagIsClosed = true;
}
- char ch[] = data.toCharArray();
+ char[] ch = data.toCharArray();
characters(ch, 0, ch.length);
} catch( IOException e ) {
throw new SAXException(e);
@@ -911,7 +911,7 @@
private void writeAttributes (Attributes atts) throws IOException {
int len = atts.getLength();
for (int i = 0; i < len; i++) {
- char ch[] = atts.getValue(i).toCharArray();
+ char[] ch = atts.getValue(i).toCharArray();
write(' ');
write(atts.getQName(i));
write("=\"");
@@ -929,8 +929,8 @@
* @param length The number of characters to use.
* @param isAttVal true if this is an attribute value literal.
*/
- private void writeEsc (char ch[], int start,
- int length, boolean isAttVal)
+ private void writeEsc (char[] ch, int start,
+ int length, boolean isAttVal)
throws IOException
{
escapeHandler.escape(ch, start, length, isAttVal, output);
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/util/SecureLoader.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/util/SecureLoader.java
index e9f8b2c..7092684 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/util/SecureLoader.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/util/SecureLoader.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
@@ -23,7 +23,7 @@
return Thread.currentThread().getContextClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -37,7 +37,7 @@
return c.getClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return c.getClassLoader();
@@ -51,7 +51,7 @@
return ClassLoader.getSystemClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return ClassLoader.getSystemClassLoader();
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/ClassFactory.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/ClassFactory.java
index 4e4514c..c8afa42 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/ClassFactory.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/ClassFactory.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
@@ -45,9 +45,9 @@
*
* To avoid synchronization among threads, we use {@link ThreadLocal}.
*/
- private static final ThreadLocal<Map<Class, WeakReference<Constructor>>> tls = new ThreadLocal<Map<Class,WeakReference<Constructor>>>() {
+ private static final ThreadLocal<Map<Class, WeakReference<Constructor>>> tls = new ThreadLocal<>() {
@Override
- public Map<Class,WeakReference<Constructor>> initialValue() {
+ public Map<Class, WeakReference<Constructor>> initialValue() {
return new WeakHashMap<>();
}
};
@@ -77,7 +77,7 @@
if (System.getSecurityManager() == null) {
cons = tryGetDeclaredConstructor(clazz);
} else {
- cons = AccessController.doPrivileged(new PrivilegedAction<Constructor<T>>() {
+ cons = AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public Constructor<T> run() {
return tryGetDeclaredConstructor(clazz);
@@ -173,15 +173,9 @@
} catch (IllegalAccessException e) {
logger.log(Level.INFO,"failed to create a new instance of "+method.getReturnType().getName(),e);
throw new IllegalAccessError(e.toString());
- } catch (IllegalArgumentException iae){
+ } catch (IllegalArgumentException | NullPointerException | ExceptionInInitializerError iae){
logger.log(Level.INFO,"failed to create a new instance of "+method.getReturnType().getName(),iae);
errorMsg = iae;
- } catch (NullPointerException npe){
- logger.log(Level.INFO,"failed to create a new instance of "+method.getReturnType().getName(),npe);
- errorMsg = npe;
- } catch (ExceptionInInitializerError eie){
- logger.log(Level.INFO,"failed to create a new instance of "+method.getReturnType().getName(),eie);
- errorMsg = eie;
}
NoSuchMethodError exp;
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/BuiltinLeafInfo.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/BuiltinLeafInfo.java
index 72ff020..3be7be7 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/BuiltinLeafInfo.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/BuiltinLeafInfo.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,5 +33,5 @@
* never null.
*/
@Override
- public QName getTypeName();
+ QName getTypeName();
}
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ElementInfo.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ElementInfo.java
index aa41789..c8615fe 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ElementInfo.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ElementInfo.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
@@ -68,13 +68,13 @@
/**
* {@inheritDoc}
*
- * {@link ElementInfo} can only substitute {@link ElementInfo}.
+ * can only substitute .
*/
@Override
ElementInfo<T,C> getSubstitutionHead();
/**
- * All the {@link ElementInfo}s whose {@link #getSubstitutionHead()} points
+ * All the s whose {@link #getSubstitutionHead()} points
* to this object.
*
* @return
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/EnumLeafInfo.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/EnumLeafInfo.java
index a1c3ee0..72c4836 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/EnumLeafInfo.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/EnumLeafInfo.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,7 +17,7 @@
*/
public interface EnumLeafInfo<T,C> extends LeafInfo<T,C> {
/**
- * The same as {@link #getType()} but an {@link EnumLeafInfo}
+ * The same as {@link #getType()} but an
* is guaranteed to represent an enum declaration, which is a
* kind of a class declaration.
*
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ErrorHandler.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ErrorHandler.java
index 9b7abd6..9ceec28 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ErrorHandler.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ErrorHandler.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
@@ -32,7 +32,6 @@
public interface ErrorHandler {
/**
* Receives a notification for an error in the annotated code.
- * @param e
*/
void error( IllegalAnnotationException e );
}
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/NonElement.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/NonElement.java
index b3e890a..8c8e182 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/NonElement.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/NonElement.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
@@ -10,8 +10,6 @@
package org.glassfish.jaxb.core.v2.model.core;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
-
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
@@ -25,7 +23,7 @@
* @author Kohsuke Kawaguchi
*/
public interface NonElement<T,C> extends TypeInfo<T,C> {
- public static final QName ANYTYPE_NAME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "anyType");
+ QName ANYTYPE_NAME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "anyType");
/**
* Gets the primary XML type ANYTYPE_NAME of the class.
@@ -40,7 +38,7 @@
QName getTypeName();
/**
- * Returns true if this {@link NonElement} maps to text in XML,
+ * Returns true if this maps to text in XML,
* without any attribute nor child elements.
*/
boolean isSimpleType();
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ReferencePropertyInfo.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ReferencePropertyInfo.java
index 5ee8f1f..7dcdbf2 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ReferencePropertyInfo.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/ReferencePropertyInfo.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
@@ -46,7 +46,7 @@
/**
* {@inheritDoc}.
*
- * If this {@link ReferencePropertyInfo} has a wildcard in it,
+ * If this has a wildcard in it,
* then the returned list will contain {@link WildcardTypeInfo}.
*/
@Override
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/RegistryInfo.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/RegistryInfo.java
index fd8b2e3..6f59c42 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/RegistryInfo.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/RegistryInfo.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,13 +28,11 @@
public interface RegistryInfo<T,C> {
/**
* Returns all the references to other types in this registry.
- * @return
*/
Set<TypeInfo<T,C>> getReferences();
/**
* Returns the class with {@link XmlRegistry}.
- * @return
*/
C getClazz();
}
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/TypeInfoSet.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/TypeInfoSet.java
index 06fa90d..23c55ed 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/TypeInfoSet.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/TypeInfoSet.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
@@ -173,5 +173,5 @@
*
* TODO: not sure if this actually works. We don't really know what are T,C.
*/
- public void dump( Result out ) throws JAXBException;
+ void dump(Result out) throws JAXBException;
}
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 2c35636..f755038 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
@@ -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
@@ -135,7 +135,7 @@
if (ownerType instanceof Class)
sb.append(((Class) ownerType).getName());
else
- sb.append(ownerType.toString());
+ sb.append(ownerType);
sb.append(".");
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/ReflectionNavigator.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/ReflectionNavigator.java
index 74e0f64..73edd83 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/ReflectionNavigator.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/ReflectionNavigator.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
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/SecureLoader.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/SecureLoader.java
index f9bf2aa..00a503f 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/SecureLoader.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/nav/SecureLoader.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
@@ -23,7 +23,7 @@
return Thread.currentThread().getContextClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -37,7 +37,7 @@
return c.getClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return c.getClassLoader();
@@ -51,7 +51,7 @@
return ClassLoader.getSystemClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return ClassLoader.getSystemClassLoader();
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/util/ArrayInfoUtil.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/util/ArrayInfoUtil.java
index a731569..268643e 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/util/ArrayInfoUtil.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/util/ArrayInfoUtil.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 @@
import javax.xml.namespace.QName;
import org.glassfish.jaxb.core.v2.TODO;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
/**
* Util class for ArrayInfo
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/RuntimeUtil.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/RuntimeUtil.java
index 020b6db..a0909b0 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/RuntimeUtil.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/RuntimeUtil.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
@@ -80,7 +80,7 @@
boxToPrimitive = Collections.unmodifiableMap(p);
}
- /**
+ /*
* Reports a print conversion error while marshalling.
*/
/*
@@ -100,7 +100,7 @@
}
*/
- /**
+ /*
* Reports that the type of an object in a property is unexpected.
*/
/*
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/unmarshaller/LocatorEx.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/unmarshaller/LocatorEx.java
index 3e4cff5..97cc630 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/unmarshaller/LocatorEx.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/runtime/unmarshaller/LocatorEx.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
@@ -26,14 +26,13 @@
public interface LocatorEx extends Locator {
/**
* Gets the current location in a {@link ValidationEventLocator} object.
- * @return
*/
ValidationEventLocator getLocation();
/**
* Immutable snapshot of a {@link LocatorEx}
*/
- public static final class Snapshot implements LocatorEx, ValidationEventLocator {
+ final class Snapshot implements LocatorEx, ValidationEventLocator {
private final int columnNumber,lineNumber,offset;
private final String systemId,publicId;
private final URL url;
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/util/EditDistance.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/util/EditDistance.java
index 1bed381..ece6730 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/util/EditDistance.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/util/EditDistance.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,7 +31,7 @@
* Weak results cache to avoid additional computations.
* Because of high complexity caching is required.
*/
- private static final WeakHashMap<AbstractMap.SimpleEntry<String,String>, Integer> CACHE = new WeakHashMap<AbstractMap.SimpleEntry<String, String>, Integer>();
+ private static final WeakHashMap<AbstractMap.SimpleEntry<String,String>, Integer> CACHE = new WeakHashMap<>();
/**
* Computes the edit distance between two strings.
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 6cb73d4..98f6c83 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -54,7 +54,7 @@
private static final String DISABLE_XML_SECURITY = "org.glassfish.jaxb.disableXmlSecurity";
private static final boolean XML_SECURITY_DISABLED = AccessController.doPrivileged(
- new PrivilegedAction<Boolean>() {
+ new PrivilegedAction<>() {
@Override
public Boolean run() {
return Boolean.getBoolean(DISABLE_XML_SECURITY);
@@ -81,10 +81,7 @@
}
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
return factory;
- } catch (SAXNotRecognizedException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException(ex);
- } catch (SAXNotSupportedException ex) {
+ } catch (SAXNotRecognizedException | SAXNotSupportedException ex) {
LOGGER.log(Level.SEVERE, null, ex);
throw new IllegalStateException(ex);
} catch (AbstractMethodError er) {
@@ -107,13 +104,7 @@
factory.setNamespaceAware(true);
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
return factory;
- } catch (ParserConfigurationException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException( ex);
- } catch (SAXNotRecognizedException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException( ex);
- } catch (SAXNotSupportedException ex) {
+ } catch (ParserConfigurationException | SAXNotRecognizedException | SAXNotSupportedException ex) {
LOGGER.log(Level.SEVERE, null, ex);
throw new IllegalStateException( ex);
} catch (AbstractMethodError er) {
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 2ab3e7b..ac6ce1e 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
@@ -41,7 +41,7 @@
DOMScanner scanner = new DOMScanner();
MockContentHandler mockHandler = new MockContentHandler();
- Map<String,String> assertMapping = new HashMap<String,String>();
+ Map<String,String> assertMapping = new HashMap<>();
assertMapping.put("xml", "http://www.w3.org/XML/1998/namespace");
assertMapping.put("xsi", "http://www.w3.org/2001/XMLSchema-instance");
assertMapping.put("", "http://example.com/test/ns");
@@ -52,9 +52,9 @@
private class MockContentHandler implements ContentHandler {
- private Map<String,String> prefixMapping = new HashMap<String,String>();
+ private Map<String,String> prefixMapping = new HashMap<>();
- private Map<String,String> assertMapping = new HashMap<String,String>();
+ private Map<String,String> assertMapping = new HashMap<>();
private String assertElement = null;
public void setAssertion(String elementName, Map<String,String> mapping) {
diff --git a/jaxb-ri/external/pom.xml b/jaxb-ri/external/pom.xml
index df5e91f..8e576c1 100644
--- a/jaxb-ri/external/pom.xml
+++ b/jaxb-ri/external/pom.xml
@@ -65,6 +65,13 @@
<spotbugs.skip>false</spotbugs.skip>
<spotbugs.threshold>High</spotbugs.threshold>
<spotbugs.version>4.5.3.0</spotbugs.version>
+ <!-- exclude big groups from the Xlint -->
+ <comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
+ <!-- -Xdoclint:-missing does not seem to work properly on the infra -->
+ <comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
+ <warn.limit>150000</warn.limit>
+ <!-- too many to fix -->
+ <jdoc.doclint>all,-missing</jdoc.doclint>
</properties>
<modules>
@@ -152,7 +159,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.10.0</version>
+ <version>3.10.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -308,9 +315,16 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
- <compilerArgs>
- <arg>-Xlint:all</arg>
+ <compilerArgs combine.children="append">
+ <arg>${comp.xlint}</arg>
+ <arg>${comp.xdoclint}</arg>
+ <arg>-Xmaxwarns</arg>
+ <arg>${warn.limit}</arg>
+ <arg>-Xmaxerrs</arg>
+ <arg>${warn.limit}</arg>
</compilerArgs>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
diff --git a/jaxb-ri/external/relaxng-datatype/src/main/java/com/sun/tools/rngdatatype/Datatype.java b/jaxb-ri/external/relaxng-datatype/src/main/java/com/sun/tools/rngdatatype/Datatype.java
index b2a68b9..2cc505b 100644
--- a/jaxb-ri/external/relaxng-datatype/src/main/java/com/sun/tools/rngdatatype/Datatype.java
+++ b/jaxb-ri/external/relaxng-datatype/src/main/java/com/sun/tools/rngdatatype/Datatype.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Thai Open Source Software Center Ltd
+ * Copyright (c) 2005, 2022, Thai Open Source Software Center Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -184,7 +184,7 @@
* This value is one of the possible return values of the
* {@link #getIdType} method.
*/
- public static final int ID_TYPE_NULL = 0;
+ int ID_TYPE_NULL = 0;
/**
* Indicates that RELAX NG compatibility processors should
@@ -193,7 +193,7 @@
* This value is one of the possible return values of the
* {@link #getIdType} method.
*/
- public static final int ID_TYPE_ID = 1;
+ int ID_TYPE_ID = 1;
/**
* Indicates that RELAX NG compatibility processors should
@@ -202,7 +202,7 @@
* This value is one of the possible return values of the
* {@link #getIdType} method.
*/
- public static final int ID_TYPE_IDREF = 2;
+ int ID_TYPE_IDREF = 2;
/**
* Indicates that RELAX NG compatibility processors should
@@ -211,7 +211,7 @@
* This value is one of the possible return values of the
* {@link #getIdType} method.
*/
- public static final int ID_TYPE_IDREFS = 3;
+ int ID_TYPE_IDREFS = 3;
/**
* Checks if the ID/IDREF semantics is associated with this
@@ -234,7 +234,7 @@
* it returns {@link #ID_TYPE_ID}, {@link #ID_TYPE_IDREF} or
* {@link #ID_TYPE_IDREFS}.
*/
- public int getIdType();
+ int getIdType();
/**
@@ -267,5 +267,5 @@
* <b>false</b> if this datatype is context-<b>in</b>dependent
* (it never needs a context object).
*/
- public boolean isContextDependent();
+ boolean isContextDependent();
}
diff --git a/jaxb-ri/external/relaxng-datatype/src/main/java/com/sun/tools/rngdatatype/helpers/DatatypeLibraryLoader.java b/jaxb-ri/external/relaxng-datatype/src/main/java/com/sun/tools/rngdatatype/helpers/DatatypeLibraryLoader.java
index b81332b..249a9ed 100644
--- a/jaxb-ri/external/relaxng-datatype/src/main/java/com/sun/tools/rngdatatype/helpers/DatatypeLibraryLoader.java
+++ b/jaxb-ri/external/relaxng-datatype/src/main/java/com/sun/tools/rngdatatype/helpers/DatatypeLibraryLoader.java
@@ -44,6 +44,7 @@
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.net.URL;
+import java.nio.charset.StandardCharsets;
import java.util.Enumeration;
import java.util.NoSuchElementException;
import java.util.Vector;
@@ -212,15 +213,10 @@
try {
InputStream in = url.openStream();
Reader r;
- try {
- r = new InputStreamReader(in, "UTF-8");
- }
- catch (UnsupportedEncodingException e) {
- r = new InputStreamReader(in, "UTF8");
- }
- r = new BufferedReader(r);
+ r = new InputStreamReader(in, StandardCharsets.UTF_8);
+ r = new BufferedReader(r);
Vector tokens = new Vector();
- StringBuffer tokenBuf = new StringBuffer();
+ StringBuilder tokenBuf = new StringBuilder();
int state = START;
for (;;) {
int n = r.read();
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/DataPatternBuilder.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/DataPatternBuilder.java
index 57837b4..647cc86 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/DataPatternBuilder.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/DataPatternBuilder.java
@@ -24,7 +24,6 @@
import com.sun.tools.rngom.ast.om.Location;
import com.sun.tools.rngom.ast.om.ParsedElementAnnotation;
import com.sun.tools.rngom.ast.om.ParsedPattern;
-import com.sun.tools.rngom.parse.Context;
import com.sun.tools.rngom.parse.*;
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/GrammarSection.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/GrammarSection.java
index a364f97..a4bb19f 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/GrammarSection.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/GrammarSection.java
@@ -37,22 +37,22 @@
A extends Annotations<E,L,CL>,
CL extends CommentList<L>> {
- static final class Combine {
+ final class Combine {
private final String name;
private Combine(String name) {
this.name = name;
}
- final public String toString() {
+ public String toString() {
return name;
}
}
- static final Combine COMBINE_CHOICE = new Combine("choice");
- static final Combine COMBINE_INTERLEAVE = new Combine("interleave");
+ Combine COMBINE_CHOICE = new Combine("choice");
+ Combine COMBINE_INTERLEAVE = new Combine("interleave");
// using \u0000 guarantees that the name will be never used as
// a user-defined pattern name.
- static final String START = "\u0000#start\u0000";
+ String START = "\u0000#start\u0000";
/**
* Called when a pattern is defined.
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/IncludedGrammar.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/IncludedGrammar.java
index 7d35296..5ec43ab 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/IncludedGrammar.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/IncludedGrammar.java
@@ -39,15 +39,5 @@
A extends Annotations<E,L,CL>,
CL extends CommentList<L>> extends GrammarSection<P,E,L,A,CL>, Scope<P,E,L,A,CL> {
- /**
- *
- * @return
- * technically, an included gramamr does not produce a pattern,
- * but this allows {@link Parseable#parseInclude(String, SchemaBuilder, IncludedGrammar, String)}
- * to return the result from {@link IncludedGrammar} nicely.
- *
- * <p>
- * The value returned from this method will be returned from the abovementioned method.
- */
P endIncludedGrammar(L loc, A anno) throws BuildException;
}
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/SchemaBuilder.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/SchemaBuilder.java
index 99737c4..f5caee8 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/SchemaBuilder.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/ast/builder/SchemaBuilder.java
@@ -25,9 +25,6 @@
import com.sun.tools.rngom.ast.om.ParsedElementAnnotation;
import com.sun.tools.rngom.ast.om.ParsedPattern;
import com.sun.tools.rngom.nc.NameClass;
-import com.sun.tools.rngom.parse.Context;
-import com.sun.tools.rngom.parse.IllegalSchemaException;
-import com.sun.tools.rngom.parse.Parseable;
import com.sun.tools.rngom.ast.om.ParsedNameClass;
import com.sun.tools.rngom.parse.*;
@@ -44,9 +41,9 @@
/**
* Returns the {@link NameClassBuilder}, which is used to build name
- * classes for this {@link SchemaBuilder}. The
+ * classes for this . The
* {@link NameClass}es that are built will then be
- * fed into this {@link SchemaBuilder}to further build RELAX NG patterns.
+ * fed into this to further build RELAX NG patterns.
*
* @return always return a non-null valid object. This method can (and
* probably should) always return the same object.
@@ -161,7 +158,7 @@
P makeErrorPattern();
/**
- * If this {@link SchemaBuilder}is interested in actually parsing
+ * If this is interested in actually parsing
* comments, this method returns true.
* <p>
* Returning false allows the schema parser to speed up the processing by
@@ -173,7 +170,7 @@
* Called after all the parsing is done.
*
* <p>
- * This hook typically allows as {@link SchemaBuilder} to expand
+ * This hook typically allows as to expand
* notAllowed (if it's following the simplification as in the spec.)
*/
P expandPattern( P p ) throws BuildException, IllegalSchemaException;
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/BinaryPattern.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/BinaryPattern.java
index e75e2d5..6185d99 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/BinaryPattern.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/BinaryPattern.java
@@ -82,7 +82,7 @@
public final Pattern[] getChildren() {
List lst = new ArrayList();
fillChildren(lst);
- return (Pattern[]) lst.toArray(new Pattern[lst.size()]);
+ return (Pattern[]) lst.toArray(new Pattern[0]);
}
private void fillChildren( Class c, Pattern p, Collection col ) {
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/GroupPattern.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/GroupPattern.java
index a21283c..2c25c94 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/GroupPattern.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/GroupPattern.java
@@ -21,8 +21,6 @@
*/
package com.sun.tools.rngom.binary;
-import com.sun.tools.rngom.binary.visitor.PatternFunction;
-import com.sun.tools.rngom.binary.visitor.PatternVisitor;
import com.sun.tools.rngom.binary.visitor.*;
public class GroupPattern extends BinaryPattern {
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/PatternInterner.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/PatternInterner.java
index 26b56d3..c942eb8 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/PatternInterner.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/binary/PatternInterner.java
@@ -37,7 +37,7 @@
PatternInterner(PatternInterner parent) {
table = parent.table;
if (table != null)
- table = (Pattern[]) table.clone();
+ table = table.clone();
used = parent.used;
usedLimit = parent.usedLimit;
}
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DAnnotation.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DAnnotation.java
index 5a7d9ad..3e060a0 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DAnnotation.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DAnnotation.java
@@ -46,12 +46,12 @@
/**
* Keyed by QName.
*/
- final Map<QName,Attribute> attributes = new HashMap<QName,Attribute>();
+ final Map<QName,Attribute> attributes = new HashMap<>();
/**
* List of nested elements.
*/
- final List<Element> contents = new ArrayList<Element>();
+ final List<Element> contents = new ArrayList<>();
/**
* Attribute.
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DContainerPattern.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DContainerPattern.java
index d795704..5afc9cc 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DContainerPattern.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DContainerPattern.java
@@ -49,10 +49,11 @@
}
public Iterator<DPattern> iterator() {
- return new Iterator<DPattern>() {
+ return new Iterator<>() {
DPattern next = head;
+
public boolean hasNext() {
- return next!=null;
+ return next != null;
}
public DPattern next() {
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DDataPattern.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DDataPattern.java
index 28dc42a..11cd335 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DDataPattern.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DDataPattern.java
@@ -36,7 +36,7 @@
String datatypeLibrary;
String type;
- final List<Param> params = new ArrayList<Param>();
+ final List<Param> params = new ArrayList<>();
/**
* Parameter to a data pattern.
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DDefine.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DDefine.java
index 44b02cc..eda39ec 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DDefine.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DDefine.java
@@ -60,6 +60,6 @@
public boolean isNullable() {
if(nullable==null)
nullable = pattern.isNullable()?Boolean.TRUE:Boolean.FALSE;
- return nullable.booleanValue();
+ return nullable;
}
}
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DGrammarPattern.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DGrammarPattern.java
index f6d45db..3c8f014 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DGrammarPattern.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DGrammarPattern.java
@@ -31,7 +31,7 @@
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
*/
public class DGrammarPattern extends DPattern implements Iterable<DDefine> {
- private final Map<String,DDefine> patterns = new HashMap<String,DDefine>();
+ private final Map<String,DDefine> patterns = new HashMap<>();
DPattern start;
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DXMLPrinter.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DXMLPrinter.java
index ae1beb9..1882db7 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DXMLPrinter.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/DXMLPrinter.java
@@ -77,8 +77,6 @@
/**
* Prints grammar enclosed by start/end document.
*
- * @param grammar
- * @throws XMLStreamException
*/
public void printDocument(DGrammarPattern grammar) throws XMLStreamException {
try {
@@ -97,7 +95,6 @@
/**
* Prints XML fragment for the given pattern.
*
- * @throws XMLStreamException
*/
public void print(DPattern pattern) throws XMLStreamException {
try {
@@ -114,7 +111,6 @@
/**
* Prints XML fragment for the given name class.
*
- * @throws XMLStreamException
*/
public void print(NameClass nc) throws XMLStreamException {
try {
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/GrammarBuilderImpl.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/GrammarBuilderImpl.java
index 1b078d5..8ed027b 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/GrammarBuilderImpl.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/GrammarBuilderImpl.java
@@ -89,7 +89,7 @@
public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
// Harshit : Fixed issue in handling of annotations
if (additionalElementAnnotations==null) {
- additionalElementAnnotations = new ArrayList<Element>();
+ additionalElementAnnotations = new ArrayList<>();
}
additionalElementAnnotations.add(((ElementWrapper)ea).element);
if (grammar.annotation==null) {
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/PatternParseable.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/PatternParseable.java
index 0047050..dce1af0 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/PatternParseable.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/digested/PatternParseable.java
@@ -47,7 +47,7 @@
}
public ParsedPattern parse(SchemaBuilder sb) throws BuildException {
- return (ParsedPattern)pattern.accept(new Parser(sb));
+ return pattern.accept(new Parser(sb));
}
public ParsedPattern parseInclude(String uri, SchemaBuilder f, IncludedGrammar g, String inheritedNs) throws BuildException {
@@ -86,15 +86,15 @@
public ParsedPattern onAttribute(DAttributePattern p) {
return sb.makeAttribute(
parseNameClass(p.getName()),
- (ParsedPattern)p.getChild().accept(this),
+ p.getChild().accept(this),
parseLocation(p),
parseAnnotation(p) );
}
public ParsedPattern onChoice(DChoicePattern p) {
- List<ParsedPattern> kids = new ArrayList<ParsedPattern>();
+ List<ParsedPattern> kids = new ArrayList<>();
for( DPattern c=p.firstChild(); c!=null; c=c.next )
- kids.add( (ParsedPattern)c.accept(this) );
+ kids.add(c.accept(this));
return sb.makeChoice(kids,parseLocation(p),null);
}
@@ -106,7 +106,7 @@
public ParsedPattern onElement(DElementPattern p) {
return sb.makeElement(
parseNameClass(p.getName()),
- (ParsedPattern)p.getChild().accept(this),
+ p.getChild().accept(this),
parseLocation(p),
parseAnnotation(p) );
}
@@ -123,29 +123,29 @@
}
public ParsedPattern onGroup(DGroupPattern p) {
- List<ParsedPattern> kids = new ArrayList<ParsedPattern>();
+ List<ParsedPattern> kids = new ArrayList<>();
for( DPattern c=p.firstChild(); c!=null; c=c.next )
- kids.add( (ParsedPattern)c.accept(this) );
+ kids.add(c.accept(this));
return sb.makeGroup(kids,parseLocation(p),null);
}
public ParsedPattern onInterleave(DInterleavePattern p) {
- List<ParsedPattern> kids = new ArrayList<ParsedPattern>();
+ List<ParsedPattern> kids = new ArrayList<>();
for( DPattern c=p.firstChild(); c!=null; c=c.next )
- kids.add( (ParsedPattern)c.accept(this) );
+ kids.add(c.accept(this));
return sb.makeInterleave(kids,parseLocation(p),null);
}
public ParsedPattern onList(DListPattern p) {
return sb.makeList(
- (ParsedPattern)p.getChild().accept(this),
+ p.getChild().accept(this),
parseLocation(p),
parseAnnotation(p) );
}
public ParsedPattern onMixed(DMixedPattern p) {
return sb.makeMixed(
- (ParsedPattern)p.getChild().accept(this),
+ p.getChild().accept(this),
parseLocation(p),
parseAnnotation(p) );
}
@@ -158,14 +158,14 @@
public ParsedPattern onOneOrMore(DOneOrMorePattern p) {
return sb.makeOneOrMore(
- (ParsedPattern)p.getChild().accept(this),
+ p.getChild().accept(this),
parseLocation(p),
parseAnnotation(p) );
}
public ParsedPattern onOptional(DOptionalPattern p) {
return sb.makeOptional(
- (ParsedPattern)p.getChild().accept(this),
+ p.getChild().accept(this),
parseLocation(p),
parseAnnotation(p) );
}
@@ -194,7 +194,7 @@
public ParsedPattern onZeroOrMore(DZeroOrMorePattern p) {
return sb.makeZeroOrMore(
- (ParsedPattern)p.getChild().accept(this),
+ p.getChild().accept(this),
parseLocation(p),
parseAnnotation(p) );
}
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/nc/NameClass.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/nc/NameClass.java
index dac6157..301ac44 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/nc/NameClass.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/nc/NameClass.java
@@ -66,7 +66,7 @@
* is undefined.
*/
public Set<QName> listNames() {
- final Set<QName> names = new HashSet<QName>();
+ final Set<QName> names = new HashSet<>();
accept(new NameClassWalker() {
@Override
public Void visitName(QName name) {
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/Context.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/Context.java
index 57594bd..70082a9 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/Context.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/Context.java
@@ -36,7 +36,7 @@
Enumeration prefixes();
/**
- * Returns the immutable snapshot of this {@link Context}.
+ * Returns the immutable snapshot of this .
*/
Context copy();
}
\ No newline at end of file
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/Parseable.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/Parseable.java
index 7bdd928..50acfa8 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/Parseable.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/Parseable.java
@@ -21,14 +21,6 @@
*/
package com.sun.tools.rngom.parse;
-import com.sun.tools.rngom.ast.builder.Annotations;
-import com.sun.tools.rngom.ast.builder.BuildException;
-import com.sun.tools.rngom.ast.builder.Include;
-import com.sun.tools.rngom.ast.builder.IncludedGrammar;
-import com.sun.tools.rngom.ast.builder.SchemaBuilder;
-import com.sun.tools.rngom.ast.builder.Scope;
-import com.sun.tools.rngom.ast.om.Location;
-import com.sun.tools.rngom.ast.om.ParsedPattern;
import com.sun.tools.rngom.ast.builder.*;
import com.sun.tools.rngom.ast.om.*;
@@ -41,7 +33,7 @@
*/
public interface Parseable {
/**
- * Parses this {@link Parseable} object into a RELAX NG pattern.
+ * Parses this object into a RELAX NG pattern.
*
* @param sb
* The builder of the schema object model. This object
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/CompactSyntax.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/CompactSyntax.java
index d410b56..d6c61f7 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/CompactSyntax.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/CompactSyntax.java
@@ -317,7 +317,7 @@
Location loc = makeLocation(t);
if (t.next != null
&& t.next.kind == CompactSyntaxConstants.SINGLE_LINE_COMMENT_CONTINUE) {
- StringBuffer buf = new StringBuffer(s);
+ StringBuilder buf = new StringBuilder(s);
do {
t = t.next;
buf.append('\u005cn');
@@ -778,8 +778,7 @@
}
}
namespaceTable.put("xml", WellKnownNamespaces.XML);
- if (datatypesTable.get("xsd") == null)
- datatypesTable.put("xsd", WellKnownNamespaces.XML_SCHEMA_DATATYPES);
+ datatypesTable.putIfAbsent("xsd", WellKnownNamespaces.XML_SCHEMA_DATATYPES);
}
final public void NamespaceDecl() throws ParseException {
@@ -2493,12 +2492,12 @@
final public String Literal() throws ParseException {
Token t;
String s;
- StringBuffer buf;
+ StringBuilder buf;
t = jj_consume_token(LITERAL);
s = unquote(t.image);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 8:
- buf = new StringBuffer(s);
+ buf = new StringBuilder(s);
label_26:
while (true) {
jj_consume_token(8);
@@ -2527,12 +2526,12 @@
Token t;
Token t2;
String s;
- StringBuffer buf;
+ StringBuilder buf;
t = jj_consume_token(LITERAL);
s = unquote(t.image);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 8:
- buf = new StringBuffer(s);
+ buf = new StringBuilder(s);
label_27:
while (true) {
jj_consume_token(8);
@@ -3242,7 +3241,7 @@
return (jj_ntk = jj_nt.kind);
}
- private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
+ private java.util.List<int[]> jj_expentries = new java.util.ArrayList<>();
private int[] jj_expentry;
private int jj_kind = -1;
private int[] jj_lasttokens = new int[100];
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/CompactSyntaxTokenManager.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/CompactSyntaxTokenManager.java
index 98c44c8..81a2a9f 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/CompactSyntaxTokenManager.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/CompactSyntaxTokenManager.java
@@ -30,7 +30,7 @@
public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
+private int jjStopStringLiteralDfa_0(int pos, long active0)
{
switch (pos)
{
@@ -137,7 +137,7 @@
return -1;
}
}
-private final int jjStartNfa_0(int pos, long active0)
+private int jjStartNfa_0(int pos, long active0)
{
return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
}
@@ -1002,7 +1002,7 @@
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = curChar >> 8;
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -1256,7 +1256,7 @@
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = curChar >> 8;
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -1396,7 +1396,7 @@
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = curChar >> 8;
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -1437,7 +1437,7 @@
16, 17, 18, 19, 21, 25, 26, 27, 28, 30, 35, 36, 38, 39, 40, 10,
11, 13, 14, 3, 6, 7, 8,
};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
+private static boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
switch(hiByte)
{
@@ -1449,7 +1449,7 @@
return false;
}
}
-private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
+private static boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
{
switch(hiByte)
{
@@ -1505,7 +1505,7 @@
return false;
}
}
-private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2)
+private static boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2)
{
switch(hiByte)
{
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/JavaCharStream.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/JavaCharStream.java
index 696bfa9..77aaa43 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/JavaCharStream.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/JavaCharStream.java
@@ -86,8 +86,8 @@
int bufsize;
int available;
int tokenBegin;
- protected int bufline[];
- protected int bufcolumn[];
+ protected int[] bufline;
+ protected int[] bufcolumn;
protected int column = 0;
protected int line = 1;
@@ -110,8 +110,8 @@
protected void ExpandBuff(boolean wrapAround)
{
char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
+ int[] newbufline = new int[bufsize + 2048];
+ int[] newbufcolumn = new int[bufsize + 2048];
try
{
@@ -368,20 +368,20 @@
}
}
- @Deprecated
/**
* @deprecated
* @see #getEndColumn
*/
+ @Deprecated
public int getColumn() {
return bufcolumn[bufpos];
}
- @Deprecated
/**
* @deprecated
* @see #getEndLine
*/
+ @Deprecated
public int getLine() {
return bufline[bufpos];
}
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 a9aa0c0..0658614 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
@@ -110,7 +110,7 @@
int[][] expectedTokenSequences,
String[] tokenImage) {
String eol = System.getProperty("line.separator", "\n");
- StringBuffer expected = new StringBuffer();
+ StringBuilder expected = new StringBuilder();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
if (maxSize < expectedTokenSequences[i].length) {
@@ -124,29 +124,29 @@
}
expected.append(eol).append(" ");
}
- String retval = "Encountered \"";
+ StringBuilder retval = new StringBuilder("Encountered \"");
Token tok = currentToken.next;
for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += " ";
+ if (i != 0) retval.append(" ");
if (tok.kind == 0) {
- retval += tokenImage[0];
+ retval.append(tokenImage[0]);
break;
}
- retval += " " + tokenImage[tok.kind];
- retval += " \"";
- retval += add_escapes(tok.image);
- retval += " \"";
+ retval.append(" ").append(tokenImage[tok.kind]);
+ retval.append(" \"");
+ retval.append(add_escapes(tok.image));
+ retval.append(" \"");
tok = tok.next;
}
- retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
- retval += "." + eol;
+ retval.append("\" at line ").append(currentToken.next.beginLine).append(", column ").append(currentToken.next.beginColumn);
+ retval.append(".").append(eol);
if (expectedTokenSequences.length == 1) {
- retval += "Was expecting:" + eol + " ";
+ retval.append("Was expecting:").append(eol).append(" ");
} else {
- retval += "Was expecting one of:" + eol + " ";
+ retval.append("Was expecting one of:").append(eol).append(" ");
}
- retval += expected.toString();
- return retval;
+ retval.append(expected.toString());
+ return retval.toString();
}
/**
@@ -160,7 +160,7 @@
* string literal.
*/
static String add_escapes(String str) {
- StringBuffer retval = new StringBuffer();
+ StringBuilder retval = new StringBuilder();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
@@ -186,7 +186,7 @@
retval.append("\\\"");
continue;
case '\'':
- retval.append("\\\'");
+ retval.append("\\'");
continue;
case '\\':
retval.append("\\\\");
@@ -194,7 +194,7 @@
default:
if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+ retval.append("\\u").append(s.substring(s.length() - 4));
} else {
retval.append(ch);
}
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/TokenMgrError.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/TokenMgrError.java
index 1e8f94f..3a6af31 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/TokenMgrError.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/TokenMgrError.java
@@ -69,7 +69,7 @@
* equivalents in the given string
*/
protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
+ StringBuilder retval = new StringBuilder();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
@@ -95,7 +95,7 @@
retval.append("\\\"");
continue;
case '\'':
- retval.append("\\\'");
+ retval.append("\\'");
continue;
case '\\':
retval.append("\\\\");
@@ -103,7 +103,7 @@
default:
if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+ retval.append("\\u").append(s.substring(s.length() - 4));
} else {
retval.append(ch);
}
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/UCode_UCodeESC_CharStream.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/UCode_UCodeESC_CharStream.java
index d5d0723..8e35817 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/UCode_UCodeESC_CharStream.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/compact/UCode_UCodeESC_CharStream.java
@@ -37,7 +37,7 @@
public static final boolean staticFlag = false;
- static final int hexval(char c) {
+ static int hexval(char c) {
switch (c) {
case '0':
return 0;
@@ -85,8 +85,8 @@
int bufsize;
int available;
int tokenBegin;
- private int bufline[];
- private int bufcolumn[];
+ private int[] bufline;
+ private int[] bufcolumn;
private int column = 0;
private int line = 1;
private java.io.Reader inputStream;
@@ -98,10 +98,10 @@
private int nextCharInd = -1;
private int inBuf = 0;
- private final void ExpandBuff(boolean wrapAround) {
+ private void ExpandBuff(boolean wrapAround) {
char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
+ int[] newbufline = new int[bufsize + 2048];
+ int[] newbufcolumn = new int[bufsize + 2048];
if (wrapAround) {
System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
@@ -135,7 +135,7 @@
tokenBegin = 0;
}
- private final void FillBuff() throws EOFException {
+ private void FillBuff() throws EOFException {
int i;
if (maxNextCharInd == 4096) {
maxNextCharInd = nextCharInd = 0;
@@ -157,7 +157,7 @@
}
}
- private final char ReadChar() throws EOFException {
+ private char ReadChar() throws EOFException {
if (++nextCharInd >= maxNextCharInd) {
FillBuff();
}
@@ -165,13 +165,13 @@
return nextCharBuf[nextCharInd];
}
- private final char PeekChar() throws EOFException {
+ private char PeekChar() throws EOFException {
char c = ReadChar();
--nextCharInd;
return c;
}
- public final char BeginToken() throws EOFException {
+ public char BeginToken() throws EOFException {
if (inBuf > 0) {
--inBuf;
return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0)
@@ -184,7 +184,7 @@
return readChar();
}
- private final void AdjustBuffSize() {
+ private void AdjustBuffSize() {
if (available == bufsize) {
if (tokenBegin > 2048) {
bufpos = 0;
@@ -201,7 +201,7 @@
}
}
- private final void UpdateLineColumn(char c) {
+ private void UpdateLineColumn(char c) {
column++;
if (prevCharIsLF) {
@@ -226,7 +226,7 @@
}
private static final char NEWLINE_MARKER = '\u0000';
- public final char readChar() throws EOFException {
+ public char readChar() throws EOFException {
if (inBuf > 0) {
--inBuf;
return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos];
@@ -387,34 +387,36 @@
/**
* @deprecated @see #getEndColumn
*/
- public final int getColumn() {
+ @Deprecated
+ public int getColumn() {
return bufcolumn[bufpos];
}
/**
* @deprecated @see #getEndLine
*/
- public final int getLine() {
+ @Deprecated
+ public int getLine() {
return bufline[bufpos];
}
- public final int getEndColumn() {
+ public int getEndColumn() {
return bufcolumn[bufpos];
}
- public final int getEndLine() {
+ public int getEndLine() {
return bufline[bufpos];
}
- public final int getBeginColumn() {
+ public int getBeginColumn() {
return bufcolumn[tokenBegin];
}
- public final int getBeginLine() {
+ public int getBeginLine() {
return bufline[tokenBegin];
}
- public final void backup(int amount) {
+ public void backup(int amount) {
inBuf += amount;
if ((bufpos -= amount) < 0) {
@@ -496,7 +498,7 @@
}
}
- public final String GetImage() {
+ public String GetImage() {
if (bufpos >= tokenBegin) {
return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
} else {
@@ -505,7 +507,7 @@
}
}
- public final char[] GetSuffix(int len) {
+ public char[] GetSuffix(int len) {
char[] ret = new char[len];
if ((bufpos + 1) >= len) {
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/host/NameClassBuilderHost.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/host/NameClassBuilderHost.java
index f3d9789..108b6ba 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/host/NameClassBuilderHost.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/host/NameClassBuilderHost.java
@@ -74,8 +74,8 @@
}
public ParsedNameClass makeChoice(List _nameClasses, Location _loc, Annotations _anno) {
- List<ParsedNameClass> lnc = new ArrayList<ParsedNameClass>();
- List<ParsedNameClass> rnc = new ArrayList<ParsedNameClass>();
+ List<ParsedNameClass> lnc = new ArrayList<>();
+ List<ParsedNameClass> rnc = new ArrayList<>();
for( int i=0; i<_nameClasses.size(); i++ ) {
lnc.add(((ParsedNameClassHost)_nameClasses.get(i)).lhs);
rnc.add(((ParsedNameClassHost)_nameClasses.get(i)).rhs);
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/host/SchemaBuilderHost.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/host/SchemaBuilderHost.java
index 7fbf8c0..5753112 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/host/SchemaBuilderHost.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/host/SchemaBuilderHost.java
@@ -123,8 +123,8 @@
public ParsedPattern makeChoice(List patterns,
Location _loc, Annotations _anno) throws BuildException {
- List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
- List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
+ List<ParsedPattern> lp = new ArrayList<>();
+ List<ParsedPattern> rp = new ArrayList<>();
for( int i=0; i<patterns.size(); i++ ) {
lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
@@ -215,8 +215,8 @@
public ParsedPattern makeGroup(List patterns,
Location _loc, Annotations _anno) throws BuildException {
- List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
- List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
+ List<ParsedPattern> lp = new ArrayList<>();
+ List<ParsedPattern> rp = new ArrayList<>();
for( int i=0; i<patterns.size(); i++ ) {
lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
@@ -232,8 +232,8 @@
public ParsedPattern makeInterleave(List patterns,
Location _loc, Annotations _anno) throws BuildException {
- List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
- List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
+ List<ParsedPattern> lp = new ArrayList<>();
+ List<ParsedPattern> rp = new ArrayList<>();
for( int i=0; i<patterns.size(); i++ ) {
lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/xml/SchemaParser.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/xml/SchemaParser.java
index 3ee383d..8ebef2e 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/xml/SchemaParser.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/parse/xml/SchemaParser.java
@@ -159,7 +159,7 @@
}
}
- static interface CommentHandler {
+ interface CommentHandler {
void comment(String value);
}
@@ -447,7 +447,7 @@
}
}
- public void characters(char ch[], int start, int length) {
+ public void characters(char[] ch, int start, int length) {
if (textBuf == null) {
textBuf = new StringBuffer();
}
@@ -547,7 +547,7 @@
@Override
void endChild(ParsedPattern pattern) {
if (childPatterns == null) {
- childPatterns = new ArrayList<ParsedPattern>(INIT_CHILD_ALLOC);
+ childPatterns = new ArrayList<>(INIT_CHILD_ALLOC);
}
childPatterns.add(pattern);
}
@@ -671,7 +671,7 @@
}
}
- static interface NameClassRef {
+ interface NameClassRef {
void setNameClass(ParsedNameClass nc);
}
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/util/Localizer.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/util/Localizer.java
index 12a2b9d..3616a60 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/util/Localizer.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/util/Localizer.java
@@ -64,12 +64,11 @@
public String message(String key, Object arg) {
return MessageFormat.format(getString(key),
- new Object[]{arg});
+ arg);
}
public String message(String key, Object arg1, Object arg2) {
- return MessageFormat.format(getString(key), new Object[]{
- arg1, arg2});
+ return MessageFormat.format(getString(key), arg1, arg2);
}
public String message(String key, Object[] args) {
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/util/Uri.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/util/Uri.java
index 0e935d1..5821210 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/util/Uri.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/util/Uri.java
@@ -35,7 +35,7 @@
private static final String HEX_DIGITS = "0123456789abcdef";
public static String escapeDisallowedChars(String s) {
- StringBuffer buf = null;
+ StringBuilder buf = null;
int len = s.length();
int done = 0;
for (;;) {
@@ -51,7 +51,7 @@
i++;
}
if (buf == null)
- buf = new StringBuffer();
+ buf = new StringBuilder();
if (i > done) {
buf.append(s.substring(done, i));
done = i;
diff --git a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/xml/sax/JAXPXMLReaderCreator.java b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/xml/sax/JAXPXMLReaderCreator.java
index 585d95e..c749065 100644
--- a/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/xml/sax/JAXPXMLReaderCreator.java
+++ b/jaxb-ri/external/rngom/src/main/java/com/sun/tools/rngom/xml/sax/JAXPXMLReaderCreator.java
@@ -48,7 +48,7 @@
}
/**
- * Creates a {@link JAXPXMLReaderCreator} by using
+ * Creates a by using
* {@link SAXParserFactory#newInstance()}.
*/
public JAXPXMLReaderCreator() {
@@ -65,9 +65,6 @@
}
}
- /**
- * @see XMLReaderCreator#createXMLReader()
- */
public XMLReader createXMLReader() throws SAXException {
try {
return spf.newSAXParser().getXMLReader();
diff --git a/jaxb-ri/external/rngom/src/main/java/module-info.java b/jaxb-ri/external/rngom/src/main/java/module-info.java
index 718a673..4421a18 100644
--- a/jaxb-ri/external/rngom/src/main/java/module-info.java
+++ b/jaxb-ri/external/rngom/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
@@ -13,8 +13,8 @@
*/
module com.sun.tools.rngom {
- requires com.sun.tools.rngdatatype;
- requires java.xml;
+ requires transitive com.sun.tools.rngdatatype;
+ requires transitive java.xml;
requires java.logging;
exports com.sun.tools.rngom.parse;
diff --git a/jaxb-ri/external/rngom/src/test/java/com/sun/tools/rngom/dump/Dumper.java b/jaxb-ri/external/rngom/src/test/java/com/sun/tools/rngom/dump/Dumper.java
index 4ff0778..a9ec6a7 100644
--- a/jaxb-ri/external/rngom/src/test/java/com/sun/tools/rngom/dump/Dumper.java
+++ b/jaxb-ri/external/rngom/src/test/java/com/sun/tools/rngom/dump/Dumper.java
@@ -85,7 +85,7 @@
private ParsedPattern makeNode(List patterns, Location loc, Annotations anno) {
for( int i=0; i<patterns.size(); i++ )
- printer.param((ParsedPattern)patterns.get(i));
+ printer.param(patterns.get(i));
printer.param(loc).param(anno);
return printer.result(factory.createPattern());
}
diff --git a/jaxb-ri/external/rngom/src/test/java/com/sun/tools/rngom/dump/Printer.java b/jaxb-ri/external/rngom/src/test/java/com/sun/tools/rngom/dump/Printer.java
index 3ba4ac0..e658bf8 100644
--- a/jaxb-ri/external/rngom/src/test/java/com/sun/tools/rngom/dump/Printer.java
+++ b/jaxb-ri/external/rngom/src/test/java/com/sun/tools/rngom/dump/Printer.java
@@ -84,7 +84,7 @@
}
public Printer param(int i) {
- return param(new Integer(i));
+ return param(Integer.valueOf(i));
}
private Object r( Object r ) {
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ApBasedTask.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ApBasedTask.java
index 4eb6784..e4527dc 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ApBasedTask.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ApBasedTask.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
@@ -15,7 +15,6 @@
import org.apache.tools.ant.taskdefs.Javac;
import org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter;
import org.apache.tools.ant.types.Commandline;
-import org.apache.tools.ant.util.StringUtils;
import javax.annotation.processing.Processor;
import javax.tools.DiagnosticCollector;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/NGCCRuntimeEx.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/NGCCRuntimeEx.java
index dc611ca..17f57b7 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/NGCCRuntimeEx.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/NGCCRuntimeEx.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
@@ -70,7 +70,7 @@
* A list of regular expression patterns {@link Pattern}
*/
public List<Pattern> getIncludePatterns(List<String> includeContent ) {
- List<Pattern> includeRegexList = new ArrayList<Pattern>();
+ List<Pattern> includeRegexList = new ArrayList<>();
for (String includes : includeContent) {
String regex = convertToRegex(includes);
Pattern pattern = Pattern.compile(regex);
@@ -89,7 +89,7 @@
* A list of regular expression patterns {@link Pattern}
*/
public List<Pattern> getExcludePatterns(List<String> excludeContent ) {
- List<Pattern> excludeRegexList = new ArrayList<Pattern>();
+ List<Pattern> excludeRegexList = new ArrayList<>();
for (String excludes : excludeContent) {
String regex = convertToRegex(excludes);
Pattern pattern = Pattern.compile(regex);
@@ -101,7 +101,6 @@
/**
* This will tokenize the pattern and convert it into a regular expression
- * @param pattern
*/
private String convertToRegex(String pattern) {
StringBuilder regex = new StringBuilder();
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenerator.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenerator.java
index 8518490..17c2677 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenerator.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenerator.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
@@ -146,7 +146,7 @@
aptargs.addAll(options.arguments);
- String[] argsarray = aptargs.toArray(new String[aptargs.size()]);
+ String[] argsarray = aptargs.toArray(new String[0]);
return ((Boolean) compileMethod.invoke(null, argsarray, options.episodeFile)) ? 0 : 1;
}
@@ -212,9 +212,7 @@
if (f.exists() && f.getName().endsWith(".jar")) { // this is here for potential backw. compatibility issues
return f.getPath();
}
- } catch (URISyntaxException ex) {
- LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
- } catch (MalformedURLException ex) {
+ } catch (URISyntaxException | MalformedURLException ex) {
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
}
return null;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGeneratorFacade.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGeneratorFacade.java
index 2a8698a..ebf4881 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGeneratorFacade.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGeneratorFacade.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,11 +25,9 @@
if(cl==null) cl = SecureLoader.getSystemClassLoader();
Class<?> driver = cl.loadClass("com.sun.tools.jxc.SchemaGenerator");
- Method mainMethod = driver.getDeclaredMethod("main", new Class<?>[]{String[].class});
+ 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/jxc/src/main/java/com/sun/tools/jxc/SecureLoader.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SecureLoader.java
index ded0585..6963e20 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SecureLoader.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SecureLoader.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
@@ -23,7 +23,7 @@
return Thread.currentThread().getContextClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -37,7 +37,7 @@
return c.getClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return c.getClassLoader();
@@ -51,7 +51,7 @@
return ClassLoader.getSystemClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return ClassLoader.getSystemClassLoader();
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 63af3c0..76a006d 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
@@ -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
@@ -84,7 +84,7 @@
}
try {
- Collection<TypeElement> rootElements = new ArrayList<TypeElement>();
+ Collection<TypeElement> rootElements = new ArrayList<>();
filterClass(rootElements, roundEnv.getRootElements());
ConfigReader configReader = new ConfigReader(
processingEnv,
@@ -95,7 +95,7 @@
Collection<Reference> classesToBeIncluded = configReader.getClassesToBeIncluded();
J2SJAXBModel model = JXC.createJavaCompiler().bind(
- classesToBeIncluded, Collections.<QName, Reference>emptyMap(), null, processingEnv);
+ classesToBeIncluded, Collections.emptyMap(), null, processingEnv);
SchemaOutputResolver schemaOutputResolver = configReader.getSchemaOutputResolver();
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 fa20453..b44ee7a 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
@@ -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 @@
private String value;
- private Const(String value) {
+ Const(String value) {
this.value = value;
}
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/InlineAnnotationReaderImpl.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/InlineAnnotationReaderImpl.java
index 4fc7d21..4be7573 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/InlineAnnotationReaderImpl.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/InlineAnnotationReaderImpl.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
@@ -86,7 +86,7 @@
* Gets all the annotations on the given declaration.
*/
private Annotation[] getAllAnnotations(Element decl, Locatable srcPos) {
- List<Annotation> r = new ArrayList<Annotation>();
+ List<Annotation> r = new ArrayList<>();
for( AnnotationMirror m : decl.getAnnotationMirrors() ) {
try {
@@ -101,12 +101,12 @@
}
}
- return r.toArray(new Annotation[r.size()]);
+ return r.toArray(new Annotation[0]);
}
@Override
public <A extends Annotation> A getMethodParameterAnnotation(Class<A> a, ExecutableElement m, int paramIndex, Locatable srcPos) {
- VariableElement[] params = m.getParameters().toArray(new VariableElement[m.getParameters().size()]);
+ VariableElement[] params = m.getParameters().toArray(new VariableElement[0]);
return LocatableAnnotation.create(
params[paramIndex].getAnnotation(a), srcPos );
}
@@ -152,7 +152,7 @@
if( e.getCause() instanceof MirroredTypesException ) {
MirroredTypesException me = (MirroredTypesException)e.getCause();
Collection<? extends TypeMirror> r = me.getTypeMirrors();
- return r.toArray(new TypeMirror[r.size()]);
+ return r.toArray(new TypeMirror[0]);
}
// *********************** TODO: jdk6 bug. Fixed in java7
// According to the javadocs it should throw the MirroredTypesException
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/Options.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/Options.java
index b757e34..5c573a0 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/Options.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/Options.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,7 +38,7 @@
// encoding is not required for JDK5, 6, but JDK 7 javac is much more strict - see issue 6859289
public String encoding = null;
- public final List<String> arguments = new ArrayList<String>();
+ public final List<String> arguments = new ArrayList<>();
public void parseArguments(String[] args) throws BadCommandLineException {
for (int i = 0 ; i <args.length; i++) {
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 6e91746..219665b 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
@@ -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
@@ -54,7 +54,7 @@
/**
* User-specified schema locations, if any.
*/
- private final Map<String,File> schemaLocations = new HashMap<String, File>();
+ private final Map<String,File> schemaLocations = new HashMap<>();
private File episodeFile;
@@ -73,12 +73,12 @@
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
final ErrorReceiverImpl errorListener = new ErrorReceiverImpl(processingEnv);
- List<Reference> classesToBeBound = new ArrayList<Reference>();
+ List<Reference> classesToBeBound = new ArrayList<>();
// simply ignore all the interface definitions,
// so that users won't have to manually exclude interfaces, which is silly.
filterClass(classesToBeBound, roundEnv.getRootElements());
- J2SJAXBModel model = JXC.createJavaCompiler().bind(classesToBeBound, Collections.<QName, Reference>emptyMap(), null, processingEnv);
+ J2SJAXBModel model = JXC.createJavaCompiler().bind(classesToBeBound, Collections.emptyMap(), null, processingEnv);
if (model == null)
return false; // error
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/SecureLoader.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/SecureLoader.java
index 22e762b..074df66 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/SecureLoader.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ap/SecureLoader.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
@@ -23,7 +23,7 @@
return Thread.currentThread().getContextClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -37,7 +37,7 @@
return c.getClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return c.getClassLoader();
@@ -51,7 +51,7 @@
return ClassLoader.getSystemClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return ClassLoader.getSystemClassLoader();
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/api/impl/j2s/JAXBModelImpl.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/api/impl/j2s/JAXBModelImpl.java
index e1bc038..eb6db14 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/api/impl/j2s/JAXBModelImpl.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/api/impl/j2s/JAXBModelImpl.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,7 +51,7 @@
private final Map<QName,Reference> additionalElementDecls;
- private final List<String> classList = new ArrayList<String>();
+ private final List<String> classList = new ArrayList<>();
private final TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types;
@@ -66,7 +66,7 @@
* Look up table from an externally visible {@link Reference} object
* to our internal format.
*/
- private final Map<Reference, NonElement<TypeMirror, TypeElement>> refMap = new HashMap<Reference, NonElement<TypeMirror, TypeElement>>();
+ private final Map<Reference, NonElement<TypeMirror, TypeElement>> refMap = new HashMap<>();
public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types,
AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader,
@@ -145,8 +145,8 @@
XmlJavaTypeAdapter xjta = r.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = r.annotations.getAnnotation(XmlList.class);
- Ref<TypeMirror, TypeElement> ref = new Ref<TypeMirror, TypeElement>(
- reader,types.getNavigator(),r.type,xjta,xl);
+ Ref<TypeMirror, TypeElement> ref = new Ref<>(
+ reader, types.getNavigator(), r.type, xjta, xl);
return types.getTypeInfo(ref);
}
@@ -163,7 +163,7 @@
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
if(xsdgen==null) {
- xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);
+ xsdgen = new XmlSchemaGenerator<>(types.getNavigator(), types);
for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
Reference value = e.getValue();
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/api/impl/j2s/JavaCompilerImpl.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/api/impl/j2s/JavaCompilerImpl.java
index 455611b..8bc75be 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/api/impl/j2s/JavaCompilerImpl.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/api/impl/j2s/JavaCompilerImpl.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
@@ -49,11 +49,11 @@
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
- new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
- InlineAnnotationReaderImpl.theInstance,
- new ApNavigator(env),
- Collections.<TypeElement, TypeElement>emptyMap(),
- defaultNamespaceRemap );
+ new ModelBuilder<>(
+ InlineAnnotationReaderImpl.theInstance,
+ new ApNavigator(env),
+ Collections.emptyMap(),
+ defaultNamespaceRemap);
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
@@ -63,7 +63,7 @@
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
- builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
+ builder.getTypeInfo(new Ref<>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
@@ -78,7 +78,7 @@
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
- return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
+ return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<>(additionalElementDecls));
}
private static final class ErrorHandlerImpl implements ErrorHandler {
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/AttributesImpl.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/AttributesImpl.java
index ebcc569..6977edd 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/AttributesImpl.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/AttributesImpl.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
@@ -100,7 +100,6 @@
* Return the number of attributes in the list.
*
* @return The number of attributes in the list.
- * @see org.xml.sax.Attributes#getLength
*/
@Override
public int getLength ()
@@ -115,7 +114,6 @@
* @param index The attribute's index (zero-based).
* @return The Namespace URI, the empty string if none is
* available, or null if the index is out of range.
- * @see org.xml.sax.Attributes#getURI
*/
@Override
public String getURI (int index)
@@ -134,7 +132,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's local name, the empty string if
* none is available, or null if the index if out of range.
- * @see org.xml.sax.Attributes#getLocalName
*/
@Override
public String getLocalName (int index)
@@ -153,7 +150,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's qualified name, the empty string if
* none is available, or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getQName
*/
@Override
public String getQName (int index)
@@ -172,7 +168,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's type, "CDATA" if the type is unknown, or null
* if the index is out of bounds.
- * @see org.xml.sax.Attributes#getType(int)
*/
@Override
public String getType (int index)
@@ -190,7 +185,6 @@
*
* @param index The attribute's index (zero-based).
* @return The attribute's value or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getValue(int)
*/
@Override
public String getValue (int index)
@@ -214,7 +208,6 @@
* string if none is available.
* @param localName The attribute's local name.
* @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String,java.lang.String)
*/
@Override
public int getIndex (String uri, String localName)
@@ -234,7 +227,6 @@
*
* @param qName The qualified name.
* @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String)
*/
@Override
public int getIndex (String qName)
@@ -257,7 +249,6 @@
* @param localName The local name.
* @return The attribute's type, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String,java.lang.String)
*/
@Override
public String getType (String uri, String localName)
@@ -278,7 +269,6 @@
* @param qName The qualified name.
* @return The attribute's type, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String)
*/
@Override
public String getType (String qName)
@@ -301,7 +291,6 @@
* @param localName The local name.
* @return The attribute's value, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String,java.lang.String)
*/
@Override
public String getValue (String uri, String localName)
@@ -322,7 +311,6 @@
* @param qName The qualified name.
* @return The attribute's value, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String)
*/
@Override
public String getValue (String qName)
@@ -592,7 +580,7 @@
while (max < n * 5) {
max *= 2;
}
- String newData[] = new String[max];
+ String[] newData = new String[max];
System.arraycopy(data, 0, newData, 0, length*5);
data = newData;
}
@@ -619,7 +607,7 @@
////////////////////////////////////////////////////////////////////
int length;
- String data [];
+ String[] data;
}
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Classes.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Classes.java
index e78a885..9352e42 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Classes.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Classes.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
@@ -11,7 +11,6 @@
/* this file is generated by RelaxNGCC */
package com.sun.tools.jxc.gen.config;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
import com.sun.tools.jxc.NGCCRuntimeEx;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Config.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Config.java
index 6c17ad7..6fb9a0c 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Config.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Config.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
@@ -11,11 +11,8 @@
/* this file is generated by RelaxNGCC */
package com.sun.tools.jxc.gen.config;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
import com.sun.tools.jxc.NGCCRuntimeEx;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.XMLReader;
import java.util.List;
import java.util.ArrayList;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java
index ef3f460..d4cc7ff 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.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
@@ -172,8 +172,8 @@
* }</pre>
*
* Then this first space needs to be ignored (for otherwise, we will
- * end up treating this space as the match to <text/> and won't
- * be able to process <bar>.)
+ * end up treating this space as the match to <text/> and won't
+ * be able to process <bar>.)
*
* Now assume the following instance:
* <pre>{@code
@@ -188,7 +188,7 @@
* easy solution is to use the type of next event. If a text is
* followed by a start tag, it follows from the constraint on
* RELAX NG that that text must be either whitespaces or a match
- * to <text/>.
+ * to <text/>.
*
* <p>
* On the contrary, if a text is followed by a end tag, then it
@@ -203,7 +203,7 @@
* <p>
* TODO: according to the constraint of RELAX NG, if characters
* follow an end tag, then they must be either whitespaces or
- * must match to <text/>.
+ * must match to <text/>.
*
* @param ignorable
* True if the buffered character can be ignorable. False if
@@ -548,10 +548,9 @@
protected void unexpectedX(String token) throws SAXException {
throw new SAXParseException(MessageFormat.format(
"Unexpected {0} appears at line {1} column {2}",
- new Object[]{
- token,
- getLocator().getLineNumber(),
- getLocator().getColumnNumber() }),
+ token,
+ getLocator().getLineNumber(),
+ getLocator().getColumnNumber()),
getLocator());
}
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Schema.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Schema.java
index 5e0ba20..c1e37e7 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Schema.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/Schema.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
@@ -11,7 +11,6 @@
/* this file is generated by RelaxNGCC */
package com.sun.tools.jxc.gen.config;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
import com.sun.tools.jxc.NGCCRuntimeEx;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java
index 7c1cd58..c5c605f 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.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
@@ -254,13 +254,13 @@
@Override
public VariableElement[] getEnumConstants(TypeElement clazz) {
List<? extends Element> elements = env.getElementUtils().getAllMembers(clazz);
- Collection<VariableElement> constants = new ArrayList<VariableElement>();
+ Collection<VariableElement> constants = new ArrayList<>();
for (Element element : elements) {
if (element.getKind().equals(ElementKind.ENUM_CONSTANT)) {
constants.add((VariableElement) element);
}
}
- return constants.toArray(new VariableElement[constants.size()]);
+ return constants.toArray(new VariableElement[0]);
}
@Override
@@ -349,7 +349,7 @@
public TypeMirror getTypeArgument(TypeMirror typeMirror, int i) {
if (typeMirror != null && typeMirror.getKind().equals(TypeKind.DECLARED)) {
DeclaredType declaredType = (DeclaredType) typeMirror;
- TypeMirror[] args = declaredType.getTypeArguments().toArray(new TypeMirror[declaredType.getTypeArguments().size()]);
+ TypeMirror[] args = declaredType.getTypeArguments().toArray(new TypeMirror[0]);
return args[i];
} else throw new IllegalArgumentException();
}
@@ -499,7 +499,7 @@
/**
* Implements {@link #getBaseClass}.
*/
- private final SimpleTypeVisitor8<TypeMirror, TypeElement> baseClassFinder = new SimpleTypeVisitor8<TypeMirror, TypeElement>() {
+ private final SimpleTypeVisitor8<TypeMirror, TypeElement> baseClassFinder = new SimpleTypeVisitor8<>() {
@Override
public TypeMirror visitDeclared(DeclaredType t, TypeElement sup) {
if (t.asElement().equals(sup))
diff --git a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/AntExecutor.java b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/AntExecutor.java
index ef3730a..cc563aa 100644
--- a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/AntExecutor.java
+++ b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/AntExecutor.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
@@ -13,7 +13,6 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
@@ -30,7 +29,7 @@
public static int exec(File script, String... targets) throws IOException {
File heapDump = null;
- List<String> cmd = new ArrayList<String>();
+ List<String> cmd = new ArrayList<>();
cmd.add("java");
if (DEBUG) {
cmd.add("-Xdebug");
diff --git a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/ap/SchemaGeneratorTest.java b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/ap/SchemaGeneratorTest.java
index 7b787a8..7043556 100644
--- a/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/ap/SchemaGeneratorTest.java
+++ b/jaxb-ri/jxc/src/test/java/com/sun/tools/jxc/ap/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
@@ -64,7 +64,7 @@
classElement.getEnclosedElements(); result = Arrays.asList(nestedEnumElement, interfaceElement);
}};
- List<Reference> result = new ArrayList<Reference>();
+ List<Reference> result = new ArrayList<>();
SchemaGenerator sg = new SchemaGenerator();
Collection<TypeElement> elements = Collections.singletonList(interfaceElement);
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 efa2a6f..7796314 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
@@ -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
@@ -43,7 +43,7 @@
new Expectations() {
{
//The primitiveType is irrelevant for getEnumConstants() operations
- env.getTypeUtils().getPrimitiveType(TypeKind.BYTE); result = (PrimitiveType) null;
+ env.getTypeUtils().getPrimitiveType(TypeKind.BYTE); result = null;
//enumElements needs to return ENUM_CONSTANT for getEnumConstants() to work properly
enumElement1.getKind(); result = ElementKind.ENUM_CONSTANT;
enumElement2.getKind(); result = ElementKind.ENUM_CONSTANT;
diff --git a/jaxb-ri/pom.xml b/jaxb-ri/pom.xml
index 1f93e35..e095a6f 100644
--- a/jaxb-ri/pom.xml
+++ b/jaxb-ri/pom.xml
@@ -96,8 +96,13 @@
<oss.disallow.snapshots>true</oss.disallow.snapshots>
<vendor.name>Eclipse Foundation</vendor.name>
<vendor.id>org.eclipse</vendor.id>
+ <!-- exclude big groups from the Xlint -->
+ <comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
+ <!-- -Xdoclint:-missing does not seem to work properly on the infra -->
+ <comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
+ <warn.limit>150000</warn.limit>
<!-- too many to fix -->
- <jdoc.doclint>-missing</jdoc.doclint>
+ <jdoc.doclint>all,-missing</jdoc.doclint>
</properties>
<dependencyManagement>
@@ -176,10 +181,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.10.0</version>
- <configuration>
- <release>11</release>
- </configuration>
+ <version>3.10.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -462,8 +464,14 @@
<configuration>
<release>11</release>
<testRelease>11</testRelease>
- <compilerArgument>-Xlint:all</compilerArgument>
- <!--<XDignore.symbol.file/>-->
+ <compilerArgs combine.children="append">
+ <arg>${comp.xlint}</arg>
+ <arg>${comp.xdoclint}</arg>
+ <arg>-Xmaxwarns</arg>
+ <arg>${warn.limit}</arg>
+ <arg>-Xmaxerrs</arg>
+ <arg>${warn.limit}</arg>
+ </compilerArgs>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/CycleRecoverable.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/CycleRecoverable.java
index 021d152..4e93693 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/CycleRecoverable.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/CycleRecoverable.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
@@ -41,7 +41,7 @@
* @return
* the object to be marshalled instead of {@code this} object.
* Or return null to indicate that the JAXB RI should behave
- * just like when your object does not implement {@link CycleRecoverable}
+ * just like when your object does not implement
* (IOW, cut the cycle arbitrarily and try to go on.)
*/
Object onCycleDetected(Context context);
@@ -54,7 +54,7 @@
* We may add more methods in the future, so please do not
* implement this interface in your application.
*/
- public interface Context {
+ interface Context {
/**
* Returns the marshaller object that's doing the marshalling.
*
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 c56ef02..0c8be4c 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
@@ -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
@@ -350,7 +350,7 @@
}
public static String _printDate(Calendar val) {
- return CalendarFormatter.doFormat((new StringBuilder("%Y-%M-%D").append("%z")).toString(),val);
+ return CalendarFormatter.doFormat("%Y-%M-%D" + "%z",val);
}
public static String _printInt(int val) {
@@ -709,10 +709,10 @@
return false;
}
- private static final Map<ClassLoader, DatatypeFactory> DF_CACHE = Collections.synchronizedMap(new WeakHashMap<ClassLoader, DatatypeFactory>());
+ private static final Map<ClassLoader, DatatypeFactory> DF_CACHE = Collections.synchronizedMap(new WeakHashMap<>());
public static DatatypeFactory getDatatypeFactory() {
- ClassLoader tccl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ ClassLoader tccl = AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -832,9 +832,9 @@
if (cal.isSet(Calendar.MILLISECOND)) { // milliseconds
int n = cal.get(Calendar.MILLISECOND);
if (n != 0) {
- String ms = Integer.toString(n);
+ StringBuilder ms = new StringBuilder(Integer.toString(n));
while (ms.length() < 3) {
- ms = '0' + ms; // left 0 paddings.
+ ms.insert(0, '0'); // left 0 paddings.
}
buf.append('.');
buf.append(ms);
@@ -954,7 +954,7 @@
@Override
public boolean parseBoolean(String lexicalXSDBoolean) {
Boolean b = _parseBoolean(lexicalXSDBoolean);
- return (b == null) ? false : b.booleanValue();
+ return b != null && b;
}
@Deprecated
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 852e353..e3bb00a 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
@@ -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,7 +59,7 @@
*
* <p>
* Since one {@link Unmarshaller} may be used multiple times
- * to unmarshal documents, one {@link IDResolver} may be used multiple times, too.
+ * to unmarshal documents, one may be used multiple times, too.
*
* @param eventHandler
* Any errors found during the unmarshalling should be reported to this object.
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/Bridge.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/Bridge.java
index dc9100f..9416d3a 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/Bridge.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/Bridge.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
@@ -90,7 +90,7 @@
/**
* Marshals the specified type object with the implicit element name
- * associated with this instance of {@link Bridge}.
+ * associated with this instance of .
*
* @param nsContext
* if this marshalling is done to marshal a subelement, this {@link NamespaceContext}
@@ -182,7 +182,7 @@
*
* @param in
* the parser must be pointing at a start tag
- * that encloses the XML type that this {@link Bridge} is
+ * that encloses the XML type that this is
* instanciated for.
*
* @return
@@ -214,7 +214,7 @@
*
* @param in
* the parser must be pointing at a start tag
- * that encloses the XML type that this {@link Bridge} is
+ * that encloses the XML type that this is
* instanciated for.
*
* @return
@@ -246,7 +246,7 @@
*
* @param in
* the parser must be pointing at a start tag
- * that encloses the XML type that this {@link Bridge} is
+ * that encloses the XML type that this is
* instanciated for.
*
* @return
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 1f35552..ee719c1 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
@@ -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
@@ -73,7 +73,7 @@
* @return
* If a non-null class is returned, it will be used to unmarshal this element.
* If null is returned, the resolution is assumed to be failed, and
- * the unmarshaller will behave as if there was no {@link ClassResolver}
+ * the unmarshaller will behave as if there was no
* to begin with (that is, to report it to {@link ValidationEventHandler},
* then move on.)
*
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.java
index 2ebeef0..eb55999 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.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,7 +43,7 @@
protected JAXBRIContext() {}
/**
- * Creates a new {@link JAXBRIContext}.
+ * Creates a new .
*
* <p>
* {@link JAXBContext#newInstance(Class[]) JAXBContext.newInstance()} methods may
@@ -78,7 +78,7 @@
}
/**
- * Creates a new {@link JAXBRIContext}.
+ * Creates a new .
*
* <p>
* {@link JAXBContext#newInstance(Class[]) JAXBContext.newInstance()} methods may
@@ -140,7 +140,7 @@
public static JAXBRIContext newInstance(@NotNull Class[] classes,
@Nullable Collection<TypeReference> typeRefs,
@Nullable String defaultNamespaceRemap, boolean c14nSupport ) throws JAXBException {
- return newInstance(classes,typeRefs, Collections.<Class,Class>emptyMap(),
+ return newInstance(classes,typeRefs, Collections.emptyMap(),
defaultNamespaceRemap,c14nSupport,null);
}
@@ -167,9 +167,6 @@
/**
* Allows to retrieve the element name based on Class.
- * @param o
- * @return
- * @throws jakarta.xml.bind.JAXBException
* @since 2.1.10
*/
public abstract @Nullable QName getElementName(@NotNull Class o) throws JAXBException;
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 03c2678..f304d28 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
@@ -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,8 +79,8 @@
}
/**
- * Creates a {@link TypeReference} for the item type,
- * if this {@link TypeReference} represents a collection type.
+ * Creates a for the item type,
+ * if this represents a collection type.
* Otherwise returns an identical type.
*/
public TypeReference toItemType() {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/Utils.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/Utils.java
index e4f357b..7e185e6 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/Utils.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,7 +43,7 @@
// requires accessClassInPackage privilege
final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
+ new PrivilegedAction<>() {
@Override
public Method run() {
try {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/util/AttributesImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/util/AttributesImpl.java
index 92daea5..a02ce90 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/util/AttributesImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/util/AttributesImpl.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
@@ -94,7 +94,6 @@
* Return the number of attributes in the list.
*
* @return The number of attributes in the list.
- * @see org.xml.sax.Attributes#getLength()
*/
@Override
public int getLength ()
@@ -109,7 +108,6 @@
* @param index The attribute's index (zero-based).
* @return The Namespace URI, the empty string if none is
* available, or null if the index is out of range.
- * @see org.xml.sax.Attributes#getURI(int)
*/
@Override
public String getURI (int index)
@@ -128,7 +126,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's local name, the empty string if
* none is available, or null if the index if out of range.
- * @see org.xml.sax.Attributes#getLocalName(int)
*/
@Override
public String getLocalName (int index)
@@ -147,7 +144,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's qualified name, the empty string if
* none is available, or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getQName(int)
*/
@Override
public String getQName (int index)
@@ -166,7 +162,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's type, "CDATA" if the type is unknown, or null
* if the index is out of bounds.
- * @see org.xml.sax.Attributes#getType(int)
*/
@Override
public String getType (int index)
@@ -184,7 +179,6 @@
*
* @param index The attribute's index (zero-based).
* @return The attribute's value or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getValue(int)
*/
@Override
public String getValue (int index)
@@ -208,7 +202,6 @@
* string if none is available.
* @param localName The attribute's local name.
* @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String,java.lang.String)
*/
@Override
public int getIndex (String uri, String localName)
@@ -241,7 +234,6 @@
*
* @param qName The qualified name.
* @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String)
*/
@Override
public int getIndex (String qName)
@@ -264,7 +256,6 @@
* @param localName The local name.
* @return The attribute's type, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String,java.lang.String)
*/
@Override
public String getType (String uri, String localName)
@@ -285,7 +276,6 @@
* @param qName The qualified name.
* @return The attribute's type, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String)
*/
@Override
public String getType (String qName)
@@ -308,7 +298,6 @@
* @param localName The local name.
* @return The attribute's value, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String,java.lang.String)
*/
@Override
public String getValue (String uri, String localName)
@@ -329,7 +318,6 @@
* @param qName The qualified name.
* @return The attribute's value, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String)
*/
@Override
public String getValue (String qName)
@@ -614,7 +602,7 @@
max *= 2;
}
- String newData[] = new String[max];
+ String[] newData = new String[max];
if (length > 0) {
System.arraycopy(data, 0, newData, 0, length*5);
}
@@ -643,7 +631,7 @@
////////////////////////////////////////////////////////////////////
int length;
- String data [];
+ String[] data;
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/util/ValidationEventLocatorExImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/util/ValidationEventLocatorExImpl.java
index 1f511f6..38708d9 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/util/ValidationEventLocatorExImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/util/ValidationEventLocatorExImpl.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,7 @@
*/
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("[url=");
buf.append(getURL());
buf.append(",line=");
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 a9f6a05..1b7368f 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
@@ -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,6 +25,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.logging.Level;
@@ -99,7 +100,7 @@
Collection<TypeReference> tr = getPropertyValue(properties, JAXBRIContext.TYPE_REFERENCES, Collection.class);
if (tr == null) {
- tr = Collections.<TypeReference>emptyList();
+ tr = Collections.emptyList();
}
Map<Class,Class> subclassReplacements;
@@ -156,17 +157,6 @@
/**
*
- * @param classes
- * @param typeRefs
- * @param subclassReplacements
- * @param defaultNsUri
- * @param c14nSupport
- * @param ar
- * @param xmlAccessorFactorySupport
- * @param allNillable
- * @param retainPropertyInfo
- * @return
- * @throws JAXBException
* @deprecated use {@code createContext(Class[] classes, Map<String,Object> properties)} method instead
*/
@Deprecated
@@ -182,18 +172,6 @@
/**
*
- * @param classes
- * @param typeRefs
- * @param subclassReplacements
- * @param defaultNsUri
- * @param c14nSupport
- * @param ar
- * @param xmlAccessorFactorySupport
- * @param allNillable
- * @param retainPropertyInfo
- * @param improvedXsiTypeHandling
- * @return
- * @throws JAXBException
* @deprecated use {@code createContext( Class[] classes, Map<String,Object> properties)} method instead
*/
@Deprecated
@@ -262,7 +240,7 @@
}
- return createContext(classes.toArray(new Class[classes.size()]),properties);
+ return createContext(classes.toArray(new Class[0]),properties);
}
/**
@@ -282,9 +260,7 @@
return null;
}
- BufferedReader in =
- new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8"));
- try {
+ try (BufferedReader in = new BufferedReader(new InputStreamReader(resourceAsStream, StandardCharsets.UTF_8))) {
FinalArrayList<Class> classes = new FinalArrayList<>();
String className = in.readLine();
while (className != null) {
@@ -301,14 +277,12 @@
try {
classes.add(classLoader.loadClass(pkg + '.' + className));
} catch (ClassNotFoundException e) {
- throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e);
+ throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource), e);
}
className = in.readLine();
}
return classes;
- } finally {
- in.close();
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/MUtils.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/MUtils.java
index c687d2c..5bca119 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/MUtils.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/MUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 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,7 +31,8 @@
final Module coreModule = org.glassfish.jaxb.core.v2.ClassFactory.class.getModule();
final Module rtModule = JAXBContextFactory.class.getModule();
- if (rtModule == coreModule) {
+ if (rtModule == coreModule || !rtModule.isNamed()) {
+ //we're either in a bundle or on the classpath
return;
}
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 aceb4af..413cdec 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
@@ -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 @@
/**
* List of {@link Quick} implementations keyed by their annotation type.
*/
- private static final Map<Class,Quick> quicks = new HashMap<Class, Quick>();
+ private static final Map<Class,Quick> quicks = new HashMap<>();
static {
for( Quick q : Init.getAll() ) {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/Quick.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/Quick.java
index bacb0e2..27cafde 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/Quick.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/annotation/Quick.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,7 +38,7 @@
/**
* Factory method to create a new instance of the same kind.
- * A {@link Quick} object also works as a factory of itself
+ * A object also works as a factory of itself
*/
protected abstract Quick newInstance( Locatable upstream, Annotation core );
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 84fe392..3c32308 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
@@ -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
@@ -99,11 +99,7 @@
Package p = clazz.getPackage();
if(p==null) return null;
- Map<Package,Annotation> cache = packageCache.get(a);
- if(cache==null) {
- cache = new HashMap<>();
- packageCache.put(a,cache);
- }
+ Map<Package, Annotation> cache = packageCache.computeIfAbsent(a, k -> new HashMap<>());
if(cache.containsKey(p))
return (A)cache.get(p);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/BuiltinLeafInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/BuiltinLeafInfoImpl.java
index 275e92b..577a003 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/BuiltinLeafInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/BuiltinLeafInfoImpl.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
@@ -72,7 +72,7 @@
}
/**
- * Creates all the {@link BuiltinLeafInfoImpl}s as specified in the spec.
+ * Creates all the s as specified in the spec.
*
* {@link LeafInfo}s are all defined by the spec.
*/
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 bf43b3f..112d900 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
@@ -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
@@ -67,7 +67,7 @@
/**
* Lazily computed.
*
- * To avoid the cyclic references of the form C1 --base--> C2 --property--> C1.
+ * To avoid the cyclic references of the form C1 --base--{@literal >} C2 --property--{@literal >} C1.
*/
private ClassInfoImpl<T,C,F,M> baseClass;
@@ -191,7 +191,7 @@
* so this method always return null.
*
* @deprecated
- * you shouldn't be invoking this method on {@link ClassInfoImpl}.
+ * you shouldn't be invoking this method on .
*/
@Override
@Deprecated
@@ -487,7 +487,7 @@
for( int i=0; i<used.length; i++ )
if(used[i]==null) {
String unusedName = propOrder[i];
- String nearest = EditDistance.findNearest(unusedName, new AbstractList<String>() {
+ String nearest = EditDistance.findNearest(unusedName, new AbstractList<>() {
@Override
public String get(int index) {
return properties.get(index).getName();
@@ -498,7 +498,7 @@
return properties.size();
}
});
- boolean isOverriding = (i > (properties.size()-1)) ? false : properties.get(i).hasAnnotation(OverrideAnnotationOf.class);
+ boolean isOverriding = i <= (properties.size() - 1) && properties.get(i).hasAnnotation(OverrideAnnotationOf.class);
if (!isOverriding) {
builder.reportError(new IllegalAnnotationException(
Messages.PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY.format(unusedName,nearest),ClassInfoImpl.this));
@@ -549,7 +549,7 @@
/**
* Represents 6 groups of secondary annotations
*/
- private static enum SecondaryAnnotation {
+ private enum SecondaryAnnotation {
JAVA_TYPE (0x01, XmlJavaTypeAdapter.class),
ID_IDREF (0x02, XmlID.class, XmlIDREF.class),
BINARY (0x04, XmlInlineBinaryData.class, XmlMimeType.class, XmlAttachmentRef.class),
@@ -581,7 +581,7 @@
* Each instance is also responsible for rejecting annotations
* that are not allowed on that kind.
*/
- private static enum PropertyGroup {
+ private enum PropertyGroup {
TRANSIENT (false,false,false,false,false,false),
ANY_ATTRIBUTE (true, false,false,false,false,false),
ATTRIBUTE (true, true, true, false,true, true ),
@@ -617,7 +617,7 @@
/**
* All the annotations in JAXB to their internal index.
*/
- private static final HashMap<Class,Integer> ANNOTATION_NUMBER_MAP = new HashMap<Class,Integer>();
+ private static final HashMap<Class,Integer> ANNOTATION_NUMBER_MAP = new HashMap<>();
static {
Class[] annotations = {
XmlTransient.class, // 0
@@ -1001,12 +1001,8 @@
// is this a set method?
propName = getPropertyNameFromSetMethod(name);
if(propName!=null && arity==1) {
- List<M> propSetters = allSetters.get(propName);
- if(null == propSetters){
- propSetters = new ArrayList<>();
- allSetters.put(propName, propSetters);
- }
- propSetters.add(method);
+ List<M> propSetters = allSetters.computeIfAbsent(propName, k -> new ArrayList<>());
+ propSetters.add(method);
used = true; // used check performed later
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ElementPropertyInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ElementPropertyInfoImpl.java
index 1f5de9a..8ece058 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ElementPropertyInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ElementPropertyInfoImpl.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,9 +38,9 @@
*/
private List<TypeRefImpl<TypeT,ClassDeclT>> types;
- private final List<TypeInfo<TypeT,ClassDeclT>> ref = new AbstractList<TypeInfo<TypeT,ClassDeclT>>() {
+ private final List<TypeInfo<TypeT,ClassDeclT>> ref = new AbstractList<>() {
@Override
- public TypeInfo<TypeT,ClassDeclT> get(int index) {
+ public TypeInfo<TypeT, ClassDeclT> get(int index) {
return getTypes().get(index).getTarget();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/EnumLeafInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/EnumLeafInfoImpl.java
index 7a620a6..21a0597 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/EnumLeafInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/EnumLeafInfoImpl.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
@@ -61,7 +61,6 @@
protected boolean tokenStringType;
/**
- * @param clazz
* @param type
* clazz and type should both point to the enum class
* that this {@link EnumLeafInfo} represents.
@@ -106,7 +105,7 @@
tokenStringType = true;
break;
}
- };
+ }
}
}
F[] constants = nav().getEnumConstants(clazz);
@@ -237,16 +236,17 @@
@Override
public Iterator<EnumConstantImpl<T,C,F,M>> iterator() {
- return new Iterator<EnumConstantImpl<T,C,F,M>>() {
- private EnumConstantImpl<T,C,F,M> next = firstConstant;
+ return new Iterator<>() {
+ private EnumConstantImpl<T, C, F, M> next = firstConstant;
+
@Override
public boolean hasNext() {
- return next!=null;
+ return next != null;
}
@Override
- public EnumConstantImpl<T,C,F,M> next() {
- EnumConstantImpl<T,C,F,M> r = next;
+ public EnumConstantImpl<T, C, F, M> next() {
+ EnumConstantImpl<T, C, F, M> r = next;
next = next.next;
return r;
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ModelBuilder.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ModelBuilder.java
index 29c10f3..9b03915 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ModelBuilder.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/ModelBuilder.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
@@ -120,7 +120,7 @@
typeInfoSet = createTypeInfoSet();
}
- /**
+ /*
* Makes sure that we are running with 2.1 JAXB API,
* and report an error if not.
*/
@@ -146,7 +146,7 @@
}
}
- /**
+ /*
* Makes sure that we don't have conflicting 1.0 runtime,
* and report an error if we do.
*/
@@ -162,7 +162,7 @@
}
}
- /**
+ /*
* Logger init
*/
static {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/PropertyInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/PropertyInfoImpl.java
index b0a580a..dd2fb9b 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/PropertyInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/PropertyInfoImpl.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
@@ -284,7 +284,7 @@
}
/**
- * A {@link PropertyInfoImpl} is always referenced by its enclosing class,
+ * A is always referenced by its enclosing class,
* so return that as the upstream.
*/
@Override
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 a150551..33a3e78 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
@@ -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,7 +16,6 @@
import org.glassfish.jaxb.runtime.DatatypeConverterImpl;
import org.glassfish.jaxb.runtime.api.AccessorException;
import org.glassfish.jaxb.core.v2.TODO;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeBuiltinLeafInfo;
import org.glassfish.jaxb.runtime.v2.runtime.Name;
import org.glassfish.jaxb.runtime.v2.runtime.Transducer;
@@ -156,7 +155,7 @@
/**
* All instances of {@link RuntimeBuiltinLeafInfoImpl}s keyed by their type.
*/
- public static final Map<Type,RuntimeBuiltinLeafInfoImpl<?>> LEAVES = new HashMap<Type, RuntimeBuiltinLeafInfoImpl<?>>();
+ public static final Map<Type,RuntimeBuiltinLeafInfoImpl<?>> LEAVES = new HashMap<>();
private static QName createXS(String typeName) {
return new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,typeName);
@@ -181,7 +180,7 @@
static {
String MAP_ANYURI_TO_URI_VALUE = AccessController.doPrivileged(
- new PrivilegedAction<String>() {
+ new PrivilegedAction<>() {
@Override
public String run() {
return System.getProperty(MAP_ANYURI_TO_URI);
@@ -622,7 +621,7 @@
if (value.getFractionalSecond() != null) {
String frac = value.getFractionalSecond().toPlainString();
//skip leading zero.
- buf.append(frac.substring(1, frac.length()));
+ buf.append(frac.substring(1));
}
break;
case 'z':
@@ -981,7 +980,7 @@
/**
* Format string for the {@link XMLGregorianCalendar}.
*/
- private static final Map<QName,String> xmlGregorianCalendarFormatString = new HashMap<QName, String>();
+ private static final Map<QName,String> xmlGregorianCalendarFormatString = new HashMap<>();
static {
Map<QName,String> m = xmlGregorianCalendarFormatString;
@@ -989,7 +988,7 @@
m.put(DatatypeConstants.DATETIME, "%Y-%M-%DT%h:%m:%s"+ "%z");
m.put(DatatypeConstants.DATE, "%Y-%M-%D" +"%z");
m.put(DatatypeConstants.TIME, "%h:%m:%s"+ "%z");
- final String oldGmonthMappingProperty = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ final String oldGmonthMappingProperty = AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public String run() {
return System.getProperty(USE_OLD_GMONTH_MAPPING);
@@ -1020,7 +1019,7 @@
* timezone 0x1000000
*/
private static final Map<QName, Integer> xmlGregorianCalendarFieldRef =
- new HashMap<QName, Integer>();
+ new HashMap<>();
static {
Map<QName, Integer> f = xmlGregorianCalendarFieldRef;
f.put(DatatypeConstants.DATETIME, 0x1111111);
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 f9ee8e8..8bcb2ea 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
@@ -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
@@ -13,7 +13,6 @@
import com.sun.istack.Nullable;
import org.glassfish.jaxb.core.WhiteSpaceProcessor;
import org.glassfish.jaxb.runtime.api.AccessorException;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.core.v2.model.annotation.Locatable;
import org.glassfish.jaxb.runtime.v2.model.annotation.RuntimeAnnotationReader;
import org.glassfish.jaxb.core.v2.model.core.ID;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/SingleTypePropertyInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/SingleTypePropertyInfoImpl.java
index d4627d2..7e65f0f 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/SingleTypePropertyInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/SingleTypePropertyInfoImpl.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,7 +36,7 @@
/**
* Computed lazily.
*
- * @see {@link #getTarget()}.
+ * @see #getTarget()
*/
private NonElement<T,C> type;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/TypeInfoSetImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/TypeInfoSetImpl.java
index 2edae3b..b1bbbca 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/TypeInfoSetImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/TypeInfoSetImpl.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
@@ -69,7 +69,7 @@
*/
@XmlJavaTypeAdapter(RuntimeUtil.ToStringAdapter.class)
private final Map<C,ClassInfoImpl<T,C,F,M>> beans
- = new LinkedHashMap<C,ClassInfoImpl<T,C,F,M>>();
+ = new LinkedHashMap<>();
@XmlTransient
private final Map<C,ClassInfoImpl<T,C,F,M>> beansView =
@@ -82,12 +82,12 @@
new LinkedHashMap<>();
private final Iterable<? extends ElementInfoImpl<T,C,F,M>> allElements =
- new Iterable<ElementInfoImpl<T,C,F,M>>() {
- @Override
- public Iterator<ElementInfoImpl<T,C,F,M>> iterator() {
- return new FlattenIterator<>(elementMappings.values());
- }
- };
+ new Iterable<>() {
+ @Override
+ public Iterator<ElementInfoImpl<T, C, F, M>> iterator() {
+ return new FlattenIterator<>(elementMappings.values());
+ }
+ };
/**
* {@link TypeInfo} for {@code xs:anyType}.
@@ -261,9 +261,7 @@
if(ei.getScope()!=null)
scope = ei.getScope().getClazz();
- Map<QName,ElementInfoImpl<T,C,F,M>> m = elementMappings.get(scope);
- if(m==null)
- elementMappings.put(scope,m=new LinkedHashMap<>());
+ Map<QName, ElementInfoImpl<T, C, F, M>> m = elementMappings.computeIfAbsent(scope, k -> new LinkedHashMap<>());
ElementInfoImpl<T,C,F,M> existing = m.put(ei.getElementName(),ei);
@@ -297,9 +295,7 @@
continue;
String uri = xs.namespace();
- Map<String,String> m = xmlNsCache.get(uri);
- if(m==null)
- xmlNsCache.put(uri,m=new HashMap<>());
+ Map<String, String> m = xmlNsCache.computeIfAbsent(uri, k -> new HashMap<>());
for( XmlNs xns : xs.xmlns() ) {
m.put(xns.prefix(),xns.namespaceURI());
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/Utils.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/Utils.java
index 1190e11..7a60c86 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/Utils.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/impl/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,7 +43,7 @@
// requires accessClassInPackage privilege
final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
+ new PrivilegedAction<>() {
@Override
public Method run() {
try {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/runtime/RuntimePropertyInfo.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/runtime/RuntimePropertyInfo.java
index 875fbca..4423486 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/runtime/RuntimePropertyInfo.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/model/runtime/RuntimePropertyInfo.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,7 +51,7 @@
/**
* Returns true if this property has an element-only content. False otherwise.
*/
- public boolean elementOnlyContent();
+ boolean elementOnlyContent();
/**
* Gets the "raw" type of the field.
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 8c0337e..feabdba 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
@@ -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
@@ -10,7 +10,6 @@
package org.glassfish.jaxb.runtime.v2.runtime;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeTypeInfo;
import org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.DomLoader;
import org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ArrayBeanInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ArrayBeanInfoImpl.java
index d368e37..4cb973d 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ArrayBeanInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ArrayBeanInfoImpl.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
@@ -116,38 +116,38 @@
}
@Override
- public final String getElementNamespaceURI(Object array) {
+ public String getElementNamespaceURI(Object array) {
throw new UnsupportedOperationException();
}
@Override
- public final String getElementLocalName(Object array) {
+ public String getElementLocalName(Object array) {
throw new UnsupportedOperationException();
}
@Override
- public final Object createInstance(UnmarshallingContext context) {
+ public Object createInstance(UnmarshallingContext context) {
// we first create a List and then later convert it to an array
return new ArrayList();
}
@Override
- public final boolean reset(Object array, UnmarshallingContext context) {
+ public boolean reset(Object array, UnmarshallingContext context) {
return false;
}
@Override
- public final String getId(Object array, XMLSerializer target) {
+ public String getId(Object array, XMLSerializer target) {
return null;
}
@Override
- public final void serializeAttributes(Object array, XMLSerializer target) {
+ public void serializeAttributes(Object array, XMLSerializer target) {
// noop
}
@Override
- public final void serializeRoot(Object array, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
+ public void serializeRoot(Object array, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
target.reportError(
new ValidationEventImpl(
ValidationEvent.ERROR,
@@ -157,17 +157,17 @@
}
@Override
- public final void serializeURIs(Object array, XMLSerializer target) {
+ public void serializeURIs(Object array, XMLSerializer target) {
// noop
}
@Override
- public final Transducer getTransducer() {
+ public Transducer getTransducer() {
return null;
}
@Override
- public final Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
+ public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
if(loader==null)
loader = new ArrayLoader(context);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AttributeAccessor.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AttributeAccessor.java
index 72ad20b..aae62ab 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AttributeAccessor.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/AttributeAccessor.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,5 +16,5 @@
*/
public interface AttributeAccessor<BeanT> {
- public boolean isNilIncluded();
+ boolean isNilIncluded();
}
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 6c24dda..ce79c91 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
@@ -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
@@ -41,13 +41,13 @@
private final JAXBContextImpl context;
/**
- * Lazily created unmarshaller to do XML->Java binding.
+ * Lazily created unmarshaller to do XML-{@literal >}Java binding.
* @see #getUnmarshaller()
*/
private UnmarshallerImpl unmarshaller;
/**
- * Lazily create marshaller to do Java->XML binding.
+ * Lazily create marshaller to do Java-{@literal >}XML binding.
* @see #getMarshaller()
*/
private MarshallerImpl marshaller;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ClassBeanInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ClassBeanInfoImpl.java
index 45312d0..121ab09 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ClassBeanInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ClassBeanInfoImpl.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
@@ -13,7 +13,6 @@
import com.sun.istack.FinalArrayList;
import org.glassfish.jaxb.runtime.api.AccessorException;
import org.glassfish.jaxb.core.v2.ClassFactory;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.core.v2.model.core.ID;
import org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeClassInfo;
import org.glassfish.jaxb.runtime.v2.model.runtime.RuntimePropertyInfo;
@@ -222,12 +221,12 @@
if(attProps.isEmpty())
attributeProperties = EMPTY_PROPERTIES;
else
- attributeProperties = attProps.toArray(new AttributeProperty[attProps.size()]);
+ attributeProperties = attProps.toArray(new AttributeProperty[0]);
if(uriProps.isEmpty())
uriProperties = EMPTY_PROPERTIES;
else
- uriProperties = uriProps.toArray(new Property[uriProps.size()]);
+ uriProperties = uriProps.toArray(new Property[0]);
}
@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 e7af5af..02434a1 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
@@ -86,7 +86,7 @@
private Coordinator old;
/**
- * Called whenever an execution flow enters the realm of this {@link Coordinator}.
+ * Called whenever an execution flow enters the realm of this .
*/
protected final void pushCoordinator() {
old = activeTable.get();
@@ -94,7 +94,7 @@
}
/**
- * Called whenever an execution flow exits the realm of this {@link Coordinator}.
+ * Called whenever an execution flow exits the realm of this .
*/
protected final void popCoordinator() {
if (old != null)
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ElementBeanInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ElementBeanInfoImpl.java
index debbff0..a9ecf19 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ElementBeanInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ElementBeanInfoImpl.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
@@ -198,7 +198,7 @@
}
@Override
- public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
+ public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
state.setLoader(core);
state.setIntercepter(this);
@@ -279,11 +279,11 @@
}
@Override
- public final JAXBElement createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException {
+ public JAXBElement createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException {
return createInstanceFromValue(null);
}
- public final JAXBElement createInstanceFromValue(Object o) throws IllegalAccessException, InvocationTargetException, InstantiationException {
+ public JAXBElement createInstanceFromValue(Object o) throws IllegalAccessException, InvocationTargetException, InstantiationException {
if(constructor==null)
return new JAXBElement(tagName,expectedType,scope,o);
else
@@ -335,7 +335,7 @@
}
@Override
- public final Transducer<JAXBElement> getTransducer() {
+ public Transducer<JAXBElement> getTransducer() {
return null;
}
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 4c12553..c8893d1 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
@@ -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
@@ -111,16 +111,18 @@
/**
* Pool of {@link Marshaller}s.
*/
- public final Pool<Marshaller> marshallerPool = new Pool.Impl<Marshaller>() {
- protected @NotNull@Override
- Marshaller create() {
+ public final Pool<Marshaller> marshallerPool = new Pool.Impl<>() {
+ protected @NotNull
+ @Override
+ Marshaller create() {
return createMarshaller();
}
};
- public final Pool<Unmarshaller> unmarshallerPool = new Pool.Impl<Unmarshaller>() {
- protected @NotNull@Override
- Unmarshaller create() {
+ public final Pool<Unmarshaller> unmarshallerPool = new Pool.Impl<>() {
+ protected @NotNull
+ @Override
+ Unmarshaller create() {
return createUnmarshaller();
}
};
@@ -304,11 +306,7 @@
RuntimeClassInfo scope = n.getScope();
Class scopeClazz = scope==null?null:scope.getClazz();
- Map<QName,ElementBeanInfoImpl> m = elements.get(scopeClazz);
- if(m==null) {
- m = new LinkedHashMap<>();
- elements.put(scopeClazz,m);
- }
+ Map<QName, ElementBeanInfoImpl> m = elements.computeIfAbsent(scopeClazz, k -> new LinkedHashMap<>());
m.put(n.getElementName(),bi);
}
@@ -513,7 +511,7 @@
* @return null
* if {@code c} isn't a JAXB-bound class and {@code fatal==false}.
*/
- public final JaxBeanInfo getBeanInfo(Object o) {
+ public JaxBeanInfo getBeanInfo(Object o) {
// don't allow xs:anyType beanInfo to handle all the unbound objects
for( Class c=o.getClass(); c!=Object.class; c=c.getSuperclass()) {
JaxBeanInfo bi = beanInfoMap.get(c);
@@ -536,7 +534,7 @@
* if true, the failure to look up will throw an exception.
* Otherwise it will just return null.
*/
- public final JaxBeanInfo getBeanInfo(Object o,boolean fatal) throws JAXBException {
+ public JaxBeanInfo getBeanInfo(Object o, boolean fatal) throws JAXBException {
JaxBeanInfo bi = getBeanInfo(o);
if(bi!=null) return bi;
if(fatal) {
@@ -557,7 +555,7 @@
* @return null
* if {@code c} isn't a JAXB-bound class and {@code fatal==false}.
*/
- public final <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz) {
+ public <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz) {
return (JaxBeanInfo<T>)beanInfoMap.get(clazz);
}
@@ -569,7 +567,7 @@
* if true, the failure to look up will throw an exception.
* Otherwise it will just return null.
*/
- public final <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz,boolean fatal) throws JAXBException {
+ public <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz, boolean fatal) throws JAXBException {
JaxBeanInfo<T> bi = getBeanInfo(clazz);
if(bi!=null) return bi;
if(fatal)
@@ -584,7 +582,7 @@
* @return
* null if the given name pair is not recognized.
*/
- public final Loader selectRootLoader(UnmarshallingContext.State state, TagName tag ) {
+ public Loader selectRootLoader(UnmarshallingContext.State state, TagName tag ) {
JaxBeanInfo beanInfo = rootMap.get(tag.uri,tag.local);
if(beanInfo==null)
return null;
@@ -981,7 +979,7 @@
}
/**
- * Creates a {@link JAXBContextImpl} that includes the specified additional classes.
+ * Creates a that includes the specified additional classes.
*/
public JAXBContextImpl createAugmented(Class<?> clazz) throws JAXBException {
Class[] newList = new Class[classes.length+1];
@@ -993,11 +991,11 @@
return builder.build();
}
- private static final Comparator<QName> QNAME_COMPARATOR = new Comparator<QName>() {
+ private static final Comparator<QName> QNAME_COMPARATOR = new Comparator<>() {
@Override
public int compare(QName lhs, QName rhs) {
int r = lhs.getLocalPart().compareTo(rhs.getLocalPart());
- if(r!=0) return r;
+ if (r != 0) return r;
return lhs.getNamespaceURI().compareTo(rhs.getNamespaceURI());
}
@@ -1124,7 +1122,7 @@
}
if (this.typeRefs == null) {
- this.typeRefs = Collections.<TypeReference>emptyList();
+ this.typeRefs = Collections.emptyList();
}
return new JAXBContextImpl(this);
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 b2ce6a1..ea5c81f 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
@@ -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
@@ -64,21 +64,21 @@
protected boolean isNilIncluded = false;
/**
- * For {@link JaxBeanInfo} that has multiple type names.
+ * For that has multiple type names.
*/
protected JaxBeanInfo(JAXBContextImpl grammar, RuntimeTypeInfo rti, Class<BeanT> jaxbType, QName[] typeNames, boolean isElement, boolean isImmutable, boolean hasLifecycleEvents) {
this(grammar,rti,jaxbType,(Object)typeNames,isElement,isImmutable,hasLifecycleEvents);
}
/**
- * For {@link JaxBeanInfo} that has one type name.
+ * For that has one type name.
*/
protected JaxBeanInfo(JAXBContextImpl grammar, RuntimeTypeInfo rti, Class<BeanT> jaxbType, QName typeName, boolean isElement,boolean isImmutable, boolean hasLifecycleEvents) {
this(grammar,rti,jaxbType,(Object)typeName,isElement,isImmutable,hasLifecycleEvents);
}
/**
- * For {@link JaxBeanInfo} that has no type names.
+ * For that has no type names.
*/
protected JaxBeanInfo(JAXBContextImpl grammar, RuntimeTypeInfo rti, Class<BeanT> jaxbType, boolean isElement,boolean isImmutable, boolean hasLifecycleEvents) {
this(grammar,rti,jaxbType,(Object)null,isElement,isImmutable,hasLifecycleEvents);
@@ -254,7 +254,6 @@
* <p>
* null if the class is not bound to a named schema type.
*
- * <p>
*/
public Collection<QName> getTypeNames() {
if(typeName==null) return Collections.emptyList();
@@ -359,7 +358,7 @@
*
* @param context
* The {@link JAXBContextImpl} object that governs this object.
- * This object is taken as a parameter so that {@link JaxBeanInfo} doesn't have
+ * This object is taken as a parameter so that doesn't have
* to store them on its own.
*
* When this method is invoked from within the unmarshaller, tihs parameter can be
@@ -384,8 +383,7 @@
/**
- * Called after all the {@link JaxBeanInfo}s are created.
- * @param grammar
+ * Called after all the s are created.
*/
protected void link(JAXBContextImpl grammar) {
}
@@ -401,7 +399,7 @@
private static Class[] marshalEventParams = { Marshaller.class };
private Method[] getDeclaredMethods(final Class<BeanT> c) {
- return AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+ return AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public Method[] run() {
return c.getDeclaredMethods();
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/LeafBeanInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/LeafBeanInfoImpl.java
index 40f2a57..4d772b8 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/LeafBeanInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/LeafBeanInfoImpl.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
@@ -71,12 +71,12 @@
}
@Override
- public final String getElementNamespaceURI(BeanT t) {
+ public String getElementNamespaceURI(BeanT t) {
return tagName.nsUri;
}
@Override
- public final String getElementLocalName(BeanT t) {
+ public String getElementLocalName(BeanT t) {
return tagName.localName;
}
@@ -86,17 +86,17 @@
}
@Override
- public final boolean reset(BeanT bean, UnmarshallingContext context) {
+ public boolean reset(BeanT bean, UnmarshallingContext context) {
return false;
}
@Override
- public final String getId(BeanT bean, XMLSerializer target) {
+ public String getId(BeanT bean, XMLSerializer target) {
return null;
}
@Override
- public final void serializeBody(BeanT bean, XMLSerializer w) throws SAXException, IOException, XMLStreamException {
+ public void serializeBody(BeanT bean, XMLSerializer w) throws SAXException, IOException, XMLStreamException {
// most of the times leaves are printed as leaf element/attribute property,
// so this code is only used for example when you have multiple XmlElement on a property
// and some of them are leaves. Hence this doesn't need to be super-fast.
@@ -108,12 +108,12 @@
}
@Override
- public final void serializeAttributes(BeanT bean, XMLSerializer target) {
+ public void serializeAttributes(BeanT bean, XMLSerializer target) {
// noop
}
@Override
- public final void serializeRoot(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
+ public void serializeRoot(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
if(tagName==null) {
target.reportError(
new ValidationEventImpl(
@@ -130,7 +130,7 @@
}
@Override
- public final void serializeURIs(BeanT bean, XMLSerializer target) throws SAXException {
+ public void serializeURIs(BeanT bean, XMLSerializer target) throws SAXException {
// TODO: maybe we should create another LeafBeanInfoImpl class for
// context-dependent xducers?
if(xducer.useNamespace()) {
@@ -143,7 +143,7 @@
}
@Override
- public final Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
+ public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
if(typeSubstitutionCapable)
return loaderWithSubst;
else
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/MarshallerImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/MarshallerImpl.java
index 75c6e6b..e892783 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/MarshallerImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/MarshallerImpl.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
@@ -135,7 +135,7 @@
/**
* Creates {@link XmlOutput} from the given {@link Result} object.
*/
- final XmlOutput createXmlOutput(Result result) throws JAXBException {
+ XmlOutput createXmlOutput(Result result) throws JAXBException {
if (result instanceof SAXResult)
return new SAXOutput(((SAXResult) result).getHandler());
@@ -184,7 +184,7 @@
/**
* Creates an appropriate post-init action object.
*/
- final Runnable createPostInitAction(Result result) {
+ Runnable createPostInitAction(Result result) {
if (result instanceof DOMResult) {
Node node = ((DOMResult) result).getNode();
return new DomPostInitAction(node,serializer);
@@ -201,7 +201,7 @@
/**
* Used by {@link BridgeImpl} to write an arbitrary object as a fragment.
*/
- protected final <T> void write(Name rootTagName, JaxBeanInfo<T> bi, T obj, XmlOutput out,Runnable postInitAction) throws JAXBException {
+ protected <T> void write(Name rootTagName, JaxBeanInfo<T> bi, T obj, XmlOutput out, Runnable postInitAction) throws JAXBException {
try {
try {
prewrite(out, true, postInitAction);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Transducer.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Transducer.java
index 581d161..2795609 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Transducer.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Transducer.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,7 +36,7 @@
public interface Transducer<ValueT> {
/**
- * If true, this {@link Transducer} doesn't declare any namespace,
+ * If true, this doesn't declare any namespace,
* and therefore {@link #declareNamespace(Object, XMLSerializer)} is no-op.
*
* It also means that the {@link #parse(CharSequence)} method
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 b1c0c8f..93c16d9 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,7 +43,7 @@
// requires accessClassInPackage privilege
final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
+ new PrivilegedAction<>() {
@Override
public Method run() {
try {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ValueListBeanInfoImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ValueListBeanInfoImpl.java
index 8229aa9..f0de2f7 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ValueListBeanInfoImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/ValueListBeanInfoImpl.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
@@ -99,7 +99,7 @@
}
@Override
- public final void serializeURIs(Object array, XMLSerializer target) throws SAXException {
+ public void serializeURIs(Object array, XMLSerializer target) throws SAXException {
if(xducer.useNamespace()) {
int len = Array.getLength(array);
for( int i=0; i<len; i++ ) {
@@ -114,37 +114,37 @@
}
@Override
- public final String getElementNamespaceURI(Object array) {
+ public String getElementNamespaceURI(Object array) {
throw new UnsupportedOperationException();
}
@Override
- public final String getElementLocalName(Object array) {
+ public String getElementLocalName(Object array) {
throw new UnsupportedOperationException();
}
@Override
- public final Object createInstance(UnmarshallingContext context) {
+ public Object createInstance(UnmarshallingContext context) {
throw new UnsupportedOperationException();
}
@Override
- public final boolean reset(Object array, UnmarshallingContext context) {
+ public boolean reset(Object array, UnmarshallingContext context) {
return false;
}
@Override
- public final String getId(Object array, XMLSerializer target) {
+ public String getId(Object array, XMLSerializer target) {
return null;
}
@Override
- public final void serializeAttributes(Object array, XMLSerializer target) {
+ public void serializeAttributes(Object array, XMLSerializer target) {
// noop
}
@Override
- public final void serializeRoot(Object array, XMLSerializer target) throws SAXException {
+ public void serializeRoot(Object array, XMLSerializer target) throws SAXException {
target.reportError(
new ValidationEventImpl(
ValidationEvent.ERROR,
@@ -154,12 +154,12 @@
}
@Override
- public final Transducer getTransducer() {
+ public Transducer getTransducer() {
return null;
}
@Override
- public final Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
+ public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
// type substitution impossible
return loader;
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/XMLSerializer.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/XMLSerializer.java
index 1e8f991..8226959 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/XMLSerializer.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/XMLSerializer.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
@@ -15,7 +15,6 @@
import org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper;
import org.glassfish.jaxb.runtime.api.AccessorException;
import org.glassfish.jaxb.runtime.util.ValidationEventLocatorExImpl;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeBuiltinLeafInfo;
import org.glassfish.jaxb.runtime.v2.runtime.output.MTOMXmlOutput;
import org.glassfish.jaxb.runtime.v2.runtime.output.NamespaceContextImpl;
@@ -221,7 +220,7 @@
* @param fieldName
* the name of the property being processed when an error is found.
*/
- public final void reportError(String fieldName, Throwable t) throws SAXException {
+ public void reportError(String fieldName, Throwable t) throws SAXException {
ValidationEvent ve = new ValidationEventImpl(ValidationEvent.ERROR,
t.getMessage(), getCurrentLocation(fieldName), t);
reportError(ve);
@@ -523,7 +522,7 @@
* an element.
* Used to reduce the code size in the generated marshaller.
*/
- public final void childAsSoleContent( Object child, String fieldName) throws SAXException, IOException, XMLStreamException {
+ public void childAsSoleContent(Object child, String fieldName) throws SAXException, IOException, XMLStreamException {
if(child==null) {
handleMissingObjectError(fieldName);
} else {
@@ -590,7 +589,7 @@
* Used as a part of the error message in case anything goes wrong
* with 'o'.
*/
- public final void childAsXsiType( Object child, String fieldName, JaxBeanInfo expected, boolean nillable) throws SAXException, IOException, XMLStreamException {
+ public void childAsXsiType(Object child, String fieldName, JaxBeanInfo expected, boolean nillable) throws SAXException, IOException, XMLStreamException {
if(child==null) {
handleMissingObjectError(fieldName);
} else {
@@ -675,8 +674,6 @@
*
* This method is called only after the callee has determined that beanInfo.lookForLifecycleMethods == true.
*
- * @param beanInfo
- * @param currentTarget
*/
private void fireAfterMarshalEvents(final JaxBeanInfo beanInfo, Object currentTarget) {
// first invoke bean embedded listener
@@ -699,8 +696,6 @@
*
* This method is called only after the callee has determined that beanInfo.lookForLifecycleMethods == true.
*
- * @param beanInfo
- * @param currentTarget
*/
private void fireBeforeMarshalEvents(final JaxBeanInfo beanInfo, Object currentTarget) {
// first invoke bean embedded listener
@@ -756,7 +751,7 @@
endAttributes();
* </pre>
*/
- public final void writeXsiNilTrue() throws SAXException, IOException, XMLStreamException {
+ public void writeXsiNilTrue() throws SAXException, IOException, XMLStreamException {
getNamespaceContext().declareNamespace(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI,"xsi",true);
endNamespaceDecls(null);
attribute(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI,"nil","true");
@@ -935,10 +930,10 @@
}
/**
- * Field used to support an {@link XmlSchemaType} annotation.
+ * Field used to support an {@link jakarta.xml.bind.annotation.XmlSchemaType} annotation.
*
* <p>
- * When we are marshalling a property with an effective {@link XmlSchemaType},
+ * When we are marshalling a property with an effective {@link jakarta.xml.bind.annotation.XmlSchemaType},
* this field is set to hold the QName of that type. The {@link Transducer} that
* actually converts a Java object into XML can look this property to decide
* how to marshal the value.
@@ -1052,7 +1047,7 @@
/**
* When called from within the realm of the marshaller, this method
- * returns the current {@link XMLSerializer} in charge.
+ * returns the current in charge.
*/
public static XMLSerializer getInstance() {
return (XMLSerializer) _getInstance();
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/Encoded.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/Encoded.java
index d12928e..a550c21 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/Encoded.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/Encoded.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
@@ -35,7 +35,7 @@
buf = new byte[size];
}
- public final void set( String text ) {
+ public void set(String text ) {
int length = text.length();
ensureSize(length*3+1); // +1 for append
@@ -77,7 +77,7 @@
* @param isAttribute
* if true, characters like \t, \r, and \n are also escaped.
*/
- public final void setEscape(String text, boolean isAttribute) {
+ public void setEscape(String text, boolean isAttribute) {
int length = text.length();
ensureSize(length*6+1); // in the worst case the text is like """""", so we need 6 bytes per char
@@ -133,7 +133,7 @@
/**
* Writes the encoded bytes to the given output stream.
*/
- public final void write(UTF8XmlOutput out) throws IOException {
+ public void write(UTF8XmlOutput out) throws IOException {
out.write(buf,0,len);
}
@@ -157,7 +157,7 @@
/**
* UTF-8 encoded entities keyed by their character code.
- * e.g., entities['&'] == AMP_ENTITY.
+ * e.g., entities['&'] == AMP_ENTITY.
*
* In attributes we need to encode more characters.
*/
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 d10a411..67bba17 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
@@ -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
@@ -23,6 +23,7 @@
import javax.xml.stream.XMLStreamException;
import java.io.IOException;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.WeakHashMap;
@@ -145,9 +146,7 @@
}
private void clear(int[] array) {
- for (int i = 0; i < array.length; i++) {
- array[i] = 0;
- }
+ Arrays.fill(array, 0);
}
/**
@@ -185,7 +184,7 @@
}
/**
- * Holder of JAXB contexts -> tables.
+ * Holder of JAXB contexts -{@literal >} tables.
* <p>
* An instance will be registered with the
* {@link StAXDocumentSerializer}.
@@ -224,7 +223,7 @@
final TablesPerJAXBContext tablesPerContext = appData.contexts.get(context);
if (tablesPerContext != null) {
tables = tablesPerContext;
- /**
+ /*
* Obtain the current local name index. Thus will be used to
* calculate the maximum index value when serializing for this context
*/
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/NamespaceContextImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/NamespaceContextImpl.java
index 5fe03eb..fe5ed77 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/NamespaceContextImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/NamespaceContextImpl.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
@@ -331,7 +331,7 @@
public Iterator<String> getPrefixes(String uri) {
String prefix = getPrefix(uri);
if(prefix==null)
- return Collections.<String>emptySet().iterator();
+ return Collections.emptyIterator();
else
return Collections.singleton(uri).iterator();
}
@@ -417,7 +417,7 @@
}
/**
- * Returns true if this {@link Element} represents the root element that
+ * Returns true if this represents the root element that
* we are marshalling.
*/
public boolean isRootElement() {
@@ -484,7 +484,7 @@
/**
* Gets the number of bindings declared on this element.
*/
- public final int count() {
+ public int count() {
return context.size-baseIndex;
}
@@ -494,7 +494,7 @@
* @param idx
* between 0 and {@link #count()}
*/
- public final String getPrefix(int idx) {
+ public String getPrefix(int idx) {
return context.prefixes[baseIndex+idx];
}
@@ -504,7 +504,7 @@
* @param idx
* between 0 and {@link #count()}
*/
- public final String getNsUri(int idx) {
+ public String getNsUri(int idx) {
return context.nsUris[baseIndex+idx];
}
@@ -521,7 +521,7 @@
}
/**
- * Gets the parent {@link Element}.
+ * Gets the parent .
*/
public Element getParent() {
return prev;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/XmlOutput.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/XmlOutput.java
index 467ed27..aa60b53 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/XmlOutput.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/output/XmlOutput.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
@@ -97,7 +97,7 @@
* @param fragment
* true if we are marshalling a fragment.
*/
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException;
+ void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException;
/**
* Called at the very end. This is the last method to be invoked.
@@ -105,7 +105,7 @@
* @param fragment
* false if we are writing the whole document.
*/
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException;
+ void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException;
/**
* Writes a start tag.
@@ -117,24 +117,24 @@
* <p>
* This method is used for writing tags that are indexed.
*/
- public void beginStartTag(Name name) throws IOException, XMLStreamException;
+ void beginStartTag(Name name) throws IOException, XMLStreamException;
- public void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException;
+ void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException;
- public void attribute( Name name, String value ) throws IOException, XMLStreamException;
+ void attribute(Name name, String value) throws IOException, XMLStreamException;
/**
* @param prefix
* -1 if this attribute does not have a prefix
* (this handling differs from that of elements.)
*/
- public void attribute( int prefix, String localName, String value ) throws IOException, XMLStreamException;
+ void attribute(int prefix, String localName, String value) throws IOException, XMLStreamException;
- public void endStartTag() throws IOException, SAXException;
+ void endStartTag() throws IOException, SAXException;
- public void endTag(Name name) throws IOException, SAXException, XMLStreamException;
+ void endTag(Name name) throws IOException, SAXException, XMLStreamException;
- public void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException;
+ void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException;
/**
* Writes XML text with character escaping, if necessary.
@@ -142,9 +142,8 @@
* @param value
* this string can contain characters that might need escaping
* (such as {@code '&' or '>'})
- * @param needsSeparatingWhitespace
*/
- public void text( String value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException;
+ void text(String value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException;
/**
* Writes XML text with character escaping, if necessary.
@@ -152,7 +151,6 @@
* @param value
* this string can contain characters that might need escaping
* (such as {@code '&' or '>'})
- * @param needsSeparatingWhitespace
*/
- public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException;
+ void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException;
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/ArrayElementProperty.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/ArrayElementProperty.java
index 2b1f103..7755b5d 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/ArrayElementProperty.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/ArrayElementProperty.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
@@ -184,14 +184,12 @@
* Creates a loader handler that unmarshals the body of the item.
*
* <p>
- * This will be sandwiched into <item> ... </item>.
+ * This will be sandwiched into {@code <item> ... </item>}.
*
* <p>
* When unmarshalling the body of item, the Pack of {@link Lister} is available
* as the handler state.
*
- * @param chain
- * @param typeRef
*/
private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) {
if(PropertyFactory.isLeaf(typeRef.getSource())) {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/Property.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/Property.java
index fdc2ffa..0e4d844 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/Property.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/Property.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
@@ -53,18 +53,18 @@
* @throws AccessorException
* If thrown, caught by the caller and reported.
*/
- public void serializeBody(BeanT beanT, XMLSerializer target, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException;
+ void serializeBody(BeanT beanT, XMLSerializer target, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException;
/**
* @see JaxBeanInfo#serializeURIs(Object, XMLSerializer)
*/
- public void serializeURIs(BeanT beanT, XMLSerializer target) throws SAXException, AccessorException;
+ void serializeURIs(BeanT beanT, XMLSerializer target) throws SAXException, AccessorException;
/**
* Returns true if
* {@link #serializeURIs(Object,XMLSerializer)} performs some meaningful action.
*/
- public boolean hasSerializeURIAction();
+ boolean hasSerializeURIAction();
// /**
// * Builds the unmarshaller.
@@ -117,11 +117,11 @@
* @return
* null if RETAIN_REFERENCE_TO_INFO property is not set on the {@link JAXBContext}
*/
- public RuntimePropertyInfo getInfo();
+ RuntimePropertyInfo getInfo();
- public boolean isHiddenByOverride();
+ boolean isHiddenByOverride();
- public void setHiddenByOverride(boolean hidden);
+ void setHiddenByOverride(boolean hidden);
- public String getFieldName();
+ String getFieldName();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/StructureLoaderBuilder.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/StructureLoaderBuilder.java
index d2d218b..5521c25 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/StructureLoaderBuilder.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/StructureLoaderBuilder.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
@@ -46,7 +46,7 @@
* of the {@link #buildChildElementUnmarshallers} method by using
* this magic token as the key.
*/
- public static final QName TEXT_HANDLER = new QName("\u0000","text");
+ QName TEXT_HANDLER = new QName("\u0000","text");
/**
* Magic {@link QName} used to store a handler for the rest of the elements.
@@ -60,5 +60,5 @@
* of the {@link #buildChildElementUnmarshallers} method by using
* this magic token as the key.
*/
- public static final QName CATCH_ALL = new QName("\u0000","catchAll");
+ QName CATCH_ALL = new QName("\u0000","catchAll");
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/Utils.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/Utils.java
index df3fdd5..f409ff8 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/Utils.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,7 +43,7 @@
// requires accessClassInPackage privilege
final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
+ new PrivilegedAction<>() {
@Override
public Method run() {
try {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/ValueProperty.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/ValueProperty.java
index ac129ec..407d218 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/ValueProperty.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/property/ValueProperty.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,7 +51,7 @@
}
@Override
- public final void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
+ public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
if(xacc.hasValue(o))
xacc.writeText(w,o,fieldName);
}
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 6573f79..1d3d24e 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
@@ -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
@@ -164,7 +164,7 @@
}
/**
- * Wraps this {@link Accessor} into another {@link Accessor}
+ * Wraps this into another
* and performs the type adaption as necessary.
*/
public final <T> Accessor<BeanT, T> adapt(Class<T> targetType, final Class<? extends XmlAdapter<T, ValueT>> adapter) {
@@ -387,14 +387,14 @@
}
/**
- * Gets the special {@link Accessor} used to recover from errors.
+ * Gets the special used to recover from errors.
*/
@SuppressWarnings("unchecked")
public static <A, B> Accessor<A, B> getErrorInstance() {
return ERROR;
}
- private static final Accessor ERROR = new Accessor<Object, Object>(Object.class) {
+ private static final Accessor ERROR = new Accessor<>(Object.class) {
@Override
public Object get(Object o) {
return null;
@@ -408,7 +408,7 @@
/**
* {@link Accessor} for {@link JAXBElement#getValue()}.
*/
- public static final Accessor<JAXBElement, Object> JAXB_ELEMENT_VALUE = new Accessor<JAXBElement, Object>(Object.class) {
+ public static final Accessor<JAXBElement, Object> JAXB_ELEMENT_VALUE = new Accessor<>(Object.class) {
@Override
public Object get(JAXBElement jaxbElement) {
return jaxbElement.getValue();
@@ -423,7 +423,7 @@
/**
* Uninitialized map keyed by their classes.
*/
- private static final Map<Class, Object> uninitializedValues = new HashMap<Class, Object>();
+ private static final Map<Class, Object> uninitializedValues = new HashMap<>();
static {
/*
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 24bebd6..3140b44 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
@@ -74,7 +74,7 @@
/**
- * Gets a reference to the appropriate {@link Lister} object
+ * Gets a reference to the appropriate object
* if the field is a multi-value field. Otherwise null.
*
* @param fieldType
@@ -122,7 +122,7 @@
* Cache instances of {@link ArrayLister}s.
*/
private static final Map<Class,WeakReference<Lister>> arrayListerCache =
- Collections.synchronizedMap(new WeakHashMap<Class,WeakReference<Lister>>());
+ Collections.synchronizedMap(new WeakHashMap<>());
/**
* Creates a lister for array type.
@@ -161,11 +161,12 @@
@Override
public org.glassfish.jaxb.runtime.v2.runtime.reflect.ListIterator<ItemT> iterator(final ItemT[] objects, XMLSerializer context) {
- return new org.glassfish.jaxb.runtime.v2.runtime.reflect.ListIterator<ItemT>() {
- int idx=0;
+ return new org.glassfish.jaxb.runtime.v2.runtime.reflect.ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
@@ -442,7 +443,7 @@
}
/**
- * Gets the special {@link Lister} used to recover from an error.
+ * Gets the special used to recover from an error.
*/
@SuppressWarnings("unchecked")
public static <A,B,C,D> Lister<A,B,C,D> getErrorInstance() {
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerBoolean.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerBoolean.java
index f1bfceb..33bd853 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerBoolean.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerBoolean.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,11 +34,12 @@
@Override
public ListIterator<Boolean> iterator(final boolean[] objects, XMLSerializer context) {
- return new ListIterator<Boolean>() {
- int idx=0;
+ return new ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerByte.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerByte.java
index d4a18ed..18d547e 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerByte.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerByte.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,11 +31,12 @@
@Override
public ListIterator<Byte> iterator(final byte[] objects, XMLSerializer context) {
- return new ListIterator<Byte>() {
- int idx=0;
+ return new ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerCharacter.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerCharacter.java
index d84ee14..024e9b7 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerCharacter.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerCharacter.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,11 +34,12 @@
@Override
public ListIterator<Character> iterator(final char[] objects, XMLSerializer context) {
- return new ListIterator<Character>() {
- int idx=0;
+ return new ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerDouble.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerDouble.java
index e76f99a..aef8d3b 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerDouble.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerDouble.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,11 +34,12 @@
@Override
public ListIterator<Double> iterator(final double[] objects, XMLSerializer context) {
- return new ListIterator<Double>() {
- int idx=0;
+ return new ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerFloat.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerFloat.java
index 2bfc59a..5570928 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerFloat.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerFloat.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,11 +34,12 @@
@Override
public ListIterator<Float> iterator(final float[] objects, XMLSerializer context) {
- return new ListIterator<Float>() {
- int idx=0;
+ return new ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerInteger.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerInteger.java
index 12f6ce8..0133c47 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerInteger.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerInteger.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,11 +34,12 @@
@Override
public ListIterator<Integer> iterator(final int[] objects, XMLSerializer context) {
- return new ListIterator<Integer>() {
- int idx=0;
+ return new ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerLong.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerLong.java
index 92300dc..e7caf5c 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerLong.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerLong.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,11 +34,12 @@
@Override
public ListIterator<Long> iterator(final long[] objects, XMLSerializer context) {
- return new ListIterator<Long>() {
- int idx=0;
+ return new ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerShort.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerShort.java
index e012558..b88900f 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerShort.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/PrimitiveArrayListerShort.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,11 +34,12 @@
@Override
public ListIterator<Short> iterator(final short[] objects, XMLSerializer context) {
- return new ListIterator<Short>() {
- int idx=0;
+ return new ListIterator<>() {
+ int idx = 0;
+
@Override
public boolean hasNext() {
- return idx<objects.length;
+ return idx < objects.length;
}
@Override
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 6b2fecb..dac0472 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
@@ -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
@@ -113,7 +113,7 @@
/**
- * Gets the {@link TransducedAccessor} appropriately configured for
+ * Gets the appropriately configured for
* the given property.
*
* <p>
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Utils.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Utils.java
index 2b0c936..7d3e067 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Utils.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,7 +43,7 @@
// requires accessClassInPackage privilege
final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
+ new PrivilegedAction<>() {
@Override
public Method run() {
try {
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 781678e..b031287 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
@@ -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,7 +47,7 @@
private static final Lock ir = irwl.readLock();
private static final Lock iw = irwl.writeLock();
private static final Map<ClassLoader, WeakReference<Injector>> injectors =
- new WeakHashMap<ClassLoader, WeakReference<Injector>>();
+ new WeakHashMap<>();
private static final Logger logger = Logger.getLogger(Injector.class.getName());
/**
* Injects a new class into the given class loader.
@@ -77,7 +77,7 @@
}
/**
- * Gets or creates an {@link Injector} for the given class loader.
+ * Gets or creates an for the given class loader.
*
* @return null
* if it fails.
@@ -133,16 +133,16 @@
static {
try {
Method[] m = AccessController.doPrivileged(
- new PrivilegedAction<Method[]>() {
- @Override
- public Method[] run() {
- return new Method[]{
- getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE),
- getMethod(ClassLoader.class, "resolveClass", Class.class),
- getMethod(ClassLoader.class, "findLoadedClass", String.class)
- };
- }
- }
+ new PrivilegedAction<>() {
+ @Override
+ public Method[] run() {
+ return new Method[]{
+ getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE),
+ getMethod(ClassLoader.class, "resolveClass", Class.class),
+ getMethod(ClassLoader.class, "findLoadedClass", String.class)
+ };
+ }
+ }
);
defineClass = m[0];
resolveClass = m[1];
@@ -158,17 +158,17 @@
return theUnsafe.get(null);
}
});
- defineClass = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() {
+ defineClass = AccessController.doPrivileged(new PrivilegedExceptionAction<>() {
@Override
public Method run() throws Exception {
try {
return U.getClass().getMethod("defineClass",
- new Class[]{String.class,
- byte[].class,
- Integer.TYPE,
- Integer.TYPE,
- ClassLoader.class,
- ProtectionDomain.class});
+ String.class,
+ byte[].class,
+ Integer.TYPE,
+ Integer.TYPE,
+ ClassLoader.class,
+ ProtectionDomain.class);
} catch (NoSuchMethodException | SecurityException ex) {
throw ex;
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/DefaultIDResolver.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/DefaultIDResolver.java
index c823f25..1182e10 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/DefaultIDResolver.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/DefaultIDResolver.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
@@ -23,7 +23,7 @@
* @author Kohsuke Kawaguchi
*/
final class DefaultIDResolver extends IDResolver {
- /** Records ID->Object map. */
+ /** Records ID-{@literal >}Object map. */
private HashMap<String,Object> idmap = null;
@Override
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/DomLoader.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/DomLoader.java
index ff04364..aa6a7b9 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/DomLoader.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/DomLoader.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
@@ -66,7 +66,7 @@
private void declarePrefixes( UnmarshallingContext context, String[] prefixes ) throws SAXException {
for( int i=prefixes.length-1; i>=0; i-- ) {
String nsUri = context.getNamespaceURI(prefixes[i]);
- if(nsUri==null) throw new IllegalStateException("prefix \'"+prefixes[i]+"\' isn't bound");
+ if(nsUri==null) throw new IllegalStateException("prefix '" +prefixes[i]+ "' isn't bound");
handler.startPrefixMapping(prefixes[i],nsUri );
}
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/FastInfosetConnector.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/FastInfosetConnector.java
index dc93344..8c5f7f8 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/FastInfosetConnector.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/FastInfosetConnector.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
@@ -207,17 +207,17 @@
// CharSequence interface
@Override
- public final int length() {
+ public int length() {
return length;
}
@Override
- public final char charAt(final int index) {
+ public char charAt(final int index) {
return ch[start + index];
}
@Override
- public final CharSequence subSequence(final int start, final int end) {
+ public CharSequence subSequence(final int start, final int end) {
return new CharSequenceImpl(ch, this.start + start, end - start);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java
index 7e88077..1ffe74f 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/LeafPropertyXsiLoader.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
@@ -11,7 +11,6 @@
package org.glassfish.jaxb.runtime.v2.runtime.unmarshaller;
import org.glassfish.jaxb.runtime.DatatypeConverterImpl;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.runtime.v2.runtime.ClassBeanInfoImpl;
import org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo;
import org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/Loader.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/Loader.java
index 5babb85..1584a82 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/Loader.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/Loader.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,7 +47,7 @@
* and when the parent designated this loader as the child loader.
*
* <p>
- * The callee may change {@code state.loader} to designate another {@link Loader}
+ * The callee may change {@code state.loader} to designate another
* for the processing. It's the responsibility of the callee to forward the startElement
* event in such a case.
*
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/SAXConnector.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/SAXConnector.java
index 5c64623..c2fc42a 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/SAXConnector.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/SAXConnector.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
@@ -151,7 +151,7 @@
@Override
- public final void characters( char[] buf, int start, int len ) {
+ public void characters(char[] buf, int start, int len ) {
if (logger.isLoggable(Level.FINEST)) {
logger.log(Level.FINEST, "SAXConnector.characters: {0}", buf);
}
@@ -160,7 +160,7 @@
}
@Override
- public final void ignorableWhitespace( char[] buf, int start, int len ) {
+ public void ignorableWhitespace(char[] buf, int start, int len ) {
if (logger.isLoggable(Level.FINEST)) {
logger.log(Level.FINEST, "SAXConnector.characters{0}", buf);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/StructureLoader.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/StructureLoader.java
index 2ed1ca2..d2953d1 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/StructureLoader.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/StructureLoader.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
@@ -13,7 +13,6 @@
import org.glassfish.jaxb.core.Utils;
import org.glassfish.jaxb.runtime.api.AccessorException;
import org.glassfish.jaxb.runtime.api.JAXBRIContext;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.runtime.v2.runtime.ClassBeanInfoImpl;
import org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl;
import org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo;
@@ -95,7 +94,7 @@
*
* <p>
* To fix the cyclic reference issue, the main part of the initialization needs to be done
- * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}.
+ * after a is set to {@link ClassBeanInfoImpl#loader}.
*/
public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) {
UnmarshallerChain chain = new UnmarshallerChain(context);
@@ -266,7 +265,7 @@
fireAfterUnmarshal(beanInfo, state.getTarget(), state.getPrev());
}
- private static final QNameMap<TransducedAccessor> EMPTY = new QNameMap<TransducedAccessor>();
+ private static final QNameMap<TransducedAccessor> EMPTY = new QNameMap<>();
public JaxBeanInfo getBeanInfo() {
return beanInfo;
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/UnmarshallerImpl.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/UnmarshallerImpl.java
index 53c32b3..10354bd 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/UnmarshallerImpl.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/UnmarshallerImpl.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
@@ -148,7 +148,7 @@
* Also, returned handler expects all the XML names to be interned.
*
*/
- public final XmlVisitor createUnmarshallerHandler(InfosetScanner scanner, boolean inplace, JaxBeanInfo expectedType ) {
+ public XmlVisitor createUnmarshallerHandler(InfosetScanner scanner, boolean inplace, JaxBeanInfo expectedType ) {
coordinator.reset(scanner,inplace,expectedType,idResolver);
XmlVisitor unmarshaller = coordinator;
@@ -284,7 +284,7 @@
@Override
- public final ValidationEventHandler getEventHandler() {
+ public ValidationEventHandler getEventHandler() {
try {
return super.getEventHandler();
} catch (JAXBException e) {
@@ -298,7 +298,7 @@
* <p>
* The default handler ignores any errors, and for that this method returns false.
*/
- public final boolean hasEventHandler() {
+ public boolean hasEventHandler() {
return getEventHandler()!=this;
}
@@ -311,17 +311,17 @@
}
@Override
- public final Object unmarshal( Node node ) throws JAXBException {
+ public Object unmarshal(Node node ) throws JAXBException {
return unmarshal0(node,null);
}
// just to make the the test harness happy by making this method accessible
@Deprecated
- public final Object unmarshal( SAXSource source ) throws JAXBException {
+ public Object unmarshal(SAXSource source ) throws JAXBException {
return super.unmarshal(source);
}
- public final Object unmarshal0( Node node, JaxBeanInfo expectedType ) throws JAXBException {
+ public Object unmarshal0(Node node, JaxBeanInfo expectedType ) throws JAXBException {
try {
final DOMScanner scanner = new DOMScanner();
@@ -589,7 +589,6 @@
/**
* Must be called from same thread which created the UnmarshallerImpl instance.
- * @throws IOException
*/
@Override
public void close() throws IOException {
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 07a4d08..51bd846 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
@@ -1,6 +1,5 @@
/*
- * Copyright (c) 1997, 2022 Oracle and/or its affiliates and others.
- * 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
@@ -196,7 +195,7 @@
* requires that we have two objects unmarshalled (a JAXBElement X and a value object Y bound to an XML type.)
*
* <p>
- * So to make room for storing both, this {@link #backup} field is used. When we create X instance
+ * So to make room for storing both, this {@code backup} field is used. When we create X instance
* in the above example, we set that to {@code state.prev.target} and displace its old value to
* {@code state.prev.backup} (where Y goes to {@code state.target}.) Upon the completion of the unmarshalling
* of Y, we revert this.
@@ -209,8 +208,8 @@
* <p>
* Yes, I know this is a hack, and no, I'm not proud of it.
*
- * @see ElementBeanInfoImpl.IntercepterLoader#startElement(State, TagName)
- * @see ElementBeanInfoImpl.IntercepterLoader#intercept(State, Object)
+ * see ElementBeanInfoImpl.IntercepterLoader#startElement(State, TagName)
+ * see ElementBeanInfoImpl.IntercepterLoader#intercept(State, Object)
*/
private Object backup;
@@ -552,7 +551,7 @@
}
@Override
- public final void endElement(TagName tagName) throws SAXException {
+ public void endElement(TagName tagName) throws SAXException {
pushCoordinator();
try {
State child = current;
@@ -1242,7 +1241,7 @@
/**
* When called from within the realm of the unmarshaller, this method
- * returns the current {@link UnmarshallingContext} in charge.
+ * returns the current in charge.
*/
public static UnmarshallingContext getInstance() {
return (UnmarshallingContext) Coordinator._getInstance();
@@ -1252,7 +1251,6 @@
* Allows to access elements which are expected in current state.
* Useful for getting elements for current parent.
*
- * @return
*/
public Collection<QName> getCurrentExpectedElements() {
pushCoordinator();
@@ -1269,7 +1267,6 @@
* Allows to access attributes which are expected in current state.
* Useful for getting attributes for current parent.
*
- * @return
*/
public Collection<QName> getCurrentExpectedAttributes() {
pushCoordinator();
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/XsiNilLoader.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/XsiNilLoader.java
index cc6e195..e9d3640 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/XsiNilLoader.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/unmarshaller/XsiNilLoader.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
@@ -12,7 +12,6 @@
import org.glassfish.jaxb.runtime.DatatypeConverterImpl;
import org.glassfish.jaxb.runtime.api.AccessorException;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor;
import jakarta.xml.bind.JAXBElement;
import org.xml.sax.SAXException;
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 e11c331..85e41a6 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
@@ -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
@@ -57,7 +57,7 @@
// look for @xsi:type
Attributes atts = ea.atts;
- int idx = atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"type");
+ int idx = atts.getIndex(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI,"type");
if(idx>=0) {
// we'll consume the value only when it's a recognized value,
@@ -105,8 +105,7 @@
@Override
public Collection<QName> getExpectedAttributes() {
- final Collection<QName> expAttrs = new HashSet<>();
- expAttrs.addAll(super.getExpectedAttributes());
+ final Collection<QName> expAttrs = new HashSet<>(super.getExpectedAttributes());
expAttrs.add(XsiTypeQNAME);
return Collections.unmodifiableCollection(expAttrs);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/Tree.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/Tree.java
index df09156..d597daa 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/Tree.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/Tree.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
@@ -76,7 +76,7 @@
normalizedChildren.add(t);
}
- return new Group(kind,normalizedChildren.toArray(new Tree[normalizedChildren.size()]));
+ return new Group(kind,normalizedChildren.toArray(new Tree[0]));
}
/**
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 e68ba06..ac3f542 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
@@ -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
@@ -1351,7 +1351,7 @@
buf.append(",elementDecls=").append(elementDecls);
buf.append(",enums=").append(enums);
buf.append("]");
- return super.toString();
+ return buf.toString();
}
/**
@@ -1370,7 +1370,7 @@
*/
abstract class ElementDeclaration {
/**
- * Returns true if two {@link ElementDeclaration}s are representing
+ * Returns true if two s are representing
* the same schema fragment.
*/
@Override
@@ -1427,7 +1427,6 @@
/**
* Examine the specified element ref and determine if a swaRef attribute needs to be generated
- * @param typeRef
*/
private boolean generateSwaRefAdapter(NonElementRef<T,C> typeRef) {
return generateSwaRefAdapter(typeRef.getSource());
@@ -1445,7 +1444,7 @@
}
/**
- * Debug information of what's in this {@link XmlSchemaGenerator}.
+ * Debug information of what's in this .
*/
@Override
public String toString() {
@@ -1563,7 +1562,7 @@
* JAX-RPC wants the namespaces to be sorted in the reverse order
* so that the empty namespace "" comes to the very end. Don't ask me why.
*/
- private static final Comparator<String> NAMESPACE_COMPARATOR = new Comparator<String>() {
+ private static final Comparator<String> NAMESPACE_COMPARATOR = new Comparator<>() {
@Override
public int compare(String lhs, String rhs) {
return -lhs.compareTo(rhs);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Annotated.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Annotated.java
index 14ee5ae..2ce72da 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Annotated.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Annotated.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,9 +25,9 @@
@XmlElement
- public Annotation annotation();
+ Annotation annotation();
@XmlAttribute
- public Annotated id(String value);
+ Annotated id(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Annotation.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Annotation.java
index 9735547..57f3968 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Annotation.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Annotation.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
@@ -26,12 +26,12 @@
@XmlElement
- public Appinfo appinfo();
+ Appinfo appinfo();
@XmlElement
- public Documentation documentation();
+ Documentation documentation();
@XmlAttribute
- public Annotation id(String value);
+ Annotation id(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Appinfo.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Appinfo.java
index fe79ae6..71690bf 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Appinfo.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Appinfo.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
@@ -26,6 +26,6 @@
@XmlAttribute
- public Appinfo source(String value);
+ Appinfo source(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/AttrDecls.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/AttrDecls.java
index fe82294..40a5a48 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/AttrDecls.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/AttrDecls.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
@@ -24,9 +24,9 @@
@XmlElement
- public LocalAttribute attribute();
+ LocalAttribute attribute();
@XmlElement
- public Wildcard anyAttribute();
+ Wildcard anyAttribute();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/AttributeType.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/AttributeType.java
index bbbe028..99ec857 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/AttributeType.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/AttributeType.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
@@ -26,6 +26,6 @@
@XmlAttribute
- public AttributeType type(QName value);
+ AttributeType type(QName value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexContent.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexContent.java
index 22bde11..9288c34 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexContent.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexContent.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
@@ -26,12 +26,12 @@
@XmlElement
- public ComplexExtension extension();
+ ComplexExtension extension();
@XmlElement
- public ComplexRestriction restriction();
+ ComplexRestriction restriction();
@XmlAttribute
- public ComplexContent mixed(boolean value);
+ ComplexContent mixed(boolean value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexRestriction.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexRestriction.java
index 3446ef9..65e946b 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexRestriction.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexRestriction.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,6 @@
@XmlAttribute
- public ComplexRestriction base(QName value);
+ ComplexRestriction base(QName value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexType.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexType.java
index 0886c14..fd24ea0 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexType.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexType.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
@@ -26,21 +26,21 @@
@XmlAttribute("final")
- public ComplexType _final(String[] value);
+ ComplexType _final(String[] value);
@XmlAttribute("final")
- public ComplexType _final(String value);
+ ComplexType _final(String value);
@XmlAttribute
- public ComplexType block(String[] value);
+ ComplexType block(String[] value);
@XmlAttribute
- public ComplexType block(String value);
+ ComplexType block(String value);
@XmlAttribute("abstract")
- public ComplexType _abstract(boolean value);
+ ComplexType _abstract(boolean value);
@XmlAttribute
- public ComplexType name(String value);
+ ComplexType name(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexTypeHost.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexTypeHost.java
index 54ec1ab..0079a76 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexTypeHost.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexTypeHost.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
@@ -24,6 +24,6 @@
@XmlElement
- public ComplexType complexType();
+ ComplexType complexType();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexTypeModel.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexTypeModel.java
index 4996d00..52f9276 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexTypeModel.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ComplexTypeModel.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,12 +25,12 @@
@XmlElement
- public SimpleContent simpleContent();
+ SimpleContent simpleContent();
@XmlElement
- public ComplexContent complexContent();
+ ComplexContent complexContent();
@XmlAttribute
- public ComplexTypeModel mixed(boolean value);
+ ComplexTypeModel mixed(boolean value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Documentation.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Documentation.java
index fc2ea10..e56b5ed 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Documentation.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Documentation.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
@@ -26,9 +26,9 @@
@XmlAttribute
- public Documentation source(String value);
+ Documentation source(String value);
@XmlAttribute(ns = "http://www.w3.org/XML/1998/namespace")
- public Documentation lang(String value);
+ Documentation lang(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Element.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Element.java
index 8fb5135..4a7dd90 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Element.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Element.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
@@ -26,15 +26,15 @@
@XmlAttribute
- public Element type(QName value);
+ Element type(QName value);
@XmlAttribute
- public Element block(String[] value);
+ Element block(String[] value);
@XmlAttribute
- public Element block(String value);
+ Element block(String value);
@XmlAttribute
- public Element nillable(boolean value);
+ Element nillable(boolean value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ExtensionType.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ExtensionType.java
index 87edeb0..fa68941 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ExtensionType.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/ExtensionType.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
@@ -26,6 +26,6 @@
@XmlAttribute
- public ExtensionType base(QName value);
+ ExtensionType base(QName value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/FixedOrDefault.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/FixedOrDefault.java
index 7f389af..93ad9be 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/FixedOrDefault.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/FixedOrDefault.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
@@ -24,9 +24,9 @@
@XmlAttribute("default")
- public FixedOrDefault _default(String value);
+ FixedOrDefault _default(String value);
@XmlAttribute
- public FixedOrDefault fixed(String value);
+ FixedOrDefault fixed(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Import.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Import.java
index c93ba41..2d67c84 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Import.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Import.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
@@ -26,9 +26,9 @@
@XmlAttribute
- public Import namespace(String value);
+ Import namespace(String value);
@XmlAttribute
- public Import schemaLocation(String value);
+ Import schemaLocation(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/List.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/List.java
index 2d8d9e3..e6b834f 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/List.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/List.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,6 @@
@XmlAttribute
- public List itemType(QName value);
+ List itemType(QName value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/LocalAttribute.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/LocalAttribute.java
index f01595f..ee43862 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/LocalAttribute.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/LocalAttribute.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,15 +28,15 @@
@XmlAttribute
- public LocalAttribute form(String value);
+ LocalAttribute form(String value);
@XmlAttribute
- public LocalAttribute name(String value);
+ LocalAttribute name(String value);
@XmlAttribute
- public LocalAttribute ref(QName value);
+ LocalAttribute ref(QName value);
@XmlAttribute
- public LocalAttribute use(String value);
+ LocalAttribute use(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/LocalElement.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/LocalElement.java
index 78d5fab..7dec37d 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/LocalElement.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/LocalElement.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,12 +28,12 @@
@XmlAttribute
- public LocalElement form(String value);
+ LocalElement form(String value);
@XmlAttribute
- public LocalElement name(String value);
+ LocalElement name(String value);
@XmlAttribute
- public LocalElement ref(QName value);
+ LocalElement ref(QName value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/NestedParticle.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/NestedParticle.java
index 133e740..308b0e7 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/NestedParticle.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/NestedParticle.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
@@ -24,15 +24,15 @@
@XmlElement
- public LocalElement element();
+ LocalElement element();
@XmlElement
- public Any any();
+ Any any();
@XmlElement
- public ExplicitGroup sequence();
+ ExplicitGroup sequence();
@XmlElement
- public ExplicitGroup choice();
+ ExplicitGroup choice();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/NoFixedFacet.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/NoFixedFacet.java
index 8c626e4..04f518e 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/NoFixedFacet.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/NoFixedFacet.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
@@ -24,6 +24,6 @@
@XmlAttribute
- public NoFixedFacet value(String value);
+ NoFixedFacet value(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Occurs.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Occurs.java
index 41b306b..89165d8 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Occurs.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Occurs.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
@@ -24,12 +24,12 @@
@XmlAttribute
- public Occurs minOccurs(int value);
+ Occurs minOccurs(int value);
@XmlAttribute
- public Occurs maxOccurs(String value);
+ Occurs maxOccurs(String value);
@XmlAttribute
- public Occurs maxOccurs(int value);
+ Occurs maxOccurs(int value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Schema.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Schema.java
index cc21778..5707df6 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Schema.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Schema.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
@@ -26,39 +26,39 @@
@XmlElement
- public Annotation annotation();
+ Annotation annotation();
@XmlElement("import")
- public Import _import();
+ Import _import();
@XmlAttribute
- public Schema targetNamespace(String value);
+ Schema targetNamespace(String value);
@XmlAttribute(ns = "http://www.w3.org/XML/1998/namespace")
- public Schema lang(String value);
+ Schema lang(String value);
@XmlAttribute
- public Schema id(String value);
+ Schema id(String value);
@XmlAttribute
- public Schema elementFormDefault(String value);
+ Schema elementFormDefault(String value);
@XmlAttribute
- public Schema attributeFormDefault(String value);
+ Schema attributeFormDefault(String value);
@XmlAttribute
- public Schema blockDefault(String[] value);
+ Schema blockDefault(String[] value);
@XmlAttribute
- public Schema blockDefault(String value);
+ Schema blockDefault(String value);
@XmlAttribute
- public Schema finalDefault(String[] value);
+ Schema finalDefault(String[] value);
@XmlAttribute
- public Schema finalDefault(String value);
+ Schema finalDefault(String value);
@XmlAttribute
- public Schema version(String value);
+ Schema version(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SchemaTop.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SchemaTop.java
index f622d3a..5f8f120 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SchemaTop.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SchemaTop.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
@@ -24,9 +24,9 @@
@XmlElement
- public TopLevelAttribute attribute();
+ TopLevelAttribute attribute();
@XmlElement
- public TopLevelElement element();
+ TopLevelElement element();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleContent.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleContent.java
index b3d6cc5..d52cd75 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleContent.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleContent.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,9 +25,9 @@
@XmlElement
- public SimpleExtension extension();
+ SimpleExtension extension();
@XmlElement
- public SimpleRestriction restriction();
+ SimpleRestriction restriction();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleDerivation.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleDerivation.java
index 70a7165..719cf48 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleDerivation.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleDerivation.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
@@ -24,12 +24,12 @@
@XmlElement
- public SimpleRestriction restriction();
+ SimpleRestriction restriction();
@XmlElement
- public Union union();
+ Union union();
@XmlElement
- public List list();
+ List list();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleRestrictionModel.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleRestrictionModel.java
index 0d1d7c5..9bfa506 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleRestrictionModel.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleRestrictionModel.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
@@ -27,9 +27,9 @@
@XmlAttribute
- public SimpleRestrictionModel base(QName value);
+ SimpleRestrictionModel base(QName value);
@XmlElement
- public NoFixedFacet enumeration();
+ NoFixedFacet enumeration();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleType.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleType.java
index 235d3d1..b6d5e64 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleType.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleType.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
@@ -26,12 +26,12 @@
@XmlAttribute("final")
- public SimpleType _final(String value);
+ SimpleType _final(String value);
@XmlAttribute("final")
- public SimpleType _final(String[] value);
+ SimpleType _final(String[] value);
@XmlAttribute
- public SimpleType name(String value);
+ SimpleType name(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleTypeHost.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleTypeHost.java
index 5ef2d11..5112d2a 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleTypeHost.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/SimpleTypeHost.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
@@ -24,6 +24,6 @@
@XmlElement
- public SimpleType simpleType();
+ SimpleType simpleType();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TopLevelAttribute.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TopLevelAttribute.java
index 8ab7210..c019a73 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TopLevelAttribute.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TopLevelAttribute.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
@@ -26,6 +26,6 @@
@XmlAttribute
- public TopLevelAttribute name(String value);
+ TopLevelAttribute name(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TopLevelElement.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TopLevelElement.java
index e49a77f..9bcfbfc 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TopLevelElement.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TopLevelElement.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,18 +28,18 @@
@XmlAttribute("final")
- public TopLevelElement _final(String[] value);
+ TopLevelElement _final(String[] value);
@XmlAttribute("final")
- public TopLevelElement _final(String value);
+ TopLevelElement _final(String value);
@XmlAttribute("abstract")
- public TopLevelElement _abstract(boolean value);
+ TopLevelElement _abstract(boolean value);
@XmlAttribute
- public TopLevelElement substitutionGroup(QName value);
+ TopLevelElement substitutionGroup(QName value);
@XmlAttribute
- public TopLevelElement name(String value);
+ TopLevelElement name(String value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TypeDefParticle.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TypeDefParticle.java
index 2a6d185..b86d593 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TypeDefParticle.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/TypeDefParticle.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
@@ -24,12 +24,12 @@
@XmlElement
- public ExplicitGroup all();
+ ExplicitGroup all();
@XmlElement
- public ExplicitGroup sequence();
+ ExplicitGroup sequence();
@XmlElement
- public ExplicitGroup choice();
+ ExplicitGroup choice();
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Union.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Union.java
index 7db6838..ec9b198 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Union.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Union.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,6 @@
@XmlAttribute
- public Union memberTypes(QName[] value);
+ Union memberTypes(QName[] value);
}
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Wildcard.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Wildcard.java
index 6b422ff..f85d5f9 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Wildcard.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/schemagen/xmlschema/Wildcard.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
@@ -24,12 +24,12 @@
@XmlAttribute
- public Wildcard processContents(String value);
+ Wildcard processContents(String value);
@XmlAttribute
- public Wildcard namespace(String[] value);
+ Wildcard namespace(String[] value);
@XmlAttribute
- public Wildcard namespace(String value);
+ Wildcard namespace(String value);
}
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 a3c4adf..802efe3 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
@@ -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,7 +33,7 @@
/**
* The maximum capacity, used if a higher value is implicitly specified
* by either of the constructors with arguments.
- * MUST be a power of two <= 1<<30.
+ * MUST be a power of two {@literal <= 1<<30}.
*/
private static final int MAXIMUM_CAPACITY = 1 << 30;
diff --git a/jaxb-ri/runtime/impl/src/test/java/FilterList.java b/jaxb-ri/runtime/impl/src/test/java/FilterList.java
index 43fd0ad..8723ed5 100644
--- a/jaxb-ri/runtime/impl/src/test/java/FilterList.java
+++ b/jaxb-ri/runtime/impl/src/test/java/FilterList.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
@@ -78,12 +78,12 @@
/**
* Creates a new filtered list that filters objects in
- * the spcified {@link List}.
+ * the specified {@link List}.
*
* @param core
* {@link List} to be filtered.
* @param type
- * Out of all the objects in the <tt>core</tt> list,
+ * Out of all the objects in the {@code core} list,
* only objects of this type will be visible through
* this list.
*/
diff --git a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/MarshallingAbstractTest.java b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/MarshallingAbstractTest.java
index 2a3a23c..b46d2fd 100644
--- a/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/MarshallingAbstractTest.java
+++ b/jaxb-ri/runtime/impl/src/test/java/org/glassfish/jaxb/runtime/v2/schemagen/MarshallingAbstractTest.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 @@
static class Mapping {
@XmlElementWrapper(name = "list")
@XmlElement(name="element")
- Collection<A> list = new ArrayList<A>();
+ Collection<A> list = new ArrayList<>();
A element1;
A element2;
}
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 a6ad9b8..77f52d9 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
@@ -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
@@ -46,18 +46,15 @@
private static boolean checkNamespaces() throws Exception {
FileInputStream schema1 = new FileInputStream("schema1.xsd");
- BufferedReader reader = new BufferedReader(new InputStreamReader(schema1));
- String line;
- try {
+ try (BufferedReader reader = new BufferedReader(new InputStreamReader(schema1))) {
+ String line;
while ((line = reader.readLine()) != null) {
System.out.println(line);
if (line.contains("ref=\"ns1:myRef\"")) {
return true;
}
}
- } finally {
- reader.close();
}
return false;
}
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 3c12825..2492baa 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
@@ -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,9 +48,6 @@
this.deployments = new ArrayList<>();
}
- /**
- * {@inheritDoc}
- */
public List<JaxbDeployment> getDeployments() {
return Collections.unmodifiableList(this.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 1138ee5..b53fea3 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
@@ -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,9 +33,6 @@
@XmlElement(required = true)
private String contextRoot;
- /**
- * {@inheritDoc}
- */
public String getContextRoot() {
return this.contextRoot;
}
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 73804f5..96ff771 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
@@ -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,9 +43,6 @@
this.deployments = new ArrayList<>();
}
- /**
- * {@inheritDoc}
- */
public List<JaxbDeployment> getDeployments() {
return this.deployments;
}
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/AntErrorListener.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/AntErrorListener.java
index 1c9947e..6e0b10a 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/AntErrorListener.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/AntErrorListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -49,9 +49,8 @@
String getLocation(SAXParseException e) {
return MessageFormat.format(" {0}:{1} of {2}",
- new Object[]{
String.valueOf(e.getLineNumber()),
String.valueOf(e.getColumnNumber()),
- e.getSystemId()});
+ e.getSystemId());
}
}
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/ConsoleErrorReporter.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/ConsoleErrorReporter.java
index cc21aea..898f279 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/ConsoleErrorReporter.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/ConsoleErrorReporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,10 +48,9 @@
private void print(SAXParseException e) {
out.println(e.getMessage());
out.println(MessageFormat.format(" {0}:{1} of {2}",
- new Object[]{
String.valueOf(e.getLineNumber()),
String.valueOf(e.getColumnNumber()),
- e.getSystemId()}));
+ e.getSystemId()));
}
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/ErrorListener.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/ErrorListener.java
index 3926d07..1bcee7e 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/ErrorListener.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/ErrorListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,10 +20,10 @@
*/
public interface ErrorListener extends ErrorHandler {
@Override
- abstract void error (SAXParseException exception);
+ void error(SAXParseException exception);
@Override
- abstract void fatalError (SAXParseException exception);
+ void fatalError(SAXParseException exception);
@Override
- abstract void warning (SAXParseException exception);
+ void warning(SAXParseException exception);
}
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/NameUtil.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/NameUtil.java
index 7f9d094..27ad1ef 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/NameUtil.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/NameUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -55,7 +55,7 @@
public static String capitalize(String s) {
if (!isLower(s.charAt(0)))
return s;
- StringBuffer sb = new StringBuffer(s.length());
+ StringBuilder sb = new StringBuilder(s.length());
sb.append(Character.toUpperCase(s.charAt(0)));
sb.append(s.substring(1).toLowerCase());
return sb.toString();
@@ -119,11 +119,11 @@
// so there's not much point in rejecting things in this way.
// if (ss.size() == 0)
// throw new IllegalArgumentException("Zero-length identifier");
- return ss.toArray(new String[ss.size()]);
+ return ss.toArray(new String[0]);
}
protected static String toMixedCaseName(String[] ss, boolean startUpper) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if(ss.length>0) {
sb.append(startUpper ? ss[0] : ss[0].toLowerCase());
for (int i = 1; i < ss.length; i++)
@@ -138,7 +138,7 @@
if (cdrUpper)
for (int i = 1; i < ss.length; i++)
ss[i] = capitalize(ss[i]);
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if( ss.length>0 ) {
sb.append(startUpper ? ss[0] : ss[0].toLowerCase());
for (int i = 1; i < ss.length; i++)
@@ -167,7 +167,7 @@
* the generated code is a valid Java identifier.
*/
public static String toConstantName(String[] ss) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if( ss.length>0 ) {
sb.append(ss[0].toUpperCase());
for (int i = 1; i < ss.length; i++) {
@@ -231,7 +231,7 @@
* @param s source string to be escaped
*/
public static String escapeURI(String s) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for( int i = 0; i < s.length(); i++ ) {
char c = s.charAt(i);
if(Character.isSpaceChar(c)) {
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/TxwTask.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/TxwTask.java
index 81c6825..3a560d5 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/TxwTask.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/TxwTask.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -35,7 +35,7 @@
private File schemaFile;
// syntax style of RELAX NG source schema - "xml" or "compact"
- private static enum Style {
+ private enum Style {
COMPACT, XML, XMLSCHEMA, AUTO_DETECT
}
private Style style = Style.AUTO_DETECT;
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/builder/xsd/XmlSchemaBuilder.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/builder/xsd/XmlSchemaBuilder.java
index 2af91f2..30b6b33 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/builder/xsd/XmlSchemaBuilder.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/builder/xsd/XmlSchemaBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -231,17 +231,17 @@
/**
* We map model groups to interfaces.
*/
- private final Map<XSModelGroupDecl,Define> modelGroups = new HashMap<XSModelGroupDecl, Define>();
+ private final Map<XSModelGroupDecl,Define> modelGroups = new HashMap<>();
/**
* We map complex types to interfaces.
*/
- private final Map<XSComplexType,Define> complexTypes = new HashMap<XSComplexType,Define>();
+ private final Map<XSComplexType,Define> complexTypes = new HashMap<>();
/**
* ... and attribute groups
*/
- private final Map<XSAttGroupDecl,Define> attGroups = new HashMap<XSAttGroupDecl,Define>();
+ private final Map<XSAttGroupDecl,Define> attGroups = new HashMap<>();
private final Grammar grammar = new Grammar();
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Attribute.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Attribute.java
index a953bba..ff97b56 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Attribute.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Attribute.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,7 +47,7 @@
@Override
void generate(JDefinedClass clazz, NodeSet nset, Set<Prop> props) {
- Set<JType> types = new HashSet<JType>();
+ Set<JType> types = new HashSet<>();
for( Leaf l : collectChildren() ) {
if (l instanceof Text) {
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Define.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Define.java
index f512283..6dad4ef 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Define.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Define.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -60,7 +60,7 @@
void generate(NodeSet nset) {
if(clazz==null) return;
- HashSet<Prop> props = new HashSet<Prop>();
+ HashSet<Prop> props = new HashSet<>();
for( Leaf l : this )
l.generate(clazz,nset,props);
}
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Element.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Element.java
index e17b93b..122d52d 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Element.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Element.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,7 +131,7 @@
@Override
public void generate(NodeSet nset) {
- HashSet<Prop> props = new HashSet<Prop>();
+ HashSet<Prop> props = new HashSet<>();
for( Leaf l : Element.this )
l.generate(clazz,nset, props);
}
@@ -178,7 +178,7 @@
// TODO: code share with Attribute
@Override
public void generate(JDefinedClass clazz, NodeSet nset, Set<Prop> props) {
- Set<JType> types = new HashSet<JType>();
+ Set<JType> types = new HashSet<>();
for( Leaf l : collectChildren() ) {
if (l instanceof Text) {
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Grammar.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Grammar.java
index 9c3bf7e..1b5959a 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Grammar.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Grammar.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,7 +24,7 @@
* @author Kohsuke Kawaguchi
*/
public class Grammar extends Define {
- private final Map<String,Define> patterns = new HashMap<String,Define>();
+ private final Map<String,Define> patterns = new HashMap<>();
public Grammar() {
super(null,START);
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Leaf.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Leaf.java
index dafc7b4..3d680e1 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Leaf.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Leaf.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -76,7 +76,7 @@
* (including itself)
*/
public final Iterable<Leaf> siblings() {
- return new Iterable<Leaf>() {
+ return new Iterable<>() {
@Override
public Iterator<Leaf> iterator() {
return new CycleIterator(Leaf.this);
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Node.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Node.java
index df4619e..1926259 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Node.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Node.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,7 +51,7 @@
}
/**
- * Adds the given {@link Leaf} and their sibling as children of this {@link Node}.
+ * Adds the given {@link Leaf} and their sibling as children of this .
*/
public final void addChild(Leaf child) {
if(this.leaf==null)
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/NodeSet.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/NodeSet.java
index d5bab92..9f58223 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/NodeSet.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/NodeSet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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 @@
/**
* Set of all the {@link Element}s that can be root.
*/
- private final Set<Element> rootElements = new HashSet<Element>();
+ private final Set<Element> rootElements = new HashSet<>();
/** The namespace URI declared in {@link XmlNamespace}. */
/*package*/ final String defaultNamespace;
@@ -52,7 +52,7 @@
markRoot(entry.siblings(),rootElements);
// decide what to put in @XmlNamespace
- Set<String> ns = new HashSet<String>();
+ Set<String> ns = new HashSet<>();
for( Element e : rootElements )
ns.add(e.name.getNamespaceURI());
@@ -114,7 +114,7 @@
@SuppressWarnings("unchecked")
public <T extends WriterNode> Collection<T> subset(Class<T> t) {
- List<T> r = new ArrayList<T>(size());
+ List<T> r = new ArrayList<>(size());
for( WriterNode n : this )
if(t.isInstance(n))
r.add((T)n);
@@ -141,7 +141,7 @@
for( int i=2; true; i++ ) {
try {
return opts._package._class(
- JMod.PUBLIC, NameUtil.toClassName(name+String.valueOf(i)), ClassType.INTERFACE );
+ JMod.PUBLIC, NameUtil.toClassName(name+ i), ClassType.INTERFACE );
} catch (JClassAlreadyExistsException e1) {
; // continue
}
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Text.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Text.java
index 6a8b80f..d23da4b 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Text.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/Text.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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 @@
*/
public interface Text {
/**
- * Obtains the Java class of this {@link Text}.
+ * Obtains the Java class of this .
*/
JType getDatatype(NodeSet nset);
}
diff --git a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/XmlNode.java b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/XmlNode.java
index a0d9496..fded62a 100644
--- a/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/XmlNode.java
+++ b/jaxb-ri/txw/compiler/src/main/java/com/sun/tools/txw2/model/XmlNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,9 +40,9 @@
* Expand all refs and collect all children.
*/
protected final Set<Leaf> collectChildren() {
- Set<Leaf> result = new HashSet<Leaf>();
+ Set<Leaf> result = new HashSet<>();
- Stack<Node> work = new Stack<Node>();
+ Stack<Node> work = new Stack<>();
work.push(this);
while(!work.isEmpty()) {
diff --git a/jaxb-ri/txw/compiler/src/main/resources/com/sun/tools/txw2/messages.properties b/jaxb-ri/txw/compiler/src/main/resources/com/sun/tools/txw2/messages.properties
index 3e10ece..cc67578 100644
--- a/jaxb-ri/txw/compiler/src/main/resources/com/sun/tools/txw2/messages.properties
+++ b/jaxb-ri/txw/compiler/src/main/resources/com/sun/tools/txw2/messages.properties
@@ -16,7 +16,7 @@
\ \ -c : The input schema is written in the RELAX NG compact syntax\n\
\ \ -x : The input schema is written in the RELAX NG XML syntax\n\
\ \ -xsd : The input schema is written in the XML SChema\n\
-\ \ -h : Generate code that allows method invocation chaining\n
+\ \ -h : Generate code that allows method invocation chaining
# Not concatenated with any other string (written on a separate line).
missingOperand = an operand is missing
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/Content.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/Content.java
index b62bae1..9f98dc9 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/Content.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/Content.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -23,14 +23,6 @@
return next;
}
- /**
- *
- * @param doc
- * A {@link Content} object is so light-weight that
- * it doesn't even remember what document it belongs to.
- * So the caller needs to "remind" a {@link Content}
- * who its owner is.
- */
final void setNext(Document doc,Content next) {
assert next!=null;
assert this.next==null : "next of "+this+" is already set to "+this.next;
@@ -46,7 +38,7 @@
}
/**
- * Returns true if this {@link Content} can guarantee that
+ * Returns true if this can guarantee that
* no more new namespace decls is necessary for the currently
* pending start tag.
*/
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 2108c57..90e2e13 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,73 +43,78 @@
*/
void print(DT dt, NamespaceResolver resolver, StringBuilder buf);
- static final List<DatatypeWriter<Object>> BUILTIN = Collections.unmodifiableList(new AbstractList<DatatypeWriter<Object>>() {
+ List<DatatypeWriter<Object>> BUILTIN = Collections.unmodifiableList(new AbstractList<>() {
- @SuppressWarnings({"unchecked", "rawtypes"})
- private DatatypeWriter<Object>[] BUILTIN_ARRAY = new DatatypeWriter[] {
- new DatatypeWriter<String>() {
- @Override
- public Class<String> getType() {
- return String.class;
+ @SuppressWarnings({"unchecked"})
+ private DatatypeWriter<Object>[] BUILTIN_ARRAY = new DatatypeWriter[]{
+ new DatatypeWriter<String>() {
+ @Override
+ public Class<String> getType() {
+ return String.class;
+ }
+
+ @Override
+ public void print(String s, NamespaceResolver resolver, StringBuilder buf) {
+ buf.append(s);
+ }
+ },
+ new DatatypeWriter<Integer>() {
+ @Override
+ public Class<Integer> getType() {
+ return Integer.class;
+ }
+
+ @Override
+ public void print(Integer i, NamespaceResolver resolver, StringBuilder buf) {
+ buf.append(i);
+ }
+ },
+ new DatatypeWriter<Float>() {
+ @Override
+ public Class<Float> getType() {
+ return Float.class;
+ }
+
+ @Override
+ public void print(Float f, NamespaceResolver resolver, StringBuilder buf) {
+ buf.append(f);
+ }
+ },
+ new DatatypeWriter<Double>() {
+ @Override
+ public Class<Double> getType() {
+ return Double.class;
+ }
+
+ @Override
+ public void print(Double d, NamespaceResolver resolver, StringBuilder buf) {
+ buf.append(d);
+ }
+ },
+ new DatatypeWriter<QName>() {
+ @Override
+ public Class<QName> getType() {
+ return QName.class;
+ }
+
+ @Override
+ public void print(QName qn, NamespaceResolver resolver, StringBuilder buf) {
+ String p = resolver.getPrefix(qn.getNamespaceURI());
+ if (p.length() != 0)
+ buf.append(p).append(':');
+ buf.append(qn.getLocalPart());
+ }
}
- @Override
- public void print(String s, NamespaceResolver resolver, StringBuilder buf) {
- buf.append(s);
- }
- },
- new DatatypeWriter<Integer>() {
- @Override
- public Class<Integer> getType() {
- return Integer.class;
- }
- @Override
- public void print(Integer i, NamespaceResolver resolver, StringBuilder buf) {
- buf.append(i);
- }
- },
- new DatatypeWriter<Float>() {
- @Override
- public Class<Float> getType() {
- return Float.class;
- }
- @Override
- public void print(Float f, NamespaceResolver resolver, StringBuilder buf) {
- buf.append(f);
- }
- },
- new DatatypeWriter<Double>() {
- @Override
- public Class<Double> getType() {
- return Double.class;
- }
- @Override
- public void print(Double d, NamespaceResolver resolver, StringBuilder buf) {
- buf.append(d);
- }
- },
- new DatatypeWriter<QName>() {
- @Override
- public Class<QName> getType() {
- return QName.class;
- }
- @Override
- public void print(QName qn, NamespaceResolver resolver, StringBuilder buf) {
- String p = resolver.getPrefix(qn.getNamespaceURI());
- if(p.length()!=0)
- buf.append(p).append(':');
- buf.append(qn.getLocalPart());
- }
- }
};
-
+
@Override
public DatatypeWriter<Object> get(int n) {
- return BUILTIN_ARRAY[n];
+ return BUILTIN_ARRAY[n];
}
@Override
public int size() {
- return BUILTIN_ARRAY.length;
+ return BUILTIN_ARRAY.length;
}
- });
+ });
}
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/NamespaceSupport.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/NamespaceSupport.java
index ca429f9..35c6263 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/NamespaceSupport.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/NamespaceSupport.java
@@ -202,7 +202,7 @@
// Extend the array if necessary
if (contextPos >= max) {
- Context newContexts[] = new Context[max*2];
+ Context[] newContexts = new Context[max*2];
System.arraycopy(contexts, 0, newContexts, 0, max);
max *= 2;
contexts = newContexts;
@@ -335,10 +335,10 @@
* is an undeclared prefix.
* @see #declarePrefix
* @see java.lang.String#intern */
- public String [] processName (String qName, String parts[],
- boolean isAttribute)
+ public String [] processName (String qName, String[] parts,
+ boolean isAttribute)
{
- String myParts[] = currentContext.processName(qName, isAttribute);
+ String[] myParts = currentContext.processName(qName, isAttribute);
if (myParts == null) {
return null;
} else {
@@ -508,7 +508,7 @@
// Internal state.
////////////////////////////////////////////////////////////////////
- private Context contexts[];
+ private Context[] contexts;
private Context currentContext;
private int contextPos;
private boolean namespaceDeclUris;
@@ -622,7 +622,7 @@
*/
String [] processName (String qName, boolean isAttribute)
{
- String name[];
+ String[] name;
Hashtable<String, String[]> table;
// Select the appropriate table.
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/StartTag.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/StartTag.java
index c2d0c3c..5e1f5a2 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/StartTag.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/StartTag.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -192,7 +192,7 @@
}
/**
- * A {@link StartTag} can be only written after
+ * A can be only written after
* we are sure that all the necessary namespace declarations are given.
*/
@Override
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/TypedXmlWriter.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/TypedXmlWriter.java
index 5e99c1b..08d0802 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/TypedXmlWriter.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/TypedXmlWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -198,7 +198,7 @@
* The typed XML writer interface used to write the children of
* the new child element.
* @return
- * always return non-null {@link TypedXmlWriter} that can be used
+ * always return non-null that can be used
* to write the contents of the newly created child element.
* @see #_element(String, String, Class)
*/
@@ -220,7 +220,7 @@
* the new child element.
*
* @return
- * always return non-null {@link TypedXmlWriter} that can be used
+ * always return non-null that can be used
* to write the contents of the newly created child element.
*/
<T extends TypedXmlWriter> T _element( String nsUri, String localName, Class<T> contentModel );
@@ -238,7 +238,7 @@
* The typed XML writer interface used to write the children of
* the new child element.
* @return
- * always return non-null {@link TypedXmlWriter} that can be used
+ * always return non-null that can be used
* to write the contents of the newly created child element.
* @see #_element(String, String, Class)
*/
@@ -257,7 +257,7 @@
* The typed XML writer interface used to write the children of
* the new child element.
* @return
- * always return non-null {@link TypedXmlWriter} that can be used
+ * always return non-null that can be used
* to write the contents of the newly created child element.
* @see #_element(String, String, Class)
*/
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/CharacterEscapeHandler.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/CharacterEscapeHandler.java
index 2a83fc6..ece1a7b 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/CharacterEscapeHandler.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/CharacterEscapeHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,6 @@
* @param out writer
* @throws java.io.IOException for errors
*/
- void escape( char ch[], int start, int length, boolean isAttVal, Writer out ) throws IOException;
+ void escape(char[] ch, int start, int length, boolean isAttVal, Writer out ) throws IOException;
}
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/DataWriter.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/DataWriter.java
index 13d612f..d4ba20d 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/DataWriter.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/DataWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -177,7 +177,6 @@
* <p>This method is especially useful if the writer failed
* with an exception the last time through.</p>
*
- * @see XMLWriter#reset()
*/
@Override
public void reset ()
@@ -300,7 +299,7 @@
* @see XMLWriter#characters(char[], int, int)
*/
@Override
- public void characters (char ch[], int start, int length)
+ public void characters (char[] ch, int start, int length)
throws SAXException
{
state = SEEN_DATA;
@@ -308,7 +307,7 @@
}
@Override
- public void comment(char ch[], int start, int length) throws SAXException {
+ public void comment(char[] ch, int start, int length) throws SAXException {
if (depth > 0) {
super.characters("\n");
}
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/DomSerializer.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/DomSerializer.java
index 029d9cc..3e055e0 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/DomSerializer.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/DomSerializer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -198,7 +198,7 @@
// process namespace bindings
for( int i=0; i<unprocessedNamespaces.size(); i+=2 ) {
- String prefix = unprocessedNamespaces.get(i+0);
+ String prefix = unprocessedNamespaces.get(i);
String uri = unprocessedNamespaces.get(i+1);
String qname;
@@ -240,7 +240,7 @@
_nodeStk.push(element);
}
- private final Node getParent() {
+ private Node getParent() {
return _nodeStk.peek();
}
@@ -261,7 +261,7 @@
}
@Override
- public void comment(char ch[], int start, int length) throws SAXException {
+ public void comment(char[] ch, int start, int length) throws SAXException {
getParent().appendChild(_document.createComment(new String(ch,start,length)));
}
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/IndentingXMLFilter.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/IndentingXMLFilter.java
index 5312a98..98ba0d5 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/IndentingXMLFilter.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/IndentingXMLFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -212,7 +212,7 @@
* @see XMLWriter#characters(char[], int, int)
*/
@Override
- public void characters (char ch[], int start, int length)
+ public void characters (char[] ch, int start, int length)
throws SAXException
{
state = SEEN_DATA;
@@ -220,7 +220,7 @@
}
@Override
- public void comment(char ch[], int start, int length) throws SAXException {
+ public void comment(char[] ch, int start, int length) throws SAXException {
if (depth > 0) {
writeNewLine();
}
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/IndentingXMLStreamWriter.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/IndentingXMLStreamWriter.java
index cca5218..f31afb0 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/IndentingXMLStreamWriter.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/IndentingXMLStreamWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -103,7 +103,7 @@
/**
* Print indentation for the current level.
*
- * @exception org.xml.sax.SAXException If there is an error
+ * @exception XMLStreamException If there is an error
* writing the indentation characters, or if a filter
* further down the chain raises an exception.
*/
diff --git a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/XMLWriter.java b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/XMLWriter.java
index f65cca6..c96b64c 100644
--- a/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/XMLWriter.java
+++ b/jaxb-ri/txw/runtime/src/main/java/com/sun/xml/txw2/output/XMLWriter.java
@@ -524,7 +524,7 @@
write(p);
write("=\"");
}
- char ch[] = u.toCharArray();
+ char[] ch = u.toCharArray();
writeEsc(ch, 0, ch.length, true);
write('\"');
}
@@ -600,7 +600,7 @@
* @see org.xml.sax.ContentHandler#characters(char[], int, int)
*/
@Override
- public void characters (char ch[], int start, int len)
+ public void characters (char[] ch, int start, int len)
throws SAXException
{
try {
@@ -633,7 +633,7 @@
* @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
*/
@Override
- public void ignorableWhitespace (char ch[], int start, int length)
+ public void ignorableWhitespace (char[] ch, int start, int length)
throws SAXException
{
try {
@@ -893,7 +893,7 @@
write('>');
startTagIsClosed = true;
}
- char ch[] = data.toCharArray();
+ char[] ch = data.toCharArray();
characters(ch, 0, ch.length);
} catch( IOException e ) {
throw new SAXException(e);
@@ -942,7 +942,7 @@
}
@Override
- public void comment(char ch[], int start, int length) throws SAXException {
+ public void comment(char[] ch, int start, int length) throws SAXException {
try {
output.write("<!--");
output.write(ch,start,length);
@@ -992,7 +992,7 @@
private void writeAttributes (Attributes atts) throws IOException, SAXException {
int len = atts.getLength();
for (int i = 0; i < len; i++) {
- char ch[] = atts.getValue(i).toCharArray();
+ char[] ch = atts.getValue(i).toCharArray();
write(' ');
writeName(atts.getURI(i), atts.getLocalName(i),
atts.getQName(i), false);
@@ -1014,8 +1014,8 @@
* the characters, this method will throw an
* IOException wrapped in a SAXException.
*/
- private void writeEsc (char ch[], int start,
- int length, boolean isAttVal)
+ private void writeEsc (char[] ch, int start,
+ int length, boolean isAttVal)
throws SAXException, IOException
{
escapeHandler.escape(ch, start, length, isAttVal, output);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Driver.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Driver.java
index fec4d73..898492d 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Driver.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Driver.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
@@ -93,7 +93,7 @@
* Set useSystemProxies if needed
*/
private static void setupProxies() {
- Object setProperty = AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ Object setProperty = AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public Object run() {
return System.getProperty(SYSTEM_PROXY_PROPERTY);
@@ -320,7 +320,7 @@
System.out.println("Graph for "+ct.getName());
System.out.println(tree.toString());
Graph g = new Graph(tree);
- System.out.println(g.toString());
+ System.out.println(g);
System.out.println();
}
return 0;
@@ -438,7 +438,7 @@
/**
* Operation mode.
*/
- private static enum Mode {
+ private enum Mode {
// normal mode. compile the code
CODE,
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/ModelLoader.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/ModelLoader.java
index 1601301..1a58c65 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/ModelLoader.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/ModelLoader.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
@@ -186,9 +186,9 @@
*
* <p>
* This parser will parse a DOM forest as:
- * DOMForestParser -->
- * ExtensionBindingChecker -->
- * ProhibitedFeatureFilter -->
+ * DOMForestParser --{@literal >}
+ * ExtensionBindingChecker --{@literal >}
+ * ProhibitedFeatureFilter --{@literal >}
* XSOMParser
*/
private class XMLSchemaParser implements XMLParser {
@@ -372,9 +372,7 @@
/**
* Potentially problematic - make sure the parser instance passed is initialized
* with proper security feature.
- *
- * @param parser
- * @return
+ *
*/
public XSOMParser createXSOMParser(XMLParser parser) {
// set up other parameters to XSOMParser
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Options.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Options.java
index 71a2754..890dd2f 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Options.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Options.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
@@ -24,6 +24,7 @@
import java.net.URLClassLoader;
import java.nio.charset.Charset;
import java.nio.charset.IllegalCharsetNameException;
+import java.nio.charset.StandardCharsets;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.text.SimpleDateFormat;
@@ -349,7 +350,6 @@
* by taking {@link #classpaths} into account. That means
* "-cp plugin.jar" has to come before you specify options to enable it.
*
- * @return
*/
public List<Plugin> getAllPlugins() {
if (allPlugins == null) {
@@ -372,16 +372,14 @@
/**
* Input schema files.
*
- * @return
*/
public InputSource[] getGrammars() {
- return grammars.toArray(new InputSource[grammars.size()]);
+ return grammars.toArray(new InputSource[0]);
}
/**
* Adds a new input schema.
*
- * @param is
*/
public void addGrammar(InputSource is) {
grammars.add(absolutize(is));
@@ -403,7 +401,6 @@
/**
* Recursively scan directories and add all XSD files in it.
*
- * @param dir
*/
public void addGrammarRecursive(File dir) {
addRecursive(dir, ".xsd", grammars);
@@ -436,16 +433,14 @@
/**
* Input external binding files.
*
- * @return
*/
public InputSource[] getBindFiles() {
- return bindFiles.toArray(new InputSource[bindFiles.size()]);
+ return bindFiles.toArray(new InputSource[0]);
}
/**
* Adds a new binding file.
*
- * @param is
*/
public void addBindFile(InputSource is) {
bindFiles.add(absolutize(is));
@@ -454,7 +449,6 @@
/**
* Adds a new binding file.
*
- * @param bindFile
*/
public void addBindFile(File bindFile) {
bindFiles.add(fileToInputSource(bindFile));
@@ -463,7 +457,6 @@
/**
* Recursively scan directories and add all ".xjb" files in it.
*
- * @param dir
*/
public void addBindFileRecursive(File dir) {
addRecursive(dir, ".xjb", bindFiles);
@@ -475,14 +468,12 @@
* Gets a classLoader that can load classes specified via the
* -classpath option.
*
- * @param parent
- * @return
*/
public ClassLoader getUserClassLoader(ClassLoader parent) {
if (classpaths.isEmpty())
return parent;
return new URLClassLoader(
- classpaths.toArray(new URL[classpaths.size()]), parent);
+ classpaths.toArray(new URL[0]), parent);
}
/**
@@ -498,8 +489,6 @@
* Parses an option {@code args[i]} and return
* the number of tokens consumed.
*
- * @param args
- * @param i
* @return 0 if the argument is not understood. Returning 0
* will let the caller report an error.
* @throws BadCommandLineException If the callee wants to provide a custom message for an error.
@@ -627,7 +616,7 @@
Messages.format(Messages.NO_SUCH_FILE, file));
}
- try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"))) {
+ try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8))) {
parseProxy(in.readLine());
} catch (IOException e) {
throw new BadCommandLineException(
@@ -776,11 +765,6 @@
/**
* Obtains an operand and reports an error if it's not there.
*
- * @param optionName
- * @param args
- * @param i
- * @return
- * @throws com.sun.tools.xjc.BadCommandLineException
*/
public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException {
if (i == args.length || args[i].startsWith("-")) {
@@ -824,8 +808,6 @@
/**
* Adds a new catalog file.Use created or existed resolver to parse new catalog file.
*
- * @param catalogFile
- * @throws java.io.IOException
*/
public void addCatalog(File catalogFile) throws IOException {
URI newUri = catalogFile.toURI();
@@ -838,7 +820,6 @@
/**
* Parses arguments and fill fields of this object.
*
- * @param args
* @throws BadCommandLineException thrown when there's a problem in the command-line arguments
*/
public void parseArguments(String[] args) throws BadCommandLineException {
@@ -899,8 +880,6 @@
/**
* Finds the {@code META-INF/sun-jaxb.episode} file to add as a binding customization.
*
- * @param jar
- * @throws com.sun.tools.xjc.BadCommandLineException
*/
public void scanEpisodeFile(File jar) throws BadCommandLineException {
try {
@@ -920,7 +899,6 @@
/**
* Guesses the schema language.
*
- * @return
*/
public Language guessSchemaLanguage() {
@@ -942,8 +920,6 @@
/**
* Creates a configured CodeWriter that produces files into the specified directory.
*
- * @return
- * @throws java.io.IOException
*/
public CodeWriter createCodeWriter() throws IOException {
return createCodeWriter(new FileCodeWriter(targetDir, readOnly, encoding));
@@ -952,8 +928,6 @@
/**
* Creates a configured CodeWriter that produces files into the specified directory.
*
- * @param core
- * @return
*/
public CodeWriter createCodeWriter(CodeWriter core) {
if (noFileHeader)
@@ -965,7 +939,6 @@
/**
* Gets the string suitable to be used as the prolog comment baked into artifacts.This is the string like "This file was generated by the JAXB RI on YYYY/mm/dd..."
*
- * @return
*/
public String getPrologComment() {
// generate format syntax: <date> 'at' <time>
@@ -1015,7 +988,7 @@
private static boolean getDebugPropertyValue() {
final String debugPropertyName = Options.class.getName() + ".findServices";
if (System.getSecurityManager() != null) {
- return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+ return AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public Boolean run() {
return Boolean.getBoolean(debugPropertyName);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Plugin.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Plugin.java
index 2cbfe44..0edfeed 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Plugin.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Plugin.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
@@ -49,7 +49,7 @@
* <p>
* For example, if "abc" is returned, "-abc" will
* turn on this plugin. A plugin needs to be turned
- * on explicitly, or else no other methods of {@link Plugin}
+ * on explicitly, or else no other methods of
* will be invoked.
*
* <p>
@@ -89,7 +89,7 @@
* the option that activates a plugin (one that's returned
* by {@link #getOptionName()}.
*
- * But nevertheless a {@link Plugin} needs to be activated
+ * But nevertheless a needs to be activated
* to participate in further processing.
*
* @return
@@ -186,7 +186,7 @@
* Java syntax level.
*
* <p>
- * Note that this method is invoked only when a {@link Plugin}
+ * Note that this method is invoked only when a
* is activated.
*
* @param model
@@ -211,7 +211,7 @@
* code (or add more code) by using {@link Outline} and {@link Options}.
*
* <p>
- * Note that this method is invoked only when a {@link Plugin}
+ * Note that this method is invoked only when a
* is activated.
*
* @param outline
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/SchemaCache.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/SchemaCache.java
index 4f3a568..29faea8 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/SchemaCache.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/SchemaCache.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,9 +79,7 @@
schema = schemaFactory.newSchema(source);
} catch (IOException | SAXException e) {
- InternalError ie = new InternalError(e.getMessage());
- ie.initCause(e);
- throw ie;
+ throw new InternalError(e.getMessage(), e);
} finally {
if (resourceResolver != null) resourceResolver.closeStreams();
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/SecureLoader.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/SecureLoader.java
index a1d481b..6670dc6 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/SecureLoader.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/SecureLoader.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
@@ -23,7 +23,7 @@
return Thread.currentThread().getContextClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -37,7 +37,7 @@
return c.getClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return c.getClassLoader();
@@ -51,7 +51,7 @@
return ClassLoader.getSystemClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return ClassLoader.getSystemClassLoader();
@@ -80,7 +80,7 @@
return cl.getParent();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return cl.getParent();
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCBase.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCBase.java
index 86dd98a..66cd11f 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCBase.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCBase.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
@@ -907,7 +907,7 @@
lst.add(getInputSource(new File(baseDir, value)));
}
- return lst.toArray(new InputSource[lst.size()]);
+ return lst.toArray(new InputSource[0]);
}
/**
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCFacade.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCFacade.java
index d71861b..50cc8bc 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCFacade.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCFacade.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
@@ -13,7 +13,6 @@
import java.io.Closeable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.net.URLClassLoader;
/**
* A shabby driver to invoke XJC1 or XJC2 depending on the command line switch.
@@ -44,7 +43,7 @@
ClassLoader cl = SecureLoader.getClassClassLoader(XJCFacade.class);
SecureLoader.setContextClassLoader(cl);
Class<?> driver = cl.loadClass("com.sun.tools.xjc.Driver");
- Method mainMethod = driver.getDeclaredMethod("main", new Class<?>[]{String[].class});
+ Method mainMethod = driver.getDeclaredMethod("main", String[].class);
try {
mainMethod.invoke(null, new Object[]{args});
} catch (InvocationTargetException e) {
@@ -63,19 +62,6 @@
if (cl instanceof Closeable) {
//JDK7+, ParallelWorldClassLoader
((Closeable) cl).close();
- } else {
- if (cl instanceof URLClassLoader) {
- //JDK6 - API jars are loaded by instance of URLClassLoader
- //so use proprietary API to release holded resources
- try {
- Class<?> clUtil = oldContextCl.loadClass("sun.misc.ClassLoaderUtil");
- Method release = clUtil.getDeclaredMethod("releaseLoader", URLClassLoader.class);
- release.invoke(null, cl);
- } catch (ClassNotFoundException ex) {
- //not Sun JDK 6, ignore
- System.err.println(JDK_REQUIRED);
- }
- }
}
cl = SecureLoader.getParentClassLoader(cl);
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCListener.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCListener.java
index 2e8f056..8522a1a 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCListener.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCListener.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
@@ -96,7 +96,7 @@
* So just beware that this is not a cure-all.
*
* @return
- * true if the {@link XJCListener} wants to abort the processing.
+ * true if the wants to abort the processing.
* @since 2.1
*/
public boolean isCanceled() {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/addon/accessors/PluginImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/addon/accessors/PluginImpl.java
index a96484a..d8593f2 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/addon/accessors/PluginImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/addon/accessors/PluginImpl.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
@@ -64,13 +64,7 @@
a.param("value", XmlAccessType.PROPERTY);
break;
}
- } catch (IllegalArgumentException ex) {
- Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
- } catch (IllegalAccessException ex) {
- Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
- } catch (NoSuchFieldException ex) {
- Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
- } catch (SecurityException ex) {
+ } catch (IllegalArgumentException | ReflectiveOperationException | SecurityException ex) {
Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
}
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/addon/episode/PluginImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/addon/episode/PluginImpl.java
index 1d30a8a..f59dd05 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/addon/episode/PluginImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/addon/episode/PluginImpl.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
@@ -196,7 +196,7 @@
* Computes SCD.
* This is fairly limited as JAXB can only map a certain kind of components to classes.
*/
- private static final XSFunction<String> SCD = new XSFunction<String>() {
+ private static final XSFunction<String> SCD = new XSFunction<>() {
private String name(XSDeclaration decl) {
if (decl.getTargetNamespace().equals(""))
return decl.getName();
@@ -310,7 +310,7 @@
private final BindingsBuilder bindingsBuilder;
- private OutlineType(BindingsBuilder bindingsBuilder) {
+ OutlineType(BindingsBuilder bindingsBuilder) {
this.bindingsBuilder = bindingsBuilder;
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/SchemaCompiler.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/SchemaCompiler.java
index e6d0245..ecae081 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/SchemaCompiler.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/SchemaCompiler.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
@@ -208,7 +208,7 @@
* Obtains the compiled schema object model.
*
* Once this method is called, no other method should be
- * invoked on the {@link SchemaCompiler}.
+ * invoked on the .
*
* @return
* null if the compilation fails. The errors should have been
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/SpecVersion.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/SpecVersion.java
index 1b7dfba..3c5c1d7 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/SpecVersion.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/SpecVersion.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,7 +20,7 @@
private final String version;
- private SpecVersion(String version) {
+ SpecVersion(String version) {
this.version = version;
}
@@ -32,7 +32,7 @@
}
/**
- * Parses "3.0" into the {@link SpecVersion} object.
+ * Parses "3.0" into the object.
*
* @return null for parsing failure.
*/
@@ -46,7 +46,7 @@
}
/**
- * Gives the String representation of the {@link SpecVersion}
+ * Gives the String representation of the
*/
public String getVersion(){
return version;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/TypeAndAnnotation.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/TypeAndAnnotation.java
index 7cbd277..be3502d 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/TypeAndAnnotation.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/TypeAndAnnotation.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,7 +38,7 @@
void annotate( JAnnotatable programElement );
/**
- * Two {@link TypeAndAnnotation} are equal if they
+ * Two are equal if they
* has the same type and annotations.
*/
@Override
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/BeanMappingImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/BeanMappingImpl.java
index d38df88..24997c4 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/BeanMappingImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/BeanMappingImpl.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 @@
return taa;
}
- public final String getTypeClass() {
+ public String getTypeClass() {
return getClazz();
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/ElementAdapter.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/ElementAdapter.java
index 25ea450..43e49c1 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/ElementAdapter.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/ElementAdapter.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,7 +38,7 @@
*
* <p>
* This can be used only with {@link CReferencePropertyInfo}
- * (or else it won't be {@link JAXBElement),
+ * (or else it won't be {@link JAXBElement},
* with one {@link CElementInfo} (or else we can't infer the tag name.)
*
* @author Kohsuke Kawaguchi
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/ElementMappingImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/ElementMappingImpl.java
index 9c5090b..4dafda3 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/ElementMappingImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/ElementMappingImpl.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,7 +47,7 @@
}
@Override
- public final List<Property> calcDrilldown() {
+ public List<Property> calcDrilldown() {
CElementPropertyInfo p = clazz.getProperty();
if(p.getAdapter()!=null)
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/JAXBModelImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/JAXBModelImpl.java
index 75b2e96..ac2f38c 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/JAXBModelImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/JAXBModelImpl.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,12 +79,12 @@
}
@Override
- public final Mapping get(QName elementName) {
+ public Mapping get(QName elementName) {
return byXmlName.get(elementName);
}
@Override
- public final Collection<? extends Mapping> getMappings() {
+ public Collection<? extends Mapping> getMappings() {
return byXmlName.values();
}
@@ -98,7 +98,7 @@
}
@Override
- public final List<String> getClassList() {
+ public List<String> getClassList() {
List<String> classList = new ArrayList<>();
// list up root classes
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/PropertyImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/PropertyImpl.java
index dea0fa6..205f21b 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/PropertyImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/PropertyImpl.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,13 +36,13 @@
}
@Override
- public final String name() {
+ public String name() {
return fr.getPropertyInfo().getName(false);
}
/** Returns raw schema name for simpleType property. May return null for other types. */
@Override
- public final QName rawName() {
+ public QName rawName() {
if (fr instanceof ElementAdapter) {
CElementInfo eInfo = ((ElementAdapter)fr).ei;
if ((eInfo != null) && (eInfo.getProperty() != null)) {
@@ -53,12 +53,12 @@
}
@Override
- public final QName elementName() {
+ public QName elementName() {
return elementName;
}
@Override
- public final JType type() {
+ public JType type() {
return fr.getRawType();
}
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/SchemaCompilerImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/SchemaCompilerImpl.java
index 8a959e9..168275a 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/SchemaCompilerImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/api/impl/s2j/SchemaCompilerImpl.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
@@ -229,10 +229,7 @@
// we do the same here .
InputSource is = opts.entityResolver.resolveEntity(namespaceURI, systemId == null ? "" : systemId);
return isExists(is) ? new LSInputSAXWrapper(is) : null;
- } catch (SAXException e) {
- // TODO: is this sufficient?
- return null;
- } catch (IOException e) {
+ } catch (SAXException | IOException e) {
// TODO: is this sufficient?
return null;
}
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 a39681c..e05a974 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
@@ -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
@@ -53,7 +53,6 @@
import com.sun.codemodel.fmt.JStaticJavaFile;
import com.sun.tools.xjc.AbortException;
import com.sun.tools.xjc.ErrorReceiver;
-import com.sun.tools.xjc.api.SpecVersion;
import com.sun.tools.xjc.generator.annotation.spec.XmlAnyAttributeWriter;
import com.sun.tools.xjc.generator.annotation.spec.XmlEnumValueWriter;
import com.sun.tools.xjc.generator.annotation.spec.XmlEnumWriter;
@@ -325,11 +324,11 @@
}
@Override
- public final JType resolve(CTypeRef ref, Aspect a) {
+ public JType resolve(CTypeRef ref, Aspect a) {
return ref.getTarget().getType().toType(this, a);
}
private final CClassInfoParent.Visitor<JClassContainer> exposedContainerBuilder =
- new CClassInfoParent.Visitor<JClassContainer>() {
+ new CClassInfoParent.Visitor<>() {
@Override
public JClassContainer onBean(CClassInfo bean) {
@@ -348,7 +347,7 @@
}
};
private final CClassInfoParent.Visitor<JClassContainer> implContainerBuilder =
- new CClassInfoParent.Visitor<JClassContainer>() {
+ new CClassInfoParent.Visitor<>() {
@Override
public JClassContainer onBean(CClassInfo bean) {
@@ -379,7 +378,7 @@
* Given the same input, the order of packages in the array
* is always the same regardless of the environment.
*/
- public final JPackage[] getUsedPackages(Aspect aspect) {
+ public JPackage[] getUsedPackages(Aspect aspect) {
Set<JPackage> s = new TreeSet<>();
for (CClassInfo bean : model.beans().values()) {
@@ -397,7 +396,7 @@
s.add(e._package());
}
- return s.toArray(new JPackage[s.size()]);
+ return s.toArray(new JPackage[0]);
}
@Override
@@ -778,7 +777,7 @@
* Also generates other per-property annotations
* (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
*/
- public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
+ public void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
CAdapter adapter = prop.getAdapter();
if (adapter != null) {
if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
@@ -806,7 +805,7 @@
}
@Override
- public final JClass addRuntime(Class<?> clazz) {
+ public JClass addRuntime(Class<?> clazz) {
JClass g = generatedRuntime.get(clazz);
if (g == null) {
// put code into a separate package to avoid name conflicts.
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/ClassOutlineImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/ClassOutlineImpl.java
index 3b0603f..6fa01a2 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/ClassOutlineImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/ClassOutlineImpl.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,7 +31,7 @@
}
/**
- * Gets {@link #_package} as {@link PackageOutlineImpl},
+ * Gets {@code package} as {@link PackageOutlineImpl},
* since it's guaranteed to be of that type.
*/
@Override
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 381a224..b52a9ac 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
@@ -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
@@ -143,7 +143,7 @@
}
// used to visit properties
- CPropertyVisitor<Void> propVisitor = new CPropertyVisitor<Void>() {
+ CPropertyVisitor<Void> propVisitor = new CPropertyVisitor<>() {
@Override
public Void onElement(CElementPropertyInfo p) {
for (CTypeRef tr : p.getTypes()) {
@@ -216,7 +216,6 @@
* pull the uri out of the specified QName and keep track of it in the
* specified hash map
*
- * @param qname
*/
private void countURI(HashMap<String, Integer> map, QName qname) {
if (qname == null) return;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractField.java
index 702e604..1dcf100 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractField.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractField.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
@@ -230,9 +230,6 @@
* .type(jtype)
* .defaultValue(ctype.getDefaultValue());
*
- * @param field
- * @param ctype
- * @param jtype
* @param checkWrapper true if the method might need to generate XmlElements
*/
private void writeXmlElementAnnotation( JAnnotatable field, CTypeRef ctype, JType jtype,
@@ -410,7 +407,6 @@
/**
* Compute the type of a {@link CPropertyInfo}
- * @param aspect
*/
protected JType getType(final Aspect aspect) {
if(prop.getAdapter()!=null)
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ArrayField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ArrayField.java
index 0e8dd87..fbdebf4 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ArrayField.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ArrayField.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 @@
generateArray();
}
- protected final void generateArray() {
+ protected void generateArray() {
field = outline.implClass.field( JMod.PROTECTED, getCoreListType(), prop.getName(false) );
annotate(field);
@@ -217,7 +217,7 @@
/**
* Case from {@link #exposedType} to array of {@link #implType} .
*/
- protected final JExpression castToImplTypeArray( JExpression exp ) {
+ protected JExpression castToImplTypeArray(JExpression exp ) {
return JExpr.cast(implType.array(), exp);
}
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 14aa410..60540ec 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
@@ -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
@@ -11,7 +11,6 @@
package com.sun.tools.xjc.generator.bean.field;
import com.sun.codemodel.JBlock;
-import com.sun.codemodel.JExpr;
import com.sun.codemodel.JExpression;
import com.sun.codemodel.JFieldVar;
import com.sun.codemodel.JMod;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/FieldRenderer.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/FieldRenderer.java
index b38e944..747d054 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/FieldRenderer.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/FieldRenderer.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
@@ -44,7 +44,7 @@
* class, then return {@link FieldOutline} for accessing
* the generated field.
*/
- public FieldOutline generate( ClassOutlineImpl context, CPropertyInfo prop);
+ FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop);
// //
// // field renderers
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/GenericFieldRenderer.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/GenericFieldRenderer.java
index 0767b0a..dc14837 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/GenericFieldRenderer.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/GenericFieldRenderer.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 @@
public GenericFieldRenderer( Class<?> fieldClass ) {
try {
- constructor = fieldClass.getDeclaredConstructor(new Class<?>[]{ClassOutlineImpl.class,CPropertyInfo.class});
+ constructor = fieldClass.getDeclaredConstructor(ClassOutlineImpl.class,CPropertyInfo.class);
} catch (NoSuchMethodException e) {
throw new NoSuchMethodError(e.getMessage());
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/package-info.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/package-info.java
index cfddb5f..7a05ef6 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/package-info.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/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,7 +9,7 @@
*/
/**
- * <h1>Code Generator</h1>.
+ * <h2>Code Generator</h2>.
*
* This package hosts code for generating CodeModel AST from {@link com.sun.tools.xjc.model Model}
* classes.
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/AutoClassNameAllocator.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/AutoClassNameAllocator.java
index 7534471..4c57f8a 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/AutoClassNameAllocator.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/AutoClassNameAllocator.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
@@ -40,11 +40,7 @@
}
private String determineName(String packageName, String className) {
- Set<String> s = names.get(packageName);
- if(s==null) {
- s = new HashSet<>();
- names.put(packageName,s);
- }
+ Set<String> s = names.computeIfAbsent(packageName, k -> new HashSet<>());
if(s.add(className))
return className;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CAttributePropertyInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CAttributePropertyInfo.java
index beeac02..65956bc 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CAttributePropertyInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CAttributePropertyInfo.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
@@ -80,7 +80,7 @@
}
@Override
- public final PropertyKind kind() {
+ public PropertyKind kind() {
return PropertyKind.ATTRIBUTE;
}
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CBuiltinLeafInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CBuiltinLeafInfo.java
index a6989ab..5cc9837 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CBuiltinLeafInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CBuiltinLeafInfo.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,7 +47,6 @@
import com.sun.tools.xjc.outline.Outline;
import com.sun.tools.xjc.runtime.ZeroOneBooleanAdapter;
import com.sun.tools.xjc.util.NamespaceContextAdapter;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.core.v2.model.core.ID;
import com.sun.xml.xsom.XSComponent;
import com.sun.xml.xsom.XmlString;
@@ -111,7 +110,7 @@
}
/**
- * Since {@link CBuiltinLeafInfo} represents a default binding,
+ * Since represents a default binding,
* it is never a collection.
*/
@Deprecated
@@ -135,7 +134,7 @@
}
/**
- * {@link CBuiltinLeafInfo} never has a default associated MIME type.
+ * never has a default associated MIME type.
*/
@Override
public MimeType getExpectedMimeType() {
@@ -159,21 +158,21 @@
}
/**
- * Creates a {@link TypeUse} that represents a collection of this {@link CBuiltinLeafInfo}.
+ * Creates a {@link TypeUse} that represents a collection of this .
*/
public final TypeUse makeCollection() {
return TypeUseFactory.makeCollection(this);
}
/**
- * Creates a {@link TypeUse} that represents an adapted use of this {@link CBuiltinLeafInfo}.
+ * Creates a {@link TypeUse} that represents an adapted use of this .
*/
public final TypeUse makeAdapted( Class<? extends XmlAdapter> adapter, boolean copy ) {
return TypeUseFactory.adapt(this,adapter,copy);
}
/**
- * Creates a {@link TypeUse} that represents a MIME-type assocaited version of this {@link CBuiltinLeafInfo}.
+ * Creates a {@link TypeUse} that represents a MIME-type assocaited version of this .
*/
public final TypeUse makeMimeTyped( MimeType mt ) {
return TypeUseFactory.makeMimeTyped(this,mt);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CClassInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CClassInfo.java
index a659635..d2b7517 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CClassInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CClassInfo.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
@@ -242,7 +242,7 @@
return calcSqueezedName.onBean(this);
}
- private static final CClassInfoParent.Visitor<String> calcSqueezedName = new Visitor<String>() {
+ private static final CClassInfoParent.Visitor<String> calcSqueezedName = new Visitor<>() {
@Override
public String onBean(CClassInfo bean) {
return bean.parent.accept(this) + bean.shortName;
@@ -383,7 +383,7 @@
}
/**
- * This method accepts both {@link CClassInfo} (which means the base class
+ * This method accepts both (which means the base class
* is also generated), or {@link CClassRef} (which means the base class is
* already generated and simply referenced.)
*
@@ -430,7 +430,7 @@
* Enumerates all the sub-classes of this class.
*/
public Iterator<CClassInfo> listSubclasses() {
- return new Iterator<CClassInfo>() {
+ return new Iterator<>() {
CClassInfo cur = firstSubclass;
@Override
@@ -488,7 +488,7 @@
}
@Override
- public final <T> T accept(Visitor<T> visitor) {
+ public <T> T accept(Visitor<T> visitor) {
return visitor.onBean(this);
}
@@ -498,12 +498,12 @@
}
@Override
- public final NClass getType() {
+ public NClass getType() {
return this;
}
@Override
- public final JClass toType(Outline o, Aspect aspect) {
+ public JClass toType(Outline o, Aspect aspect) {
switch(aspect) {
case IMPLEMENTATION:
return o.getClazz(this).implRef;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CClassInfoParent.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CClassInfoParent.java
index 0b1da65..2f094e5 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CClassInfoParent.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CClassInfoParent.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
@@ -35,7 +35,7 @@
/**
* Visitor of {@link CClassInfoParent}
*/
- public static interface Visitor<T> {
+ interface Visitor<T> {
T onBean( CClassInfo bean );
T onPackage( JPackage pkg );
T onElement( CElementInfo element );
@@ -46,7 +46,7 @@
*
* Use {@link Model#getPackage} to obtain an instance.
*/
- public static final class Package implements CClassInfoParent {
+ final class Package implements CClassInfoParent {
public final JPackage pkg;
public Package(JPackage pkg) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CCustomizations.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CCustomizations.java
index 3369164..76de1c4 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CCustomizations.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CCustomizations.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
@@ -109,7 +109,7 @@
public static final CCustomizations EMPTY = new CCustomizations();
/**
- * Merges two {@link CCustomizations} objects into one.
+ * Merges two objects into one.
*/
public static CCustomizations merge(CCustomizations lhs, CCustomizations rhs) {
if(lhs==null || lhs.isEmpty()) return rhs;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CDefaultValue.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CDefaultValue.java
index a7bd6a7..7ba83ba 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CDefaultValue.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CDefaultValue.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
@@ -27,7 +27,7 @@
public abstract JExpression compute(Outline outline);
/**
- * Creates a new {@link CDefaultValue} that computes the default value
+ * Creates a new that computes the default value
* by applying a lexical representation to a {@link TypeUse}.
*/
public static CDefaultValue create(final TypeUse typeUse, final XmlString defaultValue) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CElementInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CElementInfo.java
index 10038fe..0d788a9 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CElementInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CElementInfo.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
@@ -122,7 +122,7 @@
*
* This is to avoid a circular model construction dependency between buidling a type
* inside an element and element itself. To build a content type, you need to have
- * {@link CElementInfo} for a parent, so we can't take it as a constructor parameter.
+ * for a parent, so we can't take it as a constructor parameter.
*/
public CElementInfo(Model model,QName tagName, CClassInfoParent parent, String className, CCustomizations customizations, Locator location ) {
this(model,tagName,parent,null,null,null,customizations,location);
@@ -152,11 +152,11 @@
}
- public final String getDefaultValue() {
+ public String getDefaultValue() {
return getProperty().getTypes().get(0).getDefaultValue();
}
- public final JPackage _package() {
+ public JPackage _package() {
return parent.getOwnerPackage();
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CElementPropertyInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CElementPropertyInfo.java
index 91ceef7..3b4928d 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CElementPropertyInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CElementPropertyInfo.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
@@ -58,7 +58,7 @@
*/
private final List<CTypeRef> types = new ArrayList<>();
- private final List<CNonElement> ref = new AbstractList<CNonElement>() {
+ private final List<CNonElement> ref = new AbstractList<>() {
@Override
public CNonElement get(int index) {
return getTypes().get(index).getTarget();
@@ -184,7 +184,7 @@
}
@Override
- public final PropertyKind kind() {
+ public PropertyKind kind() {
return PropertyKind.ELEMENT;
}
@@ -193,7 +193,7 @@
return expectedMimeType;
}
- public static enum CollectionMode {
+ public enum CollectionMode {
NOT_REPEATED(false,false),
REPEATED_ELEMENT(true,false),
REPEATED_VALUE(true,true);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CEnumConstant.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CEnumConstant.java
index bde1a34..22c0064 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CEnumConstant.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CEnumConstant.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 @@
private final Locator locator;
/**
- * @param name
*/
public CEnumConstant(String name, String javadoc, String lexical, XSComponent source, CCustomizations customizations, Locator loc) {
assert name!=null;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CPluginCustomization.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CPluginCustomization.java
index 8a7cf77..efd37bc 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CPluginCustomization.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CPluginCustomization.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
@@ -46,7 +46,7 @@
* to mark it.
*
* <p>
- * {@link CPluginCustomization}s that are not marked will be
+ * s that are not marked will be
* reporeted as an error to users. This allows us to catch
* customizations that are not used by anybody.
*/
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CPropertyInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CPropertyInfo.java
index 3f2dda3..d5c7087 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CPropertyInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CPropertyInfo.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
@@ -15,7 +15,7 @@
import java.util.Map;
import javax.xml.XMLConstants;
-import jakarta.xml.bind.annotation.XmlInlineBinaryData;
+
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@@ -154,7 +154,7 @@
*
* <p>
* This method is implemented to follow the contract of
- * {@link PropertyInfo#getName()}, and therefore it always
+ * , and therefore it always
* returns the name of the annotated field.
* <p>
* This name is normally not useful for the rest of XJC,
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CReferencePropertyInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CReferencePropertyInfo.java
index 6fa1be8..967052c 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CReferencePropertyInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CReferencePropertyInfo.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
@@ -172,7 +172,7 @@
}
@Override
- public final PropertyKind kind() {
+ public PropertyKind kind() {
return PropertyKind.REFERENCE;
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CSingleTypePropertyInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CSingleTypePropertyInfo.java
index ee93142..36bc9e4 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CSingleTypePropertyInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CSingleTypePropertyInfo.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,7 +36,7 @@
* @param typeName
* XML Schema type name of this property's single value. Optional
* for other schema languages. This is used to determine if we should
- * generate {@link @XmlSchemaType} annotation to improve the roundtrip.
+ * generate {@link jakarta.xml.bind.annotation.XmlSchemaType} annotation to improve the roundtrip.
*/
protected CSingleTypePropertyInfo(String name, TypeUse type, QName typeName, XSComponent source, CCustomizations customizations, Locator locator) {
super(name, type.isCollection(), source, customizations, locator);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CTypeRef.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CTypeRef.java
index 7a793b6..6ad7031 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CTypeRef.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CTypeRef.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
@@ -69,7 +69,7 @@
* Recursively search for type name.
*
* This is needed to find correct type for refs like:
- *
+ *<pre>{@code
*<xs:simpleType name="parent">
* <xs:restriction base="xs:date"/>
*</xs:simpleType>
@@ -78,7 +78,7 @@
*</xs:simpleType>
*
*<xs:element name="testField" type="child"/>
- *
+ *}</pre>
* @param declType given type
* @return simpleTypeName or null
*/
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CValuePropertyInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CValuePropertyInfo.java
index a7eaf87..84b6316 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CValuePropertyInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CValuePropertyInfo.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,7 +31,7 @@
}
@Override
- public final PropertyKind kind() {
+ public PropertyKind kind() {
return PropertyKind.VALUE;
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Model.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Model.java
index 283bf90..17cb6d7 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Model.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Model.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
@@ -78,7 +78,7 @@
new LinkedHashMap<>();
private final Iterable<? extends CElementInfo> allElements =
- new Iterable<CElementInfo>() {
+ new Iterable<>() {
@Override
public Iterator<CElementInfo> iterator() {
return new FlattenIterator<>(elementMappings.values());
@@ -154,7 +154,7 @@
/**
* Gets the name converter that shall be used to parse XML names into Java names.
*/
- public final NameConverter getNameConverter() {
+ public NameConverter getNameConverter() {
return nameConverter;
}
@@ -311,7 +311,7 @@
* <p>
* This needs to be filled by the front-end.
*/
- public final Map<QName,CClassInfo> createTopLevelBindings() {
+ public Map<QName,CClassInfo> createTopLevelBindings() {
Map<QName,CClassInfo> r = new HashMap<>();
for( CClassInfo b : beans().values() ) {
if(b.isElement())
@@ -470,9 +470,7 @@
if(ei.getScope()!=null)
clazz = ei.getScope().getClazz();
- Map<QName,CElementInfo> m = elementMappings.get(clazz);
- if(m==null)
- elementMappings.put(clazz, m = new LinkedHashMap<>());
+ Map<QName, CElementInfo> m = elementMappings.computeIfAbsent(clazz, k -> new LinkedHashMap<>());
m.put(ei.getElementName(),ei);
}
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 5e46534..f7cf939 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
@@ -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,7 +43,7 @@
}
public static Multiplicity create(int min, Integer max ) {
- return Multiplicity.create(BigInteger.valueOf(min), BigInteger.valueOf(max.intValue()));
+ return Multiplicity.create(BigInteger.valueOf(min), BigInteger.valueOf(max));
}
private Multiplicity(BigInteger min, BigInteger max) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Populatable.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Populatable.java
index 3d76a46..5b5e1f6 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Populatable.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Populatable.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,5 +25,5 @@
* @author Kohsuke Kawaguchi
*/
public interface Populatable {
- public void populate( Model model, Outline context );
+ void populate(Model model, Outline context);
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/TypeUse.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/TypeUse.java
index df27d86..c76b908 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/TypeUse.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/TypeUse.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
@@ -60,12 +60,12 @@
* IDREF, neither Foo nor Bar is IDREF.
*
* <p>
- * That's why we have this method in {@link TypeUse}.
+ * That's why we have this method in .
*/
ID idUse();
/**
- * A {@link TypeUse} can have an associated MIME type.
+ * A can have an associated MIME type.
*/
MimeType getExpectedMimeType();
@@ -85,7 +85,7 @@
* if the type isn't bound to a text in XML.
*
* @return null
- * if the constant cannot be created for this {@link TypeUse}
+ * if the constant cannot be created for this
* (such as when it's a collection)
*/
JExpression createConstant(Outline outline, XmlString lexical);
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 8cce5d1..f48af69 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
@@ -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
@@ -222,7 +222,7 @@
}
@SuppressWarnings("FinalStaticMethod")
- public static final NType create(Type t) {
+ public static NType create(Type t) {
if(t==null) return null;
if(t instanceof Class)
return create((Class)t);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/nav/Utils.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/nav/Utils.java
index f5e662a..e8001da 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/nav/Utils.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/nav/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,7 +43,7 @@
// requires accessClassInPackage privilege
final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
+ new PrivilegedAction<>() {
@Override
public Method run() {
try {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/outline/PackageOutline.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/outline/PackageOutline.java
index e24952d..2c1973a 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/outline/PackageOutline.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/outline/PackageOutline.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
@@ -69,19 +69,19 @@
* <p>
* Null if no default
*/
- public String getMostUsedNamespaceURI();
+ String getMostUsedNamespaceURI();
/**
* The element form default for this package.
* <p>
* The value is computed by examining what would yield the smallest generated code.
*/
- public XmlNsForm getElementFormDefault();
+ XmlNsForm getElementFormDefault();
/**
* The attribute form default for this package.
* <p>
* The value is computed by examining what would yield the smallest generated code.
*/
- public XmlNsForm getAttributeFormDefault();
+ XmlNsForm getAttributeFormDefault();
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/AbstractExtensionBindingChecker.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/AbstractExtensionBindingChecker.java
index c280aba..e8f63b1 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/AbstractExtensionBindingChecker.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/AbstractExtensionBindingChecker.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
@@ -24,8 +24,6 @@
import org.xml.sax.SAXParseException;
import org.xml.sax.SAXException;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
-
import javax.xml.XMLConstants;
/**
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/RawTypeSet.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/RawTypeSet.java
index 5b32989..b4b5610 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/RawTypeSet.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/RawTypeSet.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
@@ -191,9 +191,8 @@
protected abstract CTypeRef toTypeRef(CElementPropertyInfo ep);
protected abstract void toElementRef(CReferencePropertyInfo prop);
/**
- * Can this {@link Ref} be a type ref?
+ * Can this be a type ref?
* @return false to veto.
- * @param parent
*/
protected abstract Mode canBeType(RawTypeSet parent);
protected abstract boolean isListOfValues();
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 0831b58..aa48f65 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
@@ -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
@@ -11,7 +11,6 @@
package com.sun.tools.xjc.reader;
import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;
@@ -73,13 +72,7 @@
if(!get().components.containsKey(key))
// many components register themselves.
add(key,t);
- } catch (InstantiationException e) {
- throw new Error(e);
- } catch (IllegalAccessException e) {
- throw new Error(e);
- } catch (NoSuchMethodException e) {
- throw new Error(e);
- } catch (InvocationTargetException e) {
+ } catch (ReflectiveOperationException e) {
throw new Error(e);
}
}
@@ -89,7 +82,7 @@
}
/**
- * A {@link Ring} instance is associated with a thread.
+ * A 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/TypeUtil.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/TypeUtil.java
index 9d5cb8b..3ef0ceb 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/TypeUtil.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/TypeUtil.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
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
@@ -43,7 +44,7 @@
* set of {@link JType} objects.
*/
public static JType getCommonBaseType( JCodeModel codeModel, Collection<? extends JType> types ) {
- return getCommonBaseType( codeModel, types.toArray(new JType[types.size()]) );
+ return getCommonBaseType( codeModel, types.toArray(new JType[0]) );
}
/**
@@ -59,8 +60,7 @@
public static JType getCommonBaseType(JCodeModel codeModel, JType... t) {
// first, eliminate duplicates.
Set<JType> uniqueTypes = new TreeSet<>(typeComparator);
- for (JType type : t)
- uniqueTypes.add(type);
+ Collections.addAll(uniqueTypes, t);
// if this yields only one type. return now.
// this is the only case where we can return a primitive type
@@ -93,7 +93,7 @@
// for example, if we have both java.lang.Object and
// java.io.InputStream, then we don't want to use java.lang.Object.
- JClass[] raw = s.toArray(new JClass[s.size()]);
+ JClass[] raw = s.toArray(new JClass[0]);
s.clear();
for (int i = 0; i < raw.length; i++) { // for each raw[i]
@@ -243,7 +243,7 @@
/**
* Compares {@link JType} objects by their names.
*/
- private static final Comparator<JType> typeComparator = new Comparator<JType>() {
+ private static final Comparator<JType> typeComparator = new Comparator<>() {
@Override
public int compare(JType t1, JType t2) {
return t1.fullName().compareTo(t2.fullName());
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/Util.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/Util.java
index 17b24ff..cd6e3d1 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/Util.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/Util.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,7 +52,7 @@
public static String escapeSpace( String url ) {
// URLEncoder didn't work.
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (int i = 0; i < url.length(); i++) {
// TODO: not sure if this is the only character that needs to be escaped.
if (url.charAt(i) == ' ')
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/TDTDReader.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/TDTDReader.java
index f35f6fa..e1184f7 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/TDTDReader.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/TDTDReader.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
@@ -112,10 +112,7 @@
} finally {
Ring.end(old);
}
- } catch (IOException e) {
- errorReceiver.error(new SAXParseException2(e.getMessage(),null,e));
- return null;
- } catch (SAXException e) {
+ } catch (IOException | SAXException e) {
errorReceiver.error(new SAXParseException2(e.getMessage(),null,e));
return null;
} catch (AbortException e) {
@@ -243,7 +240,7 @@
// TODO: check the cyclic interface definition
}
- private static interface InterfaceAcceptor {
+ private interface InterfaceAcceptor {
void implement( JClass c );
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BIUserConversion.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BIUserConversion.java
index d04edb8..eebbb73 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BIUserConversion.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BIUserConversion.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
@@ -76,11 +76,7 @@
DocumentBuilderFactory dbf = XmlFactory.createDocumentBuilderFactory(false);
InputSource is = new InputSource(new StringReader(text));
return dbf.newDocumentBuilder().parse(is).getDocumentElement();
- } catch (SAXException x) {
- throw new Error(x);
- } catch (IOException x) {
- throw new Error(x);
- } catch (ParserConfigurationException x) {
+ } catch (SAXException | IOException | ParserConfigurationException x) {
throw new Error(x);
}
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BindInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BindInfo.java
index cdb3a2f..caf849d 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BindInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BindInfo.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
@@ -306,14 +306,10 @@
if(controller.hadError()) throw new AbortException();
return (Document)builder.getDOM();
- } catch( IOException e ) {
- receiver.error( new SAXParseException2(e.getMessage(),null,e) );
- } catch( SAXException e ) {
- receiver.error( new SAXParseException2(e.getMessage(),null,e) );
- } catch( ParserConfigurationException e ) {
+ } catch( IOException | SAXException | ParserConfigurationException e ) {
receiver.error( new SAXParseException2(e.getMessage(),null,e) );
}
-
+
throw new AbortException();
}
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/DOMUtil.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/DOMUtil.java
index 3a2141b..3595ce4 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/DOMUtil.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/DOMUtil.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,7 +21,7 @@
* @author Kohsuke Kawaguchi
*/
public final class DOMUtil {
- final static String getAttribute(Element e,String attName) {
+ static String getAttribute(Element e,String attName) {
if(e.getAttributeNode(attName)==null) return null;
return e.getAttribute(attName);
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/ConnectedComponent.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/ConnectedComponent.java
index 238084b..2746771 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/ConnectedComponent.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/ConnectedComponent.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
@@ -29,13 +29,13 @@
/*package*/ boolean isRequired;
/**
- * Returns true iff this {@link ConnectedComponent}
+ * Returns true iff this
* can match a substring whose length is greater than 1.
*
* <p>
* That means this property will become a collection property.
*/
- public final boolean isCollection() {
+ public boolean isCollection() {
assert !elements.isEmpty();
// a strongly connected component by definition has a cycle,
@@ -49,14 +49,14 @@
}
/**
- * Returns true iff this {@link ConnectedComponent}
+ * Returns true iff this
* forms a cut set of a graph.
*
* <p>
* That means any valid element sequence must have at least
* one value for this property.
*/
- public final boolean isRequired() {
+ public boolean isRequired() {
return isRequired;
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Element.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Element.java
index ac5b2f0..59fc010 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Element.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Element.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,14 +34,14 @@
public abstract class Element extends Expression implements ElementSet {
/**
* Once we build a graph from {@link Expression},
- * we represent an edge e1 -> e2 by {@code e1.foreEdges.contains(e2)}
+ * we represent an edge e1 -{@literal >} e2 by {@code e1.foreEdges.contains(e2)}
* and {@code e2.backEdges.contains(e1)}.
*/
final Set<Element> foreEdges = new LinkedHashSet<>();
final Set<Element> backEdges = new LinkedHashSet<>();
/**
- * Previous element in the DFS post-order traveral
+ * Previous element in the DFS post-order traversal
* of the element graph.
*
* <p>
@@ -55,7 +55,7 @@
/**
* {@link ConnectedComponent} to which this element belongs.
*
- * Set in {@link #buildStronglyConnectedComponents(List<ConnectedComponent>)}
+ * Set in {@link #buildStronglyConnectedComponents(List)}
*/
private ConnectedComponent cc;
@@ -73,14 +73,14 @@
}
/**
- * True if this {@link Element} is {@link SourceNode}.
+ * True if this is {@link SourceNode}.
*/
boolean isSource() {
return false;
}
/**
- * True if this {@link Element} is {@link SinkNode}.
+ * True if this is {@link SinkNode}.
*/
boolean isSink() {
return false;
@@ -115,7 +115,7 @@
}
/**
- * Traverses the {@link Element} graph with DFS
+ * Traverses the graph with DFS
* and set {@link #prevPostOrder}.
*
* Should be first invoked on the source node of the graph.
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/ElementSet.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/ElementSet.java
index 51e9523..ec9fd0a 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/ElementSet.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/ElementSet.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
@@ -24,7 +24,7 @@
*/
void addNext(Element element);
- public static final ElementSet EMPTY_SET = new ElementSet() {
+ ElementSet EMPTY_SET = new ElementSet() {
@Override
public void addNext(Element element) {
// noop
@@ -37,7 +37,7 @@
@Override
public Iterator<Element> iterator() {
- return Collections.<Element>emptySet().iterator();
+ return Collections.emptyIterator();
}
};
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Expression.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Expression.java
index 76c2100..c3be280 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Expression.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Expression.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
@@ -10,8 +10,6 @@
package com.sun.tools.xjc.reader.gbind;
-import java.util.Set;
-
/**
* This builds content models.
*
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Graph.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Graph.java
index ef7ffb2..9238fe1 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Graph.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/gbind/Graph.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,10 +31,10 @@
private final List<ConnectedComponent> ccs = new ArrayList<>();
/**
- * Builds a {@link Graph} from an {@link Expression} tree.
+ * Builds a from an {@link Expression} tree.
*
* {@link Expression} given to the graph will be modified forever,
- * and it will not be able to create another {@link Graph}.
+ * and it will not be able to create another .
*/
public Graph(Expression body) {
// attach source and sink
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/AbstractReferenceFinderImpl.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/AbstractReferenceFinderImpl.java
index 505b588..6b3901a 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/AbstractReferenceFinderImpl.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/AbstractReferenceFinderImpl.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
@@ -71,7 +71,7 @@
int bangIdx = lsi.indexOf('!');
if (bangIdx > 0) {
ref = lsi.substring(0, bangIdx + 1)
- + new URI(lsi.substring(bangIdx + 1)).resolve(new URI(relativeRef)).toString();
+ + new URI(lsi.substring(bangIdx + 1)).resolve(new URI(relativeRef));
} else {
ref = relativeRef;
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/DOMForest.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/DOMForest.java
index 4dc9342..f4c8642 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/DOMForest.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/DOMForest.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
@@ -323,7 +323,7 @@
/**
* Gets the DOM that was built.
*/
- public Document getDocument();
+ Document getDocument();
}
private static abstract class HandlerImpl extends XMLFilterImpl implements Handler {
@@ -485,7 +485,7 @@
}
/**
- * Creates a {@link SAXSource} that, when parsed, reads from this {@link DOMForest}
+ * Creates a {@link SAXSource} that, when parsed, reads from this
* (instead of parsing the original source identified by the system ID.)
*/
public @NotNull SAXSource createSAXSource(String systemId) {
@@ -537,14 +537,14 @@
* Gets all the parsed documents.
*/
public Document[] listDocuments() {
- return core.values().toArray(new Document[core.size()]);
+ return core.values().toArray(new Document[0]);
}
/**
* Gets all the system IDs of the documents.
*/
public String[] listSystemIDs() {
- return core.keySet().toArray(new String[core.keySet().size()]);
+ return core.keySet().toArray(new String[0]);
}
/**
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 fd9dfc5..e723281 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
@@ -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
@@ -23,7 +23,6 @@
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
import com.sun.istack.SAXParseException2;
import com.sun.istack.NotNull;
@@ -52,7 +51,7 @@
* Internalizes external binding declarations.
*
* <p>
- * The {@link #transform(DOMForest,boolean)} method is the entry point.
+ * The {@link #transform(DOMForest, boolean, boolean)} method is the entry point.
*
* @author
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
@@ -174,8 +173,7 @@
// enhancement - schemaLocation="*" = bind to all schemas..
if(schemaLocation.equals("*")) {
for(String systemId : forest.listSystemIDs()) {
- if (result.get(bindings) == null)
- result.put(bindings, new ArrayList<>());
+ result.computeIfAbsent(bindings, k -> new ArrayList<>());
result.get(bindings).add(forest.get(systemId).getDocumentElement());
Element[] children = DOMUtils.getChildElements(bindings, Const.JAXB_NSURI, "bindings");
@@ -314,13 +312,11 @@
if (inheritedSCD != null) {
inheritedSCD.addBinidng(bindings);
} else if (!multiple || targetMultiple == null) {
- if (result.get(bindings) == null)
- result.put(bindings, new ArrayList<>());
+ result.computeIfAbsent(bindings, k -> new ArrayList<>());
result.get(bindings).add(target);
} else {
for (Node rnode : targetMultiple) {
- if (result.get(bindings) == null)
- result.put(bindings, new ArrayList<>());
+ result.computeIfAbsent(bindings, k -> new ArrayList<>());
result.get(bindings).add(rnode);
}
@@ -504,7 +500,7 @@
}
String prefix = allocatePrefix(root,nsUri);
- if( att.getValue().indexOf(prefix)==-1 )
+ if(!att.getValue().contains(prefix))
// avoid redeclaring the same namespace twice.
att.setValue( att.getValue()+' '+prefix);
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/VersionChecker.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/VersionChecker.java
index 63f654a..26bc1fd 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/VersionChecker.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/internalizer/VersionChecker.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
@@ -10,9 +10,9 @@
package com.sun.tools.xjc.reader.internalizer;
+import java.util.List;
import java.util.Set;
import java.util.HashSet;
-import java.util.Arrays;
import com.sun.tools.xjc.reader.Const;
@@ -122,6 +122,6 @@
this.locator = locator;
}
- private static final Set<String> VERSIONS = new HashSet<>(Arrays.asList("3.0"));
+ private static final Set<String> VERSIONS = new HashSet<>(List.of("3.0"));
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/relaxng/RELAXNGInternalizationLogic.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/relaxng/RELAXNGInternalizationLogic.java
index 7a1b765..f9d232c 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/relaxng/RELAXNGInternalizationLogic.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/relaxng/RELAXNGInternalizationLogic.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
@@ -44,7 +44,7 @@
else
return null;
}
- };
+ }
@Override
public XMLFilterImpl createExternalReferenceFinder(DOMForest parent) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BGMBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BGMBuilder.java
index 7086c23..68f9fde 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BGMBuilder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BGMBuilder.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
@@ -471,7 +471,7 @@
* See the chart at the class javadoc.
*/
public void ying( XSComponent sc, @Nullable XSComponent referer ) {
- if(sc.apply(toPurple)==true || getClassSelector().bindToType(sc,referer)!=null)
+ if(sc.apply(toPurple) || getClassSelector().bindToType(sc,referer)!=null)
sc.visit(purple);
else
sc.visit(green);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BindPurple.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BindPurple.java
index c40a2da..5977d54 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BindPurple.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BindPurple.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
@@ -10,7 +10,6 @@
package com.sun.tools.xjc.reader.xmlschema;
-import com.sun.tools.xjc.model.CClassInfo;
import com.sun.tools.xjc.model.CDefaultValue;
import com.sun.tools.xjc.model.CPropertyInfo;
import com.sun.tools.xjc.model.TypeUse;
@@ -63,7 +62,7 @@
prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue());
prop.realization = builder.fieldRendererFactory.getConst(prop.realization);
} else
- if(!attType.isCollection() && (prop.baseType == null ? true : !prop.baseType.isPrimitive())) {
+ if(!attType.isCollection() && (prop.baseType == null || !prop.baseType.isPrimitive())) {
// don't support a collection default value. That's difficult to do.
// primitive types default value is problematic too - we can't check whether it has been set or no ( ==null) isn't possible TODO: emit a waring in these cases
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 5a4bc14..d5f3f82 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
@@ -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
@@ -35,7 +35,6 @@
import com.sun.tools.xjc.reader.xmlschema.bindinfo.BIProperty;
import com.sun.tools.xjc.reader.xmlschema.bindinfo.BISchemaBinding;
import com.sun.tools.xjc.reader.xmlschema.bindinfo.LocalScoping;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import com.sun.xml.xsom.XSComplexType;
import com.sun.xml.xsom.XSComponent;
import com.sun.xml.xsom.XSDeclaration;
@@ -82,7 +81,7 @@
* <p>
* the cyclic dependency is as follows:
* elements need to bind its types first, because otherwise it can't
- * determine T of JAXBElement<T>.
+ * determine T of {@literal JAXBElement<T>}.
* OTOH, types need to know whether its parent is bound to a class to decide
* which class name to use.
*/
@@ -193,17 +192,17 @@
}
/** Gets the current class scope. */
- public final CClassInfoParent getClassScope() {
+ public CClassInfoParent getClassScope() {
assert !classScopes.isEmpty();
return classScopes.peek();
}
- public final void pushClassScope( CClassInfoParent clsFctry ) {
+ public void pushClassScope(CClassInfoParent clsFctry ) {
assert clsFctry!=null;
classScopes.push(clsFctry);
}
- public final void popClassScope() {
+ public void popClassScope() {
classScopes.pop();
}
@@ -218,7 +217,7 @@
/**
* Checks if the given component is bound to a class.
*/
- public final CElement isBound( XSElementDecl x, XSComponent referer ) {
+ public CElement isBound(XSElementDecl x, XSComponent referer ) {
CElementInfo r = boundElements.get(x);
if(r!=null)
return r;
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 a594499..60ca8e2 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
@@ -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
@@ -550,11 +550,11 @@
* deriving a default name.
*/
private String deriveName( XSComplexType comp ) {
- String seed = builder.deriveName( comp.getName(), comp );
+ StringBuilder seed = new StringBuilder(builder.deriveName(comp.getName(), comp));
int cnt = comp.getRedefinedCount();
for( ; cnt>0; cnt-- )
- seed = "Original"+seed;
- return seed;
+ seed.insert(0, "Original");
+ return seed.toString();
}
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/DefaultParticleBinder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/DefaultParticleBinder.java
index 7a759a9..bd0a476 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/DefaultParticleBinder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/DefaultParticleBinder.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
@@ -60,7 +60,7 @@
@Override
public boolean checkFallback( XSParticle p ) {
- return checkCollision(p,Collections.<XSParticle>emptyList()).hasNameCollision();
+ return checkCollision(p,Collections.emptyList()).hasNameCollision();
}
private Checker checkCollision( XSParticle p, Collection<XSParticle> forcedProps ) {
@@ -112,7 +112,7 @@
private final NameCollisionChecker cchecker = new NameCollisionChecker();
/**
- * @see DefaultParticleBinder#build(XSParticle, Collection<com.sun.xml.xsom.XSParticle>)
+ * @see DefaultParticleBinder#build(XSParticle, Collection)
*/
private final Collection<XSParticle> forcedProps;
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 fa0e253..97558d5 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
@@ -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
@@ -49,7 +49,7 @@
* {@link ClassSelector#getCurrentBean()}.
*/
public final void build( XSParticle p ) {
- build(p, Collections.<XSParticle>emptySet());
+ build(p, Collections.emptySet());
}
/**
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/RefererFinder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/RefererFinder.java
index 850e70c..d714a82 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/RefererFinder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/RefererFinder.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
@@ -146,11 +146,7 @@
* So far we only care about references to types.
*/
private void refer(XSComponent source, XSType target) {
- Set<XSComponent> r = referers.get(target);
- if(r==null) {
- r = new HashSet<>();
- referers.put(target,r);
- }
+ Set<XSComponent> r = referers.computeIfAbsent(target, k -> new HashSet<>());
r.add(source);
}
}
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 3ebb7b0..b73b010 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
@@ -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
@@ -272,7 +272,7 @@
return t.apply(composer);
}
- public final XSSimpleTypeFunction<TypeUse> composer = new XSSimpleTypeFunction<TypeUse>() {
+ public final XSSimpleTypeFunction<TypeUse> composer = new XSSimpleTypeFunction<>() {
@Override
public TypeUse listSimpleType(XSListSimpleType type) {
@@ -394,7 +394,7 @@
if(type.isRestriction() && !noAutoEnum) {
XSRestrictionSimpleType rst = type.asRestriction();
if(shouldBeMappedToTypeSafeEnumByDefault(rst)) {
- r = bindToTypeSafeEnum(rst,null,null, Collections.<String, BIEnumMember>emptyMap(),
+ r = bindToTypeSafeEnum(rst,null,null, Collections.emptyMap(),
getEnumMemberMode(),null);
if(r!=null)
return r;
@@ -461,13 +461,12 @@
private static final Set<String> builtinTypeSafeEnumCapableTypes;
static {
- Set<String> s = new HashSet<>();
// see a bullet of 6.5.1 of the spec.
String[] typeNames = new String[] {
"string", "boolean", "float", "decimal", "double", "anyURI"
};
- s.addAll(Arrays.asList(typeNames));
+ Set<String> s = new HashSet<>(Arrays.asList(typeNames));
builtinTypeSafeEnumCapableTypes = Collections.unmodifiableSet(s);
}
@@ -789,13 +788,10 @@
}
return CBuiltinLeafInfo.DATA_HANDLER.makeMimeTyped(mt.toMimeType());
- } catch (ParseException e) {
+ } catch (ParseException | MimeTypeParseException e) {
getErrorReporter().error( referer.getLocator(),
Messages.format(Messages.ERR_ILLEGAL_EXPECTED_MIME_TYPE,emt, e.getMessage()) );
// recover by using the default
- } catch (MimeTypeParseException e) {
- getErrorReporter().error( referer.getLocator(),
- Messages.format(Messages.ERR_ILLEGAL_EXPECTED_MIME_TYPE,emt, e.getMessage()) );
}
}
// default
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/UnusedCustomizationChecker.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/UnusedCustomizationChecker.java
index 6c013ec..5155441 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/UnusedCustomizationChecker.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/UnusedCustomizationChecker.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
@@ -166,11 +166,11 @@
}
private void attContainer( XSAttContainer cont ) {
- for( Iterator itr = cont.iterateAttGroups(); itr.hasNext(); )
- ((XSAttGroupDecl)itr.next()).visit(this);
+ for(Iterator<? extends XSAttGroupDecl> itr = cont.iterateAttGroups(); itr.hasNext(); )
+ itr.next().visit(this);
- for( Iterator itr = cont.iterateDeclaredAttributeUses(); itr.hasNext(); )
- ((XSAttributeUse)itr.next()).visit(this);
+ for(Iterator<? extends XSAttributeUse> itr = cont.iterateDeclaredAttributeUses(); itr.hasNext(); )
+ itr.next().visit(this);
XSWildcard wc = cont.getAttributeWildcard();
if(wc!=null) wc.visit(this);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/WildcardNameClassBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/WildcardNameClassBuilder.java
index a944213..7532733 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/WildcardNameClassBuilder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/WildcardNameClassBuilder.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
@@ -55,8 +55,8 @@
@Override
public NameClass union(XSWildcard.Union wc) {
NameClass nc = null;
- for (Iterator itr = wc.iterateNamespaces(); itr.hasNext();) {
- String ns = (String) itr.next();
+ for (Iterator<String> itr = wc.iterateNamespaces(); itr.hasNext();) {
+ String ns = itr.next();
if(nc==null) nc = new NsNameClass(ns);
else
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIConversion.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIConversion.java
index 0b634e8..782af3d 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIConversion.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIConversion.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 @@
import com.sun.tools.xjc.reader.Ring;
import com.sun.tools.xjc.reader.TypeUtil;
import com.sun.tools.xjc.reader.xmlschema.ClassSelector;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import com.sun.xml.xsom.XSSimpleType;
import org.xml.sax.Locator;
@@ -69,9 +68,9 @@
* The returned {@link TypeUse} object is properly adapted.
*
* @param owner
- * A {@link BIConversion} is always associated with one
+ * A is always associated with one
* {@link XSSimpleType}, but that's not always available
- * when a {@link BIConversion} is built. So we pass this
+ * when a is built. So we pass this
* as a parameter to this method.
*/
public abstract TypeUse getTypeUse( XSSimpleType owner );
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIDeclaration.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIDeclaration.java
index e0a66d9..ba81072 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIDeclaration.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIDeclaration.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,7 @@
* This method can be only called from {@link BindInfo},
* and only once. This is a good opportunity to do some
* follow-up initialization after JAXB unmarshalling
- * populated {@link BIDeclaration}.
+ * populated .
*/
void setParent( BindInfo parent );
@@ -81,7 +81,7 @@
void onSetOwner();
/**
- * Gets child {@link BIDeclaration}s if any.
+ * Gets child s if any.
*
* @return
* can be empty but always non-null. read-only.
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java
index fa92092..a18f546 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.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,6 @@
import com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder;
import com.sun.tools.xjc.util.ReadOnlyAdapter;
import org.glassfish.jaxb.core.api.impl.NameConverter;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import com.sun.xml.xsom.XSDeclaration;
import com.sun.xml.xsom.XSSchemaSet;
import com.sun.xml.xsom.XSSimpleType;
@@ -164,7 +163,7 @@
}
}
- private static enum UnderscoreBinding {
+ private enum UnderscoreBinding {
@XmlEnumValue("asWordSeparator")
WORD_SEPARATOR(NameConverter.standard),
@XmlEnumValue("asCharInWord")
@@ -420,8 +419,7 @@
/**
* Checks if the given XML Schema built-in type can be mapped to
* a type-safe enum class.
- *
- * @param typeName
+ *
*/
public boolean canBeMappedToTypeSafeEnum( QName typeName ) {
return enumBaseTypes.contains(typeName);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java
index 7595cf6..e652ef4 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.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
@@ -29,7 +29,7 @@
public class BIInlineBinaryData extends AbstractDeclarationImpl {
/**
- * If the given component has {@link BIInlineBinaryData} customization,
+ * If the given component has customization,
* reflect that to the specified property.
*/
public static void handle(XSComponent source, CPropertyInfo prop) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java
index 84b817c..fb6b3ca 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.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
@@ -127,7 +127,7 @@
if(conv==null)
return super.getChildren();
else
- return Collections.<BIDeclaration>singleton(conv);
+ return Collections.singleton(conv);
}
@Override
@@ -393,8 +393,8 @@
CReferencePropertyInfo prop = wrapUp(
new CReferencePropertyInfo(
name,
- (types == null) ? true : types.getCollectionMode().isRepeated()||isMixed,
- (types == null) ? false : types.isRequired(),
+ types == null || types.getCollectionMode().isRepeated() || isMixed,
+ types != null && types.isRequired(),
isMixed,
source,
getCustomizations(source), source.getLocator(), dummy, content, isMixedExtended),
@@ -667,7 +667,7 @@
return getDefault(builder,c);
}
- private final static XSFunction<XSComponent> defaultCustomizationFinder = new XSFunction<XSComponent>() {
+ private final static XSFunction<XSComponent> defaultCustomizationFinder = new XSFunction<>() {
@Override
public XSComponent attributeUse(XSAttributeUse use) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIXPluginCustomization.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIXPluginCustomization.java
index 0f98674..a5c9f33 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIXPluginCustomization.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIXPluginCustomization.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
@@ -46,7 +46,7 @@
}
@Override
- public final QName getName() {
+ public QName getName() {
if(name==null)
name = new QName(element.getNamespaceURI(),element.getLocalName());
return name;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIXSubstitutable.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIXSubstitutable.java
index fbf8a3d..e72e590 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIXSubstitutable.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIXSubstitutable.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
@@ -27,7 +27,7 @@
@XmlRootElement(name="substitutable",namespace= Const.XJC_EXTENSION_URI)
public final class BIXSubstitutable extends AbstractDeclarationImpl {
@Override
- public final QName getName() { return NAME; }
+ public QName getName() { return NAME; }
/** Name of the conversion declaration. */
public static final QName NAME = new QName(Const.XJC_EXTENSION_URI,"substitutable");
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 2ee45a6..c2887b1 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
@@ -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,7 +34,6 @@
import javax.xml.transform.stream.StreamResult;
import com.sun.codemodel.JDocComment;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import com.sun.tools.xjc.SchemaCache;
import com.sun.tools.xjc.model.CCustomizations;
import com.sun.tools.xjc.model.CPluginCustomization;
@@ -72,10 +71,10 @@
private Documentation documentation;
/**
- * Returns true if this {@link BindInfo} doesn't contain any useful
+ * Returns true if this doesn't contain any useful
* information.
*
- * This flag is used to discard unused {@link BindInfo}s early to save memory footprint.
+ * This flag is used to discard unused s early to save memory footprint.
*/
public boolean isPointless() {
if(size()>0) return false;
@@ -195,7 +194,7 @@
* Gets all the declarations
*/
public BIDeclaration[] getDecls() {
- return decls.toArray(new BIDeclaration[decls.size()]);
+ return decls.toArray(new BIDeclaration[0]);
}
/**
@@ -210,7 +209,7 @@
StringBuilder buf = new StringBuilder();
for (Object c : documentation.contents) {
if(c instanceof String) {
- buf.append(c.toString());
+ buf.append(c);
}
if(c instanceof Element) {
Transformer t = builder.getIdentityTransformer();
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java
index ffc17fc..12e51cb 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.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
@@ -14,7 +14,6 @@
import jakarta.xml.bind.annotation.XmlValue;
import com.sun.tools.xjc.generator.bean.field.FieldRenderer;
-import com.sun.tools.xjc.generator.bean.field.UntypedListFieldRenderer;
import com.sun.tools.xjc.generator.bean.field.FieldRendererFactory;
import com.sun.tools.xjc.model.Model;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/ForkingFilter.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/ForkingFilter.java
index 73bef18..50ab3b8 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/ForkingFilter.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/ForkingFilter.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
@@ -10,7 +10,6 @@
package com.sun.tools.xjc.reader.xmlschema.bindinfo;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import java.util.ArrayList;
import org.xml.sax.Attributes;
@@ -153,14 +152,14 @@
}
@Override
- public void characters(char ch[], int start, int length) throws SAXException {
+ public void characters(char[] ch, int start, int length) throws SAXException {
if(side!=null)
side.characters(ch, start, length);
super.characters(ch, start, length);
}
@Override
- public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
+ public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
if(side!=null)
side.ignorableWhitespace(ch, start, length);
super.ignorableWhitespace(ch, start, length);
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java
index 0d6837c..ba83a97 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.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
@@ -50,7 +50,7 @@
/**
* Computes a name class that represents everything in a given content model.
*/
- protected final XSTermFunction<NameClass> contentModelNameClassBuilder = new XSTermFunction<NameClass>() {
+ protected final XSTermFunction<NameClass> contentModelNameClassBuilder = new XSTermFunction<>() {
@Override
public NameClass wildcard(XSWildcard wc) {
return WildcardNameClassBuilder.build(wc);
@@ -89,9 +89,9 @@
// build attribute name classes
NameClass nc = NameClass.NULL;
- Iterator itr = type.iterateAttributeUses();
+ Iterator<? extends XSAttributeUse> itr = type.iterateAttributeUses();
while( itr.hasNext() )
- anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl()));
+ anc = new ChoiceNameClass(anc, getNameClass(itr.next().getDecl()));
XSWildcard wc = type.getAttributeWildcard();
if(wc!=null)
nc = new ChoiceNameClass(nc, WildcardNameClassBuilder.build(wc));
@@ -104,9 +104,9 @@
}
/**
- * Looks for the derivation chain t_1 > t_2 > ... > t
+ * Looks for the derivation chain t_1 {@literal >} t_2 {@literal >} ... {@literal >} t
* and find t_i such that t_i derives by restriction but
- * for every j>i, t_j derives by extension.
+ * for every j{@literal >}i, t_j derives by extension.
*
* @return null
* If there's no such t_i or if t_i is any type.
@@ -165,9 +165,9 @@
}
NameClass anc = NameClass.NULL;
// build name class for attributes in new complex type
- Iterator itr = thisType.iterateDeclaredAttributeUses();
+ Iterator<? extends XSAttributeUse> itr = thisType.iterateDeclaredAttributeUses();
while (itr.hasNext()) {
- anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl()));
+ anc = new ChoiceNameClass(anc, getNameClass(itr.next().getDecl()));
}
// TODO: attribute wildcard
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 7055729..7e2dbfd 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
@@ -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
@@ -14,10 +14,8 @@
import com.sun.tools.xjc.model.CPropertyInfo;
import com.sun.tools.xjc.reader.RawTypeSet;
import com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder;
-import com.sun.tools.xjc.reader.xmlschema.bindinfo.BIGlobalBinding;
import com.sun.tools.xjc.reader.xmlschema.bindinfo.BIProperty;
import com.sun.xml.xsom.XSComplexType;
-import com.sun.xml.xsom.XSContentType;
import com.sun.xml.xsom.XSType;
/**
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/RestrictedComplexTypeBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/RestrictedComplexTypeBuilder.java
index 9380abc..4667e02 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/RestrictedComplexTypeBuilder.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/ct/RestrictedComplexTypeBuilder.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
@@ -14,7 +14,6 @@
import com.sun.tools.xjc.model.CPropertyInfo;
import com.sun.tools.xjc.reader.RawTypeSet;
import com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder;
-import com.sun.tools.xjc.reader.xmlschema.bindinfo.BIGlobalBinding;
import com.sun.tools.xjc.reader.xmlschema.bindinfo.BIProperty;
import com.sun.xml.xsom.XSComplexType;
import com.sun.xml.xsom.XSParticle;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/CustomizationContextChecker.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/CustomizationContextChecker.java
index 49ed038..f7267f4 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/CustomizationContextChecker.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/CustomizationContextChecker.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,7 +18,6 @@
import javax.xml.namespace.QName;
import com.sun.tools.xjc.reader.Const;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.xml.sax.Attributes;
import org.xml.sax.ErrorHandler;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/IncorrectNamespaceURIChecker.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/IncorrectNamespaceURIChecker.java
index 75b196e..1c623e8 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/IncorrectNamespaceURIChecker.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/IncorrectNamespaceURIChecker.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
@@ -11,7 +11,6 @@
package com.sun.tools.xjc.reader.xmlschema.parser;
import com.sun.tools.xjc.reader.Const;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.xml.sax.Attributes;
import org.xml.sax.ErrorHandler;
import org.xml.sax.Locator;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
index 77b0ae0..aa53e04 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/SchemaConstraintChecker.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,7 +33,6 @@
/**
* Checks XML Schema XML representation constraints and
* schema component constraints by using JAXP 1.3 validation framework.
- * <p>
*
* @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
* @author Ryan Shoemaker (ryan.shoemaker@sun.com)
@@ -66,10 +65,7 @@
InputSource is = entityResolver.resolveEntity(namespaceURI, systemId == null ? "" : systemId);
if(is==null) return null;
return new LSInputSAXWrapper(is);
- } catch (SAXException e) {
- // TODO: is this sufficient?
- return null;
- } catch (IOException e) {
+ } catch (SAXException | IOException e) {
// TODO: is this sufficient?
return null;
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java
index 0ed45a8..73c3c38 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.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
@@ -14,7 +14,6 @@
import com.sun.tools.xjc.reader.internalizer.DOMForest;
import com.sun.tools.xjc.reader.internalizer.InternalizationLogic;
import com.sun.tools.xjc.util.DOMUtils;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/runtime/JAXBContextFactory.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/runtime/JAXBContextFactory.java
index 73c57a5..246957e 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/runtime/JAXBContextFactory.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/runtime/JAXBContextFactory.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
@@ -136,7 +136,7 @@
}
// delegate to the JAXB provider in the system
- return JAXBContext.newInstance(classes.toArray(new Class<?>[classes.size()]),properties);
+ return JAXBContext.newInstance(classes.toArray(new Class<?>[0]),properties);
}
private static ClassLoader getClassClassLoader(final Class<?> c) {
@@ -144,7 +144,7 @@
return c.getClassLoader();
} else {
return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
+ new java.security.PrivilegedAction<>() {
@Override
public ClassLoader run() {
return c.getClassLoader();
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/DOMUtils.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/DOMUtils.java
index e41fa08..ba3ba96 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/DOMUtils.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/DOMUtils.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
@@ -61,7 +61,7 @@
&& localPart.equals(item.getLocalName()) )
a.add((Element) item);
}
- return a.toArray(new Element[a.size()]);
+ return a.toArray(new Element[0]);
}
/** Gets all the child elements. */
@@ -74,7 +74,7 @@
a.add((Element) item);
}
- return a.toArray(new Element[a.size()]);
+ return a.toArray(new Element[0]);
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/ForkContentHandler.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/ForkContentHandler.java
index 2138ea5..7c2c371 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/ForkContentHandler.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/ForkContentHandler.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
@@ -98,13 +98,13 @@
}
@Override
- public void characters (char ch[], int start, int length) throws SAXException {
+ public void characters (char[] ch, int start, int length) throws SAXException {
lhs.characters(ch,start,length);
rhs.characters(ch,start,length);
}
@Override
- public void ignorableWhitespace (char ch[], int start, int length) throws SAXException {
+ public void ignorableWhitespace (char[] ch, int start, int length) throws SAXException {
lhs.ignorableWhitespace(ch,start,length);
rhs.ignorableWhitespace(ch,start,length);
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/NamespaceContextAdapter.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/NamespaceContextAdapter.java
index 3f21137..a2668ac 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/NamespaceContextAdapter.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/NamespaceContextAdapter.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,6 @@
@Override
public Iterator<String> getPrefixes(String namespaceURI) {
- return Collections.<String>emptyList().iterator();
+ return Collections.emptyIterator();
}
}
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/writer/SignatureWriter.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/writer/SignatureWriter.java
index 8452e11..0ffa262 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/writer/SignatureWriter.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/writer/SignatureWriter.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
@@ -72,7 +72,7 @@
private void dump() throws IOException {
// collect packages used in the class.
- Set<JPackage> packages = new TreeSet<>(new Comparator<JPackage>() {
+ Set<JPackage> packages = new TreeSet<>(new Comparator<>() {
@Override
public int compare(JPackage lhs, JPackage rhs) {
return lhs.name().compareTo(rhs.name());
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle.properties
index 9dae8a9..d85bd1c 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle.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
@@ -31,8 +31,7 @@
\ \ dryrun : compile the schema in memory, but don't generate the Java source\n\
\ \ zip : generate Java source code into a zip file specified by the -d option\n\
\ \ sig : dump the signatures of the generated code\n\
-\ \ forest : dump transformed DOM forest\n\
-
+\ \ forest : dump transformed DOM forest
Driver.Public.Usage = \
Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
If dir is specified, all schema files in it will be compiled.\n\
@@ -66,8 +65,7 @@
\ \ -quiet : suppress compiler output\n\
\ \ -help : display this help message\n\
\ \ -version : display version information\n\
-\ \ -fullversion : display full version information\n\
-
+\ \ -fullversion : display full version information
Driver.AddonUsage = \nExtensions:
# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
@@ -150,7 +148,7 @@
Stack overflow. Either you are compiling a large schema that requires more resources, or \
XJC has a bug. First, please extend the stack size by using the -Xss JVM option. If this \
doesn'''t solve the problem, please use the -debug option to obtain the stack trace and \
- contact Sun.
+ contact Sun.
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = \
@@ -164,7 +162,7 @@
This file was generated by the Eclipse Implementation of JAXB, v${version} \n\
See https://eclipse-ee4j.github.io/jaxb-ri \n\
Any modifications to this file will be lost upon recompilation of the source schema. \n\
- Generated on: {0} \n
+ Generated on: {0}
Driver.Version = \
xjc ${version}
@@ -225,7 +223,7 @@
"{0}" is neither a file name nor a URL
FIELD_RENDERER_CONFLICT = \
- "-{0}" and "-{1}" are mutually exclusive since both affect the code generation
+ "-{0}" and "-{1}" are mutually exclusive since both affect the code generation
NAME_CONVERTER_CONFLICT = \
"-{0}" and "-{1}" are mutually exclusive since both affect the code generation
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_de.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_de.properties
index ce1860d..35bfa7a 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_de.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_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
@@ -27,7 +27,7 @@
\ \ dryrun : Kompiliert das Schema im Speicher, generiert die Java-Quelle jedoch nicht\n\
\ \ zip : Generiert den Java-Quellcode in einer .zip-Datei, wie mit der Option -d angegeben\n\
\ \ sig : Gibt die Signaturen des generierten Codes aus\n\
-\ \ forest : Gibt transformierte DOM-Gesamtstruktur aus\n
+\ \ forest : Gibt transformierte DOM-Gesamtstruktur aus
Driver.Public.Usage = Verwendung: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
Wenn dir angegeben wird, werden alle Schemadateien im Verzeichnis kompiliert.\n\
@@ -59,8 +59,7 @@
\ \ -quiet : Unterdr\u00fcckt die Compilerausgabe\n\
\ \ -help : Zeigt diese Hilfemeldung an\n\
\ \ -version : Zeigt Versionsinformationen an\n\
-\ \ -fullversion : Zeigt vollst\u00e4ndige Versionsinformationen an\n\
-
+\ \ -fullversion : Zeigt vollst\u00e4ndige Versionsinformationen an
Driver.AddonUsage = \nErweiterungen:
# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
@@ -116,7 +115,7 @@
Driver.ParseFailed = Ein Schema konnte nicht geparst werden.
-Driver.StackOverflow = Stack-\u00dcberlauf. Entweder kompilieren Sie ein gro\u00dfes Schema, das mehr Ressourcen erfordert, oder XJC enth\u00e4lt einen Bug. Erweitern Sie zuerst die Stack-Gr\u00f6\u00dfe mit der Option -Xss JVM. Wenn das Problem dadurch nicht gel\u00f6st wird, verwenden Sie die Option -debug, um den Stack Trace abzurufen, und wenden Sie sich an Sun.
+Driver.StackOverflow = Stack-\u00dcberlauf. Entweder kompilieren Sie ein gro\u00dfes Schema, das mehr Ressourcen erfordert, oder XJC enth\u00e4lt einen Bug. Erweitern Sie zuerst die Stack-Gr\u00f6\u00dfe mit der Option -Xss JVM. Wenn das Problem dadurch nicht gel\u00f6st wird, verwenden Sie die Option -debug, um den Stack Trace abzurufen, und wenden Sie sich an Sun.
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = Ein Schema wird kompiliert ...
@@ -124,7 +123,7 @@
Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden.
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = Diese Datei wurde mit der Eclipse Implementation of JAXB, v${version} generiert \nSiehe https://eclipse-ee4j.github.io/jaxb-ri \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n
+Driver.FilePrologComment = Diese Datei wurde mit der Eclipse Implementation of JAXB, v${version} generiert \nSiehe https://eclipse-ee4j.github.io/jaxb-ri \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0}
Driver.Version = xjc ${version}
@@ -169,7 +168,7 @@
Driver.NotAFileNorURL = "{0}" ist weder ein Dateiname noch eine URL
-FIELD_RENDERER_CONFLICT = "-{0}" und "-{1}" schlie\u00dfen sich gegenseitig aus, weil sich beide auf die Codegenerierung auswirken
+FIELD_RENDERER_CONFLICT = "-{0}" und "-{1}" schlie\u00dfen sich gegenseitig aus, weil sich beide auf die Codegenerierung auswirken
NAME_CONVERTER_CONFLICT = "-{0}" und "-{1}" schlie\u00dfen sich gegenseitig aus, weil sich beide auf die Codegenerierung auswirken
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_es.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_es.properties
index 61c06c5..a84a037 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_es.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_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
@@ -27,7 +27,7 @@
\ \ dryrun : compila el esquema en la memoria, pero no genera el c\u00f3digo fuente Java\n\
\ \ zip : genera c\u00f3digo fuente Java en un archivo zip especificado por la opci\u00f3n -d\n\
\ \ sig : vuelca las firmas del c\u00f3digo generado\n\
-\ \ forest : vuelca el bosque DOM transformado\n
+\ \ forest : vuelca el bosque DOM transformado
Driver.Public.Usage = Sintaxis: xjc [-options ...] <archivo de esquema/URL/dir/jar> ... [-b <infoenlace>] ...\n\
Si se especifica dir, se compilar\u00e1n todos los archivos de esquema que hay en \u00e9l.\n\
@@ -59,8 +59,7 @@
\ \ -quiet : suprime la salida del compilador\n\
\ \ -help : muestra este mensaje de ayuda\n\
\ \ -version : muestra informaci\u00f3n de la versi\u00f3n\n\
-\ \ -fullversion : muestra informaci\u00f3n completa de la versi\u00f3n\n\
-
+\ \ -fullversion : muestra informaci\u00f3n completa de la versi\u00f3n
Driver.AddonUsage = \nExtensiones:
# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
@@ -116,7 +115,7 @@
Driver.ParseFailed = Fallo al analizar un esquema.
-Driver.StackOverflow = Desbordamiento de pila. Est\u00e1 compilando un esquema de gran tama\u00f1o que necesita m\u00e1s recursos o XJC tiene un bug. En primer lugar, para ampliar el tama\u00f1o de pila, utilice la opci\u00f3n -Xss de JVM. Si no se soluciona el problema, utilice la opci\u00f3n -debug para obtener el rastreo de pila y p\u00f3ngase en contacto con Oracle.
+Driver.StackOverflow = Desbordamiento de pila. Est\u00e1 compilando un esquema de gran tama\u00f1o que necesita m\u00e1s recursos o XJC tiene un bug. En primer lugar, para ampliar el tama\u00f1o de pila, utilice la opci\u00f3n -Xss de JVM. Si no se soluciona el problema, utilice la opci\u00f3n -debug para obtener el rastreo de pila y p\u00f3ngase en contacto con Oracle.
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = Compilando un esquema...
@@ -124,7 +123,7 @@
Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo.
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = Este archivo ha sido generado por Eclipse Implementation of JAXB v${version} \nVisite https://eclipse-ee4j.github.io/jaxb-ri \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n
+Driver.FilePrologComment = Este archivo ha sido generado por Eclipse Implementation of JAXB v${version} \nVisite https://eclipse-ee4j.github.io/jaxb-ri \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0}
Driver.Version = xjc ${version}
@@ -169,7 +168,7 @@
Driver.NotAFileNorURL = "{0}" no es un nombre de archivo ni una URL
-FIELD_RENDERER_CONFLICT = "-{0}" y "-{1}" se excluyen mutuamente, porque ambos afectan a la generaci\u00f3n de c\u00f3digo
+FIELD_RENDERER_CONFLICT = "-{0}" y "-{1}" se excluyen mutuamente, porque ambos afectan a la generaci\u00f3n de c\u00f3digo
NAME_CONVERTER_CONFLICT = "-{0}" y "-{1}" se excluyen mutuamente, porque ambos afectan a la generaci\u00f3n de c\u00f3digo
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 cc6cc2f..154f491 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
@@ -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 @@
\ \ dryrun : compilez le sch\u00e9ma en m\u00e9moire, mais ne g\u00e9n\u00e9rez pas la source Java\n\
\ \ zip : g\u00e9n\u00e9rez le code source Java dans un fichier ZIP indiqu\u00e9 par l'option -d\n\
\ \ sig : videz les signatures du code g\u00e9n\u00e9r\u00e9\n\
-\ \ forest : le vidage a transform\u00e9 la for\u00eat DOM\n
+\ \ forest : le vidage a transform\u00e9 la for\u00eat DOM
Driver.AddonUsage = \nExtensions :
@@ -62,8 +62,7 @@
\ \ -quiet : supprimez la sortie de compilateur\n\
\ \ -help : affichez ce message d'aide\n\
\ \ -version : affichez ces informations de version\n\
-\ \ -fullversion : affichez ces informations de version compl\u00e8te\n\
-
+\ \ -fullversion : affichez ces informations de version compl\u00e8te
Driver.AddonUsage = \n\
Extensions :
@@ -120,7 +119,7 @@
Driver.ParseFailed = Echec de l'analyse d'un sch\u00e9ma.
-Driver.StackOverflow = D\u00e9bordement de pile. Vous compilez un sch\u00e9ma volumineux qui exige davantage de ressources ou XJC pr\u00e9sente un bug. Etendez d'abord la taille de pile \u00e0 l'aide de l'option JVM -Xss. Si le probl\u00e8me persiste, utilisez l'option -debug pour obtenir la trace de pile et contactez Sun.
+Driver.StackOverflow = D\u00e9bordement de pile. Vous compilez un sch\u00e9ma volumineux qui exige davantage de ressources ou XJC pr\u00e9sente un bug. Etendez d'abord la taille de pile \u00e0 l'aide de l'option JVM -Xss. Si le probl\u00e8me persiste, utilisez l'option -debug pour obtenir la trace de pile et contactez Sun.
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = compilation d'un sch\u00e9ma...
@@ -128,7 +127,7 @@
Driver.FailedToGenerateCode = Echec de la production du code.
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par Eclipse Implementation of JAXB, v${version} \nVoir https://eclipse-ee4j.github.io/jaxb-ri \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n
+Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par Eclipse Implementation of JAXB, v${version} \nVoir https://eclipse-ee4j.github.io/jaxb-ri \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0}
Driver.Version = xjc ${version}
@@ -173,7 +172,7 @@
Driver.NotAFileNorURL = "{0}" n''est pas un nom de fichier ni une URL
-FIELD_RENDERER_CONFLICT = "-{0}" et "-{1}" sont mutuellement exclusifs car ils affectent tous deux la g\u00e9n\u00e9ration du code
+FIELD_RENDERER_CONFLICT = "-{0}" et "-{1}" sont mutuellement exclusifs car ils affectent tous deux la g\u00e9n\u00e9ration du code
NAME_CONVERTER_CONFLICT = "-{0}" et "-{1}" sont mutuellement exclusifs car ils affectent tous deux la g\u00e9n\u00e9ration du code
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_it.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_it.properties
index 1a4c4ce..b977222 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_it.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_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
@@ -27,7 +27,7 @@
\ \ dryrun : compila lo schema nella memoria ma non genera il codice sorgente Java\n\
\ \ zip : genera il codice sorgente Java in un file zip specificato dall'opzione -d\n\
\ \ sig : esegue il dump del firme del codice generato\n\
-\ \ forest : esegue il dump dell'insieme di strutture DOM trasformato\n
+\ \ forest : esegue il dump dell'insieme di strutture DOM trasformato
Driver.Public.Usage = Uso: xjc [-options ...] <file schema/URL/dir/jar> ... [-b <bindinfo>] ...\n\
Se viene specificato dir, verranno compilati tutti i file dello schema in essa contenuti.\n\
@@ -59,8 +59,7 @@
\ \ -quiet : elimina l'output del compilatore\n\
\ \ -help : visualizza questo messaggio della Guida\n\
\ \ -version : visualizza le informazioni sulla versione\n\
-\ \ -fullversion : visualizza le informazioni sulla versione completa\n\
-
+\ \ -fullversion : visualizza le informazioni sulla versione completa
Driver.AddonUsage = \nEstensioni:
# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
@@ -116,7 +115,7 @@
Driver.ParseFailed = Analisi di uno schema non riuscita.
-Driver.StackOverflow = Overflow dello stack. Si sta compilando uno schema grande che richiede pi\u00f9 risorse oppure XJC contiene un bug. Per prima cosa, estendere la dimensione dello stack usando l'opzione -Xss JVM. Se questo non risolve il problema, usare l'opzione -debug per ottenere lo stack trace e contattare Sun.
+Driver.StackOverflow = Overflow dello stack. Si sta compilando uno schema grande che richiede pi\u00f9 risorse oppure XJC contiene un bug. Per prima cosa, estendere la dimensione dello stack usando l'opzione -Xss JVM. Se questo non risolve il problema, usare l'opzione -debug per ottenere lo stack trace e contattare Sun.
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = compilazione di uno schema in corso...
@@ -124,7 +123,7 @@
Driver.FailedToGenerateCode = Produzione del codice non riuscita.
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = Questo file \u00e8 stato generato dall''Eclipse Implementation of JAXB, v${version} \nVedere https://eclipse-ee4j.github.io/jaxb-ri \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n
+Driver.FilePrologComment = Questo file \u00e8 stato generato dall''Eclipse Implementation of JAXB, v${version} \nVedere https://eclipse-ee4j.github.io/jaxb-ri \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0}
Driver.Version = xjc ${version}
@@ -169,7 +168,7 @@
Driver.NotAFileNorURL = "{0}" non \u00e8 un nome file n\u00e9 un URL
-FIELD_RENDERER_CONFLICT = "-{0}" e "-{1}" si escludono a vicenda poich\u00e9 entrambi influiscono sulla generazione del codice
+FIELD_RENDERER_CONFLICT = "-{0}" e "-{1}" si escludono a vicenda poich\u00e9 entrambi influiscono sulla generazione del codice
NAME_CONVERTER_CONFLICT = "-{0}" e "-{1}" si escludono a vicenda poich\u00e9 entrambi influiscono sulla generazione del codice
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_ja.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_ja.properties
index 84d9a92..f26a832 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_ja.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_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
@@ -27,7 +27,7 @@
\ \ dryrun : \u30e1\u30e2\u30ea\u30fc\u5185\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u304c\u3001Java\u30bd\u30fc\u30b9\u306f\u751f\u6210\u3057\u307e\u305b\u3093\n\
\ \ zip : Java\u30bd\u30fc\u30b9\u30fb\u30b3\u30fc\u30c9\u3092\u3001-d\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3055\u308c\u305fzip\u30d5\u30a1\u30a4\u30eb\u306b\u751f\u6210\u3057\u307e\u3059\n\
\ \ sig : \u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306e\u7f72\u540d\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059\n\
-\ \ forest : \u5909\u63db\u3055\u308c\u305fDOM\u30d5\u30a9\u30ec\u30b9\u30c8\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059\n
+\ \ forest : \u5909\u63db\u3055\u308c\u305fDOM\u30d5\u30a9\u30ec\u30b9\u30c8\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059
Driver.Public.Usage = \u4f7f\u7528\u65b9\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
dir\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001dir\u5185\u306e\u3059\u3079\u3066\u306e\u30b9\u30ad\u30fc\u30de\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\n\
@@ -59,8 +59,7 @@
\ \ -quiet : \u30b3\u30f3\u30d1\u30a4\u30e9\u51fa\u529b\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\n\
\ \ -help : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\
\ \ -version : \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\
-\ \ -fullversion : \u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\
-
+\ \ -fullversion : \u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059
Driver.AddonUsage = \n\u62e1\u5f35:
# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
@@ -116,7 +115,7 @@
Driver.ParseFailed = \u30b9\u30ad\u30fc\u30de\u306e\u89e3\u6790\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
-Driver.StackOverflow = \u30b9\u30bf\u30c3\u30af\u30fb\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3067\u3059\u3002\u3055\u3089\u306b\u30ea\u30bd\u30fc\u30b9\u304c\u5fc5\u8981\u306a\u5927\u304d\u3044\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u308b\u304b\u3001XJC\u306b\u30d0\u30b0\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u3001-Xss JVM\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30bf\u30c3\u30af\u30fb\u30b5\u30a4\u30ba\u3092\u62e1\u5f35\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3067\u554f\u984c\u304c\u89e3\u6c7a\u3057\u306a\u3044\u5834\u5408\u306f\u3001-debug\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30bf\u30c3\u30af\u30fb\u30c8\u30ec\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u3001\u3054\u8cfc\u5165\u5148\u306b\u9023\u7d61\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+Driver.StackOverflow = \u30b9\u30bf\u30c3\u30af\u30fb\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3067\u3059\u3002\u3055\u3089\u306b\u30ea\u30bd\u30fc\u30b9\u304c\u5fc5\u8981\u306a\u5927\u304d\u3044\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u308b\u304b\u3001XJC\u306b\u30d0\u30b0\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u3001-Xss JVM\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30bf\u30c3\u30af\u30fb\u30b5\u30a4\u30ba\u3092\u62e1\u5f35\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3067\u554f\u984c\u304c\u89e3\u6c7a\u3057\u306a\u3044\u5834\u5408\u306f\u3001-debug\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30bf\u30c3\u30af\u30fb\u30c8\u30ec\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u3001\u3054\u8cfc\u5165\u5148\u306b\u9023\u7d61\u3057\u3066\u304f\u3060\u3055\u3044\u3002
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u4e2d...
@@ -124,7 +123,7 @@
Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001Eclipse Implementation of JAXB\u3001v${version}\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttps://eclipse-ee4j.github.io/jaxb-ri\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n
+Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001Eclipse Implementation of JAXB\u3001v${version}\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttps://eclipse-ee4j.github.io/jaxb-ri\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0}
Driver.Version = xjc ${version}
@@ -169,7 +168,7 @@
Driver.NotAFileNorURL = "{0}"\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u3082URL\u3067\u3082\u3042\u308a\u307e\u305b\u3093
-FIELD_RENDERER_CONFLICT = "-{0}"\u3068"-{1}"\u306f\u4e21\u65b9\u3068\u3082\u30b3\u30fc\u30c9\u751f\u6210\u306b\u5f71\u97ff\u3059\u308b\u305f\u3081\u3001\u76f8\u4e92\u306b\u6392\u4ed6\u7684\u3067\u3059
+FIELD_RENDERER_CONFLICT = "-{0}"\u3068"-{1}"\u306f\u4e21\u65b9\u3068\u3082\u30b3\u30fc\u30c9\u751f\u6210\u306b\u5f71\u97ff\u3059\u308b\u305f\u3081\u3001\u76f8\u4e92\u306b\u6392\u4ed6\u7684\u3067\u3059
NAME_CONVERTER_CONFLICT = "-{0}"\u3068"-{1}"\u306f\u4e21\u65b9\u3068\u3082\u30b3\u30fc\u30c9\u751f\u6210\u306b\u5f71\u97ff\u3059\u308b\u305f\u3081\u3001\u76f8\u4e92\u306b\u6392\u4ed6\u7684\u3067\u3059
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_ko.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_ko.properties
index 3caf407..092f358 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_ko.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_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
@@ -27,7 +27,7 @@
\ \ dryrun : \uba54\ubaa8\ub9ac\uc758 \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub418 Java \uc18c\uc2a4\ub97c \uc0dd\uc131\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\
\ \ zip : -d \uc635\uc158\uc73c\ub85c \uc9c0\uc815\ub41c zip \ud30c\uc77c\uc5d0 Java \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\
\ \ sig : \uc0dd\uc131\ub41c \ucf54\ub4dc\uc758 \uc11c\uba85\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.\n\
-\ \ forest : \ubcc0\ud658\ub41c DOM \uc601\uc5ed\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.\n
+\ \ forest : \ubcc0\ud658\ub41c DOM \uc601\uc5ed\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.
Driver.Public.Usage = \uc0ac\uc6a9\ubc95: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
dir\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 \ud3ec\ud568\ub41c \ubaa8\ub4e0 \uc2a4\ud0a4\ub9c8 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\n\
@@ -59,8 +59,7 @@
\ \ -quiet : \ucef4\ud30c\uc77c\ub7ec \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\
\ \ -help : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
\ \ -version : \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
-\ \ -fullversion : \uc815\uc2dd \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
-
+\ \ -fullversion : \uc815\uc2dd \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.
Driver.AddonUsage = \n\ud655\uc7a5:
# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
@@ -116,7 +115,7 @@
Driver.ParseFailed = \uc2a4\ud0a4\ub9c8 \uad6c\ubb38 \ubd84\uc11d\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
-Driver.StackOverflow = \uc2a4\ud0dd \uc624\ubc84\ud50c\ub85c\uc6b0\uc785\ub2c8\ub2e4. \ub354 \ub9ce\uc740 \ub9ac\uc18c\uc2a4\uac00 \ud544\uc694\ud55c \ud070 \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\uace0 \uc788\uac70\ub098 XJC\uc5d0 \ubc84\uadf8\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uba3c\uc800 -Xss JVM \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc2a4\ud0dd \ud06c\uae30\ub97c \ub298\ub9ac\uc2ed\uc2dc\uc624. \uc774\ub97c \ud1b5\ud574 \ubb38\uc81c\uac00 \ud574\uacb0\ub418\uc9c0 \uc54a\uc73c\uba74 -debug \uc635\uc158\uc744 \ud1b5\ud574 \uc2a4\ud0dd \ucd94\uc801\uc744 \uc5bb\uc5b4 Sun\uc5d0 \ubb38\uc758\ud558\uc2ed\uc2dc\uc624.
+Driver.StackOverflow = \uc2a4\ud0dd \uc624\ubc84\ud50c\ub85c\uc6b0\uc785\ub2c8\ub2e4. \ub354 \ub9ce\uc740 \ub9ac\uc18c\uc2a4\uac00 \ud544\uc694\ud55c \ud070 \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\uace0 \uc788\uac70\ub098 XJC\uc5d0 \ubc84\uadf8\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uba3c\uc800 -Xss JVM \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc2a4\ud0dd \ud06c\uae30\ub97c \ub298\ub9ac\uc2ed\uc2dc\uc624. \uc774\ub97c \ud1b5\ud574 \ubb38\uc81c\uac00 \ud574\uacb0\ub418\uc9c0 \uc54a\uc73c\uba74 -debug \uc635\uc158\uc744 \ud1b5\ud574 \uc2a4\ud0dd \ucd94\uc801\uc744 \uc5bb\uc5b4 Sun\uc5d0 \ubb38\uc758\ud558\uc2ed\uc2dc\uc624.
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub294 \uc911...
@@ -124,7 +123,7 @@
Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB\uc758 Eclipse \uad6c\ud604\uc5d0 \uc758\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4 ${version} \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttps://eclipse-ee4j.github.io/jaxb-ri\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n
+Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB\uc758 Eclipse \uad6c\ud604\uc5d0 \uc758\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4 ${version} \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttps://eclipse-ee4j.github.io/jaxb-ri\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0}
Driver.Version = XJC ${version}
@@ -169,7 +168,7 @@
Driver.NotAFileNorURL = "{0}"\uc740(\ub294) \ud30c\uc77c \uc774\ub984 \ub610\ub294 URL\uc774 \uc544\ub2d9\ub2c8\ub2e4.
-FIELD_RENDERER_CONFLICT = "-{0}"\uacfc(\uc640) "-{1}"\uc740(\ub294) \ucf54\ub4dc \uc0dd\uc131\uc5d0 \uc601\ud5a5\uc744 \ub07c\uce58\ubbc0\ub85c \ud568\uaed8 \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
+FIELD_RENDERER_CONFLICT = "-{0}"\uacfc(\uc640) "-{1}"\uc740(\ub294) \ucf54\ub4dc \uc0dd\uc131\uc5d0 \uc601\ud5a5\uc744 \ub07c\uce58\ubbc0\ub85c \ud568\uaed8 \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
NAME_CONVERTER_CONFLICT = "-{0}"\uacfc(\uc640) "-{1}"\uc740(\ub294) \ucf54\ub4dc \uc0dd\uc131\uc5d0 \uc601\ud5a5\uc744 \ub07c\uce58\ubbc0\ub85c \ud568\uaed8 \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_pt_BR.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_pt_BR.properties
index 4f25fc8..c99f8de 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_pt_BR.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_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
@@ -27,7 +27,7 @@
\ \ dryrun : compilar o esquema na mem\u00f3ria, mas n\u00e3o gerar a origem Java\n\
\ \ zip : gerar c\u00f3digo de origem Java em um arquivo zip especificado pela op\u00e7\u00e3o -d\n\
\ \ sig : fazer dump das assinaturas do c\u00f3digo gerado\n\
-\ \ forest : fazer dump do DOM transformado\n
+\ \ forest : fazer dump do DOM transformado
Driver.Public.Usage = Uso: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
Se dir for especificado, todos os arquivos do esquema dele ser\u00e3o compilados.\n\
@@ -59,8 +59,7 @@
\ \ -quiet : suprime a sa\u00edda do compilador\n\
\ \ -help : exibe esta mensagem de ajuda\n\
\ \ -version : exibe informa\u00e7\u00f5es da vers\u00e3o\n\
-\ \ -fullversion : exibe informa\u00e7\u00f5es da vers\u00e3o completa\n\
-
+\ \ -fullversion : exibe informa\u00e7\u00f5es da vers\u00e3o completa
Driver.AddonUsage = \nExtens\u00f5es:
# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
@@ -116,7 +115,7 @@
Driver.ParseFailed = Falha ao fazer parse de um esquema.
-Driver.StackOverflow = Sobrecarga de pilha. Voc\u00ea est\u00e1 compilando um esquema maior que exige mais recursos ou o XJC tem um erro. Primeiro, aumente o tamanho da pilha usando a op\u00e7\u00e3o -Xss da JVM. Se isso n\u00e3o resolver o problema, use a op\u00e7\u00e3o -debug para obter o rastreamento da pilha e contate a Sun.
+Driver.StackOverflow = Sobrecarga de pilha. Voc\u00ea est\u00e1 compilando um esquema maior que exige mais recursos ou o XJC tem um erro. Primeiro, aumente o tamanho da pilha usando a op\u00e7\u00e3o -Xss da JVM. Se isso n\u00e3o resolver o problema, use a op\u00e7\u00e3o -debug para obter o rastreamento da pilha e contate a Sun.
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = compilando um esquema...
@@ -124,7 +123,7 @@
Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo.
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = Este arquivo foi gerado pela Eclipse Implementation of JAXB, v${version} \nConsulte https://eclipse-ee4j.github.io/jaxb-ri \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n
+Driver.FilePrologComment = Este arquivo foi gerado pela Eclipse Implementation of JAXB, v${version} \nConsulte https://eclipse-ee4j.github.io/jaxb-ri \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0}
Driver.Version = xjc ${version}
@@ -169,7 +168,7 @@
Driver.NotAFileNorURL = "{0}" n\u00e3o \u00e9 um nome de arquivo, nem um URL
-FIELD_RENDERER_CONFLICT = "-{0}" e "-{1}" s\u00e3o mutuamente exclusivos, pois afetam a gera\u00e7\u00e3o do c\u00f3digo
+FIELD_RENDERER_CONFLICT = "-{0}" e "-{1}" s\u00e3o mutuamente exclusivos, pois afetam a gera\u00e7\u00e3o do c\u00f3digo
NAME_CONVERTER_CONFLICT = "-{0}" e "-{1}" s\u00e3o mutuamente exclusivos, pois afetam a gera\u00e7\u00e3o do c\u00f3digo
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 926a3b3..761c1df 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
@@ -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
@@ -27,7 +27,7 @@
\ \ dryrun : \u5728\u5185\u5b58\u4e2d\u7f16\u8bd1\u6a21\u5f0f, \u4f46\u4e0d\u751f\u6210 Java \u6e90\u4ee3\u7801\n\
\ \ zip : \u751f\u6210 Java \u6e90\u4ee3\u7801\u5e76\u653e\u5165\u7531 -d \u9009\u9879\u6307\u5b9a\u7684 Zip \u6587\u4ef6\n\
\ \ sig : \u8f6c\u50a8\u6240\u751f\u6210\u4ee3\u7801\u7684\u7b7e\u540d\n\
-\ \ forest : \u8f6c\u50a8\u8f6c\u6362\u7684 DOM \u76ee\u5f55\u6797\n
+\ \ forest : \u8f6c\u50a8\u8f6c\u6362\u7684 DOM \u76ee\u5f55\u6797
Driver.AddonUsage = \n\u6269\u5c55:
@@ -61,8 +61,7 @@
\ \ -quiet : \u9690\u85cf\u7f16\u8bd1\u5668\u8f93\u51fa\n\
\ \ -help : \u663e\u793a\u6b64\u5e2e\u52a9\u6d88\u606f\n\
\ \ -version : \u663e\u793a\u7248\u672c\u4fe1\u606f\n\
-\ \ -fullversion : \u663e\u793a\u5b8c\u6574\u7684\u7248\u672c\u4fe1\u606f\n\
-
+\ \ -fullversion : \u663e\u793a\u5b8c\u6574\u7684\u7248\u672c\u4fe1\u606f
Driver.AddonUsage = \n\
\u6269\u5c55:
@@ -127,7 +126,7 @@
Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 Eclipse Implementation of JAXB v${version} \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee https://eclipse-ee4j.github.io/jaxb-ri \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n
+Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 Eclipse Implementation of JAXB v${version} \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee https://eclipse-ee4j.github.io/jaxb-ri \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0}
Driver.Version = xjc ${version}
@@ -172,7 +171,7 @@
Driver.NotAFileNorURL = "{0}" \u65e2\u4e0d\u662f\u6587\u4ef6\u540d\u4e5f\u4e0d\u662f URL
-FIELD_RENDERER_CONFLICT = \u7531\u4e8e "-{0}" \u548c "-{1}" \u90fd\u4f1a\u5f71\u54cd\u4ee3\u7801\u751f\u6210, \u56e0\u6b64\u5b83\u4eec\u662f\u4e92\u76f8\u6392\u65a5\u7684
+FIELD_RENDERER_CONFLICT = \u7531\u4e8e "-{0}" \u548c "-{1}" \u90fd\u4f1a\u5f71\u54cd\u4ee3\u7801\u751f\u6210, \u56e0\u6b64\u5b83\u4eec\u662f\u4e92\u76f8\u6392\u65a5\u7684
NAME_CONVERTER_CONFLICT = \u7531\u4e8e "-{0}" \u548c "-{1}" \u90fd\u4f1a\u5f71\u54cd\u4ee3\u7801\u751f\u6210, \u56e0\u6b64\u5b83\u4eec\u662f\u4e92\u76f8\u6392\u65a5\u7684
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_zh_TW.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_zh_TW.properties
index d60cdea..7d9043f 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_zh_TW.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/MessageBundle_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
@@ -27,7 +27,7 @@
\ \ dryrun : \u5728\u8a18\u61b6\u9ad4\u4e2d\u7de8\u8b6f\u7db1\u8981, \u4f46\u4e0d\u7522\u751f Java \u4f86\u6e90\n\
\ \ zip : \u5c07 Java \u4f86\u6e90\u7a0b\u5f0f\u78bc\u8f49\u63db\u70ba -d \u9078\u9805\u6307\u5b9a\u7684 zip \u6a94\u6848\n\
\ \ sig : \u50be\u5370\u7522\u751f\u4e4b\u7a0b\u5f0f\u78bc\u7684\u7c3d\u7ae0\n\
-\ \ forest : \u50be\u5370\u8f49\u63db\u7684 DOM \u6a39\u7cfb\n
+\ \ forest : \u50be\u5370\u8f49\u63db\u7684 DOM \u6a39\u7cfb
Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
\u82e5\u6307\u5b9a dir, \u5c07\u7de8\u8b6f\u5176\u4e2d\u7684\u6240\u6709\u7db1\u8981\u6a94\u6848.\n\
@@ -59,8 +59,7 @@
\ \ -quiet : \u6291\u5236\u7de8\u8b6f\u5668\u8f38\u51fa\n\
\ \ -help : \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\
\ \ -version : \u986f\u793a\u7248\u672c\u8cc7\u8a0a\n\
-\ \ -fullversion : \u986f\u793a\u5b8c\u6574\u7248\u672c\u8cc7\u8a0a\n\
-
+\ \ -fullversion : \u986f\u793a\u5b8c\u6574\u7248\u672c\u8cc7\u8a0a
Driver.AddonUsage = \n\u64f4\u5145\u5957\u4ef6:
# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
@@ -116,7 +115,7 @@
Driver.ParseFailed = \u7121\u6cd5\u5256\u6790\u7db1\u8981.
-Driver.StackOverflow = \u5806\u758a\u6ea2\u4f4d. \u53ef\u80fd\u662f\u60a8\u6b63\u5728\u7de8\u8b6f\u7684\u5927\u578b\u7db1\u8981\u9700\u8981\u66f4\u591a\u8cc7\u6e90, \u6216\u662f XJC \u6709\u932f\u8aa4. \u9996\u5148, \u8acb\u4f7f\u7528 -Xss JVM \u9078\u9805\u64f4\u5145\u5806\u758a\u5927\u5c0f. \u82e5\u9019\u6a23\u7121\u6cd5\u89e3\u6c7a\u554f\u984c, \u8acb\u4f7f\u7528 -debug \u9078\u9805\u4ee5\u53d6\u5f97\u5806\u758a\u8ffd\u8e64, \u4e26\u8207 Sun \u9023\u7d61.
+Driver.StackOverflow = \u5806\u758a\u6ea2\u4f4d. \u53ef\u80fd\u662f\u60a8\u6b63\u5728\u7de8\u8b6f\u7684\u5927\u578b\u7db1\u8981\u9700\u8981\u66f4\u591a\u8cc7\u6e90, \u6216\u662f XJC \u6709\u932f\u8aa4. \u9996\u5148, \u8acb\u4f7f\u7528 -Xss JVM \u9078\u9805\u64f4\u5145\u5806\u758a\u5927\u5c0f. \u82e5\u9019\u6a23\u7121\u6cd5\u89e3\u6c7a\u554f\u984c, \u8acb\u4f7f\u7528 -debug \u9078\u9805\u4ee5\u53d6\u5f97\u5806\u758a\u8ffd\u8e64, \u4e26\u8207 Sun \u9023\u7d61.
# Not concatenated with any other string (written on a separate line).
Driver.CompilingSchema = \u6b63\u5728\u7de8\u8b6f\u7db1\u8981...
@@ -124,7 +123,7 @@
Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc.
# DO NOT localize the ${version} string - it is a token for an mvn <properties filter>
-Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 Eclipse Implementation of JAXB, v${version} \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 https://eclipse-ee4j.github.io/jaxb-ri \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n
+Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 Eclipse Implementation of JAXB, v${version} \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 https://eclipse-ee4j.github.io/jaxb-ri \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0}
Driver.Version = xjc ${version}
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle.properties
index f1b06d2..d4c2763 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle.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
@@ -31,4 +31,4 @@
Two declarations cause a collision in the ObjectFactory class.
OBJECT_FACTORY_CONFLICT_RELATED = \
- (Related to above error) This is the other declaration.
+ (Related to above error) This is the other declaration.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_de.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_de.properties
index b9c57c1..7497182 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_de.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_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
@@ -22,4 +22,4 @@
OBJECT_FACTORY_CONFLICT = Zwei Deklarationen verursachen eine Kollision in der ObjectFactory-Klasse.
-OBJECT_FACTORY_CONFLICT_RELATED = Dies ist die andere Deklaration.
+OBJECT_FACTORY_CONFLICT_RELATED = Dies ist die andere Deklaration.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_es.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_es.properties
index 951059f..34a6bc0 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_es.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_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
@@ -22,4 +22,4 @@
OBJECT_FACTORY_CONFLICT = Dos declaraciones producen una colisi\u00f3n en la clase ObjectFactory.
-OBJECT_FACTORY_CONFLICT_RELATED = (Relacionado con el error anterior) \u00c9sta es la otra declaraci\u00f3n.
+OBJECT_FACTORY_CONFLICT_RELATED = (Relacionado con el error anterior) \u00c9sta es la otra declaraci\u00f3n.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_fr.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_fr.properties
index b3b94bb..f8fb1dd 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_fr.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_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
@@ -22,4 +22,4 @@
OBJECT_FACTORY_CONFLICT = Deux d\u00e9clarations entra\u00eenent une collision dans la classe ObjectFactory.
-OBJECT_FACTORY_CONFLICT_RELATED = (voir erreur ci-dessus) Il s'agit de l'autre d\u00e9claration.
+OBJECT_FACTORY_CONFLICT_RELATED = (voir erreur ci-dessus) Il s'agit de l'autre d\u00e9claration.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_it.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_it.properties
index 7f2c3bc..700a247 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_it.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_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
@@ -22,4 +22,4 @@
OBJECT_FACTORY_CONFLICT = Due dichiarazioni causano un conflitto nella classe ObjectFactory.
-OBJECT_FACTORY_CONFLICT_RELATED = (Relativo all'errore riportato sopra) Questa \u00e8 l'altra dichiarazione.
+OBJECT_FACTORY_CONFLICT_RELATED = (Relativo all'errore riportato sopra) Questa \u00e8 l'altra dichiarazione.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_ja.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_ja.properties
index 42abd77..2529f02 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_ja.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_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
@@ -22,4 +22,4 @@
OBJECT_FACTORY_CONFLICT = 2\u3064\u306e\u5ba3\u8a00\u306b\u3088\u308a\u3001ObjectFactory\u30af\u30e9\u30b9\u3067\u885d\u7a81\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
-OBJECT_FACTORY_CONFLICT_RELATED = (\u524d\u8ff0\u306e\u30a8\u30e9\u30fc\u306b\u95a2\u9023\u3057\u3066)\u3053\u308c\u306f\u4ed6\u65b9\u306e\u5ba3\u8a00\u3067\u3059\u3002
+OBJECT_FACTORY_CONFLICT_RELATED = (\u524d\u8ff0\u306e\u30a8\u30e9\u30fc\u306b\u95a2\u9023\u3057\u3066)\u3053\u308c\u306f\u4ed6\u65b9\u306e\u5ba3\u8a00\u3067\u3059\u3002
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_ko.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_ko.properties
index 41d80ba..29125e5 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_ko.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_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
@@ -22,4 +22,4 @@
OBJECT_FACTORY_CONFLICT = \ub450 \uac1c\uc758 \uc120\uc5b8\uc73c\ub85c \uc778\ud574 ObjectFactory \ud074\ub798\uc2a4\uc5d0 \ucda9\ub3cc\uc774 \ubc1c\uc0dd\ud569\ub2c8\ub2e4.
-OBJECT_FACTORY_CONFLICT_RELATED = (\uc704 \uc624\ub958\uc640 \uad00\ub828\ub428) \ub2e4\ub978 \uc120\uc5b8\uc785\ub2c8\ub2e4.
+OBJECT_FACTORY_CONFLICT_RELATED = (\uc704 \uc624\ub958\uc640 \uad00\ub828\ub428) \ub2e4\ub978 \uc120\uc5b8\uc785\ub2c8\ub2e4.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_pt_BR.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_pt_BR.properties
index 1b67e90..c8d267c 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_pt_BR.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_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
@@ -22,4 +22,4 @@
OBJECT_FACTORY_CONFLICT = Duas declara\u00e7\u00f5es causam uma colis\u00e3o na classe ObjectFactory.
-OBJECT_FACTORY_CONFLICT_RELATED = (Relacionada ao erro acima). Esta \u00e9 a outra declara\u00e7\u00e3o.
+OBJECT_FACTORY_CONFLICT_RELATED = (Relacionada ao erro acima). Esta \u00e9 a outra declara\u00e7\u00e3o.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_zh_TW.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_zh_TW.properties
index eb642e6..bf147e1 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_zh_TW.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle_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
@@ -22,4 +22,4 @@
OBJECT_FACTORY_CONFLICT = \u5169\u500b\u5ba3\u544a\u5c0e\u81f4 ObjectFactory \u985e\u5225\u767c\u751f\u885d\u7a81.
-OBJECT_FACTORY_CONFLICT_RELATED = (\u8207\u4e0a\u8ff0\u932f\u8aa4\u6709\u95dc) \u6b64\u70ba\u53e6\u4e00\u500b\u5ba3\u544a.
+OBJECT_FACTORY_CONFLICT_RELATED = (\u8207\u4e0a\u8ff0\u932f\u8aa4\u6709\u95dc) \u6b64\u70ba\u53e6\u4e00\u500b\u5ba3\u544a.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle.properties
index dea0988..1908a25 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle.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
@@ -96,7 +96,7 @@
{0}\n\
<p>\n\
To get rid of this property, apply a property customization to one \n\
- of both of the following declarations to change their names: \n
+ of both of the following declarations to change their names:
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_de.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_de.properties
index 69968d9..eb22276 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_de.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_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
@@ -64,7 +64,7 @@
DefaultParticleBinder.UnableToGenerateNameFromModelGroup = Ein Eigenschaftsname kann nicht aus einer Modellgruppe generiert werden. Eine Anpassung ist erforderlich.
# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Ruft das restliche Contentmodell ab. \n\n<p>\nSie rufen diese "catch-all"-Eigenschaft aus folgendem Grund ab: \n{0}\n<p>\nUm diese Eigenschaft zu entfernen, wenden Sie eine Eigenschaftenanpassung f\u00fcr eine\nder beiden folgenden Deklarationen an, um deren Namen zu \u00e4ndern: \n
+DefaultParticleBinder.FallbackJavadoc = Ruft das restliche Contentmodell ab. \n\n<p>\nSie rufen diese "catch-all"-Eigenschaft aus folgendem Grund ab: \n{0}\n<p>\nUm diese Eigenschaft zu entfernen, wenden Sie eine Eigenschaftenanpassung f\u00fcr eine\nder beiden folgenden Deklarationen an, um deren Namen zu \u00e4ndern:
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_es.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_es.properties
index d02d78f..d963d98 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_es.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_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
@@ -64,7 +64,7 @@
DefaultParticleBinder.UnableToGenerateNameFromModelGroup = No se ha podido generar un nombre de propiedad a partir de un grupo de modelos. Se necesita una personalizaci\u00f3n.
# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Obtiene el resto del modelo de contenido. \n\n<p>\nHa obtenido esta propiedad que permite capturar todo por el siguiente motivo: \n{0}\n<p>\nPara deshacerse de esta propiedad, aplique una personalizaci\u00f3n de propiedad a una\nde las dos declaraciones siguientes para cambiarles de nombre: \n
+DefaultParticleBinder.FallbackJavadoc = Obtiene el resto del modelo de contenido. \n\n<p>\nHa obtenido esta propiedad que permite capturar todo por el siguiente motivo: \n{0}\n<p>\nPara deshacerse de esta propiedad, aplique una personalizaci\u00f3n de propiedad a una\nde las dos declaraciones siguientes para cambiarles de nombre:
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_fr.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_fr.properties
index 02c8c17..1e1e816 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_fr.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_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
@@ -64,7 +64,7 @@
DefaultParticleBinder.UnableToGenerateNameFromModelGroup = Impossible de g\u00e9n\u00e9rer un nom de propri\u00e9t\u00e9 \u00e0 partir d'un groupe de mod\u00e8les. Une personnalisation est obligatoire.
# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Obtient le reste du mod\u00e8le de contenu. \n\n<p>\nVous obtenez la propri\u00e9t\u00e9 "catch-all" pour la raison suivante : \n{0}\n<p>\nPour vous d\u00e9barrasser de cette propri\u00e9t\u00e9, appliquez une personnalisation de propri\u00e9t\u00e9 \u00e0 l''une \ndes deux d\u00e9clarations suivantes afin de modifier leurs noms : \n
+DefaultParticleBinder.FallbackJavadoc = Obtient le reste du mod\u00e8le de contenu. \n\n<p>\nVous obtenez la propri\u00e9t\u00e9 "catch-all" pour la raison suivante : \n{0}\n<p>\nPour vous d\u00e9barrasser de cette propri\u00e9t\u00e9, appliquez une personnalisation de propri\u00e9t\u00e9 \u00e0 l''une \ndes deux d\u00e9clarations suivantes afin de modifier leurs noms :
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_it.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_it.properties
index bf6d190..abf91d4 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_it.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_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
@@ -64,7 +64,7 @@
DefaultParticleBinder.UnableToGenerateNameFromModelGroup = Impossibile generare un nome di propriet\u00e0 da un gruppo di modelli. \u00c8 richiesta una personalizzazione.
# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Recupera il resto del modello di contenuto. \n\n<p>\nQuesta propriet\u00e0 "catch-all" viene recuperata per il seguente motivo: \n{0}\n<p>\nPer eliminare questa propriet\u00e0, applicare una personalizzazione della propriet\u00e0 a una \ndelle seguenti due dichiarazioni per modificarne il nome: \n
+DefaultParticleBinder.FallbackJavadoc = Recupera il resto del modello di contenuto. \n\n<p>\nQuesta propriet\u00e0 "catch-all" viene recuperata per il seguente motivo: \n{0}\n<p>\nPer eliminare questa propriet\u00e0, applicare una personalizzazione della propriet\u00e0 a una \ndelle seguenti due dichiarazioni per modificarne il nome:
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ja.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ja.properties
index b1bfa54..d539db5 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ja.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_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
@@ -64,7 +64,7 @@
DefaultParticleBinder.UnableToGenerateNameFromModelGroup = \u30e2\u30c7\u30eb\u30fb\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3092\u751f\u6210\u3067\u304d\u307e\u305b\u3093\u3002\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u304c\u5fc5\u8981\u3067\u3059\u3002
# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = \u6b8b\u308a\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30e2\u30c7\u30eb\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\n<p>\n\u6b21\u306e\u7406\u7531\u3067\u3053\u306e"catch-all"\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002\n{0}\n<p>\n\u3053\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u524a\u9664\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u4e21\u65b9\u306e\u5ba3\u8a00\u306e1\u3064\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u30fb\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3092\u9069\u7528\u3057\u3066\u3001\n\u540d\u524d\u3092\u5909\u66f4\u3057\u307e\u3059\u3002\n
+DefaultParticleBinder.FallbackJavadoc = \u6b8b\u308a\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30e2\u30c7\u30eb\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\n<p>\n\u6b21\u306e\u7406\u7531\u3067\u3053\u306e"catch-all"\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002\n{0}\n<p>\n\u3053\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u524a\u9664\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u4e21\u65b9\u306e\u5ba3\u8a00\u306e1\u3064\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u30fb\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3092\u9069\u7528\u3057\u3066\u3001\n\u540d\u524d\u3092\u5909\u66f4\u3057\u307e\u3059\u3002
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ko.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ko.properties
index 59e43e7..8b92ef1 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ko.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_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
@@ -64,7 +64,7 @@
DefaultParticleBinder.UnableToGenerateNameFromModelGroup = \ubaa8\ub378 \uadf8\ub8f9\uc5d0\uc11c \uc18d\uc131 \uc774\ub984\uc744 \uc0dd\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 \uc815\uc758\uac00 \ud544\uc694\ud569\ub2c8\ub2e4.
# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = \ub098\uba38\uc9c0 \ucf58\ud150\uce20 \ubaa8\ub378\uc744 \uac00\uc838\uc635\ub2c8\ub2e4. \n\n<p>\n\ub2e4\uc74c \uc6d0\uc778\uc73c\ub85c \uc778\ud574 \uc774 "catch-all" \uc18d\uc131\uc744 \uac00\uc838\uc624\uace0 \uc788\uc2b5\ub2c8\ub2e4.\n{0}\n<p>\n\uc774 \uc18d\uc131\uc744 \uc81c\uac70\ud558\ub824\uba74 \ub2e4\uc74c \uc120\uc5b8 \uc911 \ud558\ub098\uc5d0 \n\uc18d\uc131 \uc0ac\uc6a9\uc790 \uc815\uc758\ub97c \uc801\uc6a9\ud558\uc5ec \uc774\ub984\uc744 \ubcc0\uacbd\ud558\uc2ed\uc2dc\uc624. \n
+DefaultParticleBinder.FallbackJavadoc = \ub098\uba38\uc9c0 \ucf58\ud150\uce20 \ubaa8\ub378\uc744 \uac00\uc838\uc635\ub2c8\ub2e4. \n\n<p>\n\ub2e4\uc74c \uc6d0\uc778\uc73c\ub85c \uc778\ud574 \uc774 "catch-all" \uc18d\uc131\uc744 \uac00\uc838\uc624\uace0 \uc788\uc2b5\ub2c8\ub2e4.\n{0}\n<p>\n\uc774 \uc18d\uc131\uc744 \uc81c\uac70\ud558\ub824\uba74 \ub2e4\uc74c \uc120\uc5b8 \uc911 \ud558\ub098\uc5d0 \n\uc18d\uc131 \uc0ac\uc6a9\uc790 \uc815\uc758\ub97c \uc801\uc6a9\ud558\uc5ec \uc774\ub984\uc744 \ubcc0\uacbd\ud558\uc2ed\uc2dc\uc624.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_pt_BR.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_pt_BR.properties
index feff4a5..69665f1 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_pt_BR.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_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
@@ -64,7 +64,7 @@
DefaultParticleBinder.UnableToGenerateNameFromModelGroup = N\u00e3o \u00e9 poss\u00edvel gerar um nome de propriedade de um grupo de modelos. Uma personaliza\u00e7\u00e3o \u00e9 necess\u00e1ria.
# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Obt\u00e9m o restante do modelo do conte\u00fado. \n\n<p>\nVoc\u00ea est\u00e1 obtendo esta propriedade "catch-all" pelo seguinte motivo: \n{0}\n<p>\nPara eliminar esta propriedade, aplique uma personaliza\u00e7\u00e3o de propriedade a uma \ndas seguintes declara\u00e7\u00f5es, a fim de alterar seus nomes: \n
+DefaultParticleBinder.FallbackJavadoc = Obt\u00e9m o restante do modelo do conte\u00fado. \n\n<p>\nVoc\u00ea est\u00e1 obtendo esta propriedade "catch-all" pelo seguinte motivo: \n{0}\n<p>\nPara eliminar esta propriedade, aplique uma personaliza\u00e7\u00e3o de propriedade a uma \ndas seguintes declara\u00e7\u00f5es, a fim de alterar seus nomes:
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle.properties
index cb12170..2b45501 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle.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
@@ -23,7 +23,7 @@
Unable to check the correctness of the schema due to OutOfMemoryError. \
This typically happens when your schema contains constructs like maxOccurs="999". \
In the future compilation, add the '-nv' option to skip the correctness check \
- for faster compilation.
+ for faster compilation.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_de.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_de.properties
index 12d2a55..2035806 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_de.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_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
@@ -18,7 +18,7 @@
CustomizationContextChecker.UnacknolwedgedCustomization = Angegebene {0}-Anpassung wird nicht verwendet.
-SchemaConstraintChecker.UnableToCheckCorrectness = Die Richtigkeit des Schemas kann wegen OutOfMemoryError nicht gepr\u00fcft werden. Dies geschieht im Allgemeinen, wenn Ihr Schema Konstrukte enth\u00e4lt wie maxOccurs="999". F\u00fcgen Sie bei der zuk\u00fcnftigen Kompilierung die Option '-nv' hinzu, um die Pr\u00fcfung auf Richtigkeit zu \u00fcberspringen, damit die Kompilierung beschleunigt wird.
+SchemaConstraintChecker.UnableToCheckCorrectness = Die Richtigkeit des Schemas kann wegen OutOfMemoryError nicht gepr\u00fcft werden. Dies geschieht im Allgemeinen, wenn Ihr Schema Konstrukte enth\u00e4lt wie maxOccurs="999". F\u00fcgen Sie bei der zuk\u00fcnftigen Kompilierung die Option '-nv' hinzu, um die Pr\u00fcfung auf Richtigkeit zu \u00fcberspringen, damit die Kompilierung beschleunigt wird.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_es.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_es.properties
index 409d99e..a4f676c 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_es.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_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
@@ -18,7 +18,7 @@
CustomizationContextChecker.UnacknolwedgedCustomization = La personalizaci\u00f3n de {0} especificada no se utiliza.
-SchemaConstraintChecker.UnableToCheckCorrectness = No se ha podido comprobar si el esquema es correcto debido al error OutOfMemoryError. Normalmente, esto ocurre cuando el esquema contiene construcciones como maxOccurs="999". En la compilaci\u00f3n futura, agregue la opci\u00f3n '-nv' para omitir esta comprobaci\u00f3n para que la compilaci\u00f3n sea m\u00e1s r\u00e1pida.
+SchemaConstraintChecker.UnableToCheckCorrectness = No se ha podido comprobar si el esquema es correcto debido al error OutOfMemoryError. Normalmente, esto ocurre cuando el esquema contiene construcciones como maxOccurs="999". En la compilaci\u00f3n futura, agregue la opci\u00f3n '-nv' para omitir esta comprobaci\u00f3n para que la compilaci\u00f3n sea m\u00e1s r\u00e1pida.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_fr.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_fr.properties
index 17e82a7..29dccdd 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_fr.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_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
@@ -18,7 +18,7 @@
CustomizationContextChecker.UnacknolwedgedCustomization = La personnalisation {0} indiqu\u00e9e n''est pas utilis\u00e9e.
-SchemaConstraintChecker.UnableToCheckCorrectness = Impossible de v\u00e9rifier l'exactitude du sch\u00e9ma en raison d'une erreur OutOfMemoryError. Cela se produit g\u00e9n\u00e9ralement lorsque le sch\u00e9ma contient des structures telles que maxOccurs = "999". Dans la future compilation, ajoutez l'option '-nv' pour ne pas tenir compte de la v\u00e9rification d'exactitude pour une compilation plus rapide.
+SchemaConstraintChecker.UnableToCheckCorrectness = Impossible de v\u00e9rifier l'exactitude du sch\u00e9ma en raison d'une erreur OutOfMemoryError. Cela se produit g\u00e9n\u00e9ralement lorsque le sch\u00e9ma contient des structures telles que maxOccurs = "999". Dans la future compilation, ajoutez l'option '-nv' pour ne pas tenir compte de la v\u00e9rification d'exactitude pour une compilation plus rapide.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_it.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_it.properties
index 34c5ab4..86ab8fa 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_it.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_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
@@ -18,7 +18,7 @@
CustomizationContextChecker.UnacknolwedgedCustomization = La personalizzazione specificata {0} non viene usata.
-SchemaConstraintChecker.UnableToCheckCorrectness = Impossibile controllare la correttezza dello schema a causa di OutOfMemoryError. In genere ci\u00f2 si verifica quando lo schema contiene costrutti come maxOccurs="999". Per le compilazioni future, aggiungere l'opzione '-nv' per ignorare il controllo di correttezza per una compilazione pi\u00f9 rapida.
+SchemaConstraintChecker.UnableToCheckCorrectness = Impossibile controllare la correttezza dello schema a causa di OutOfMemoryError. In genere ci\u00f2 si verifica quando lo schema contiene costrutti come maxOccurs="999". Per le compilazioni future, aggiungere l'opzione '-nv' per ignorare il controllo di correttezza per una compilazione pi\u00f9 rapida.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_ja.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_ja.properties
index 9348d59..0c0b3d4 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_ja.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_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
@@ -18,7 +18,7 @@
CustomizationContextChecker.UnacknolwedgedCustomization = \u6307\u5b9a\u3057\u305f{0}\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306f\u4f7f\u7528\u3055\u308c\u307e\u305b\u3093\u3002
-SchemaConstraintChecker.UnableToCheckCorrectness = OutOfMemoryError\u306b\u3088\u308a\u3001\u30b9\u30ad\u30fc\u30de\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u901a\u5e38\u3001\u30b9\u30ad\u30fc\u30de\u306bmaxOccurs="999"\u306e\u3088\u3046\u306a\u69cb\u9020\u4f53\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u306b\u767a\u751f\u3057\u307e\u3059\u3002\u5c06\u6765\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u306f\u3001'-nv'\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u9ad8\u901f\u306b\u3059\u308b\u305f\u3081\u306b\u6b63\u78ba\u3055\u306e\u78ba\u8a8d\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002
+SchemaConstraintChecker.UnableToCheckCorrectness = OutOfMemoryError\u306b\u3088\u308a\u3001\u30b9\u30ad\u30fc\u30de\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u901a\u5e38\u3001\u30b9\u30ad\u30fc\u30de\u306bmaxOccurs="999"\u306e\u3088\u3046\u306a\u69cb\u9020\u4f53\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u306b\u767a\u751f\u3057\u307e\u3059\u3002\u5c06\u6765\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u306f\u3001'-nv'\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u9ad8\u901f\u306b\u3059\u308b\u305f\u3081\u306b\u6b63\u78ba\u3055\u306e\u78ba\u8a8d\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_ko.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_ko.properties
index 204ab95..91b1930 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_ko.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_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
@@ -18,7 +18,7 @@
CustomizationContextChecker.UnacknolwedgedCustomization = \uc9c0\uc815\ub41c {0} \uc0ac\uc6a9\uc790 \uc815\uc758\uac00 \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-SchemaConstraintChecker.UnableToCheckCorrectness = OutOfMemoryError\ub85c \uc778\ud574 \uc2a4\ud0a4\ub9c8\uac00 \uc815\ud655\ud55c\uc9c0 \ud655\uc778\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc77c\ubc18\uc801\uc73c\ub85c \uc774 \uc624\ub958\ub294 \uc2a4\ud0a4\ub9c8\uc5d0 maxOccurs="999"\uc640 \uac19\uc740 \uad6c\ubb38\uc774 \ud3ec\ud568\ub41c \uacbd\uc6b0 \ubc1c\uc0dd\ud569\ub2c8\ub2e4. \uc774\ud6c4 \ucef4\ud30c\uc77c\uc5d0\uc11c \ucef4\ud30c\uc77c\uc744 \ub354 \ube60\ub974\uac8c \uc218\ud589\ud558\ub824\uba74 '-nv' \uc635\uc158\uc744 \ucd94\uac00\ud558\uc5ec \uc815\ud655\uc131 \uac80\uc0ac\ub97c \uac74\ub108 \ub6f0\uc2ed\uc2dc\uc624.
+SchemaConstraintChecker.UnableToCheckCorrectness = OutOfMemoryError\ub85c \uc778\ud574 \uc2a4\ud0a4\ub9c8\uac00 \uc815\ud655\ud55c\uc9c0 \ud655\uc778\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc77c\ubc18\uc801\uc73c\ub85c \uc774 \uc624\ub958\ub294 \uc2a4\ud0a4\ub9c8\uc5d0 maxOccurs="999"\uc640 \uac19\uc740 \uad6c\ubb38\uc774 \ud3ec\ud568\ub41c \uacbd\uc6b0 \ubc1c\uc0dd\ud569\ub2c8\ub2e4. \uc774\ud6c4 \ucef4\ud30c\uc77c\uc5d0\uc11c \ucef4\ud30c\uc77c\uc744 \ub354 \ube60\ub974\uac8c \uc218\ud589\ud558\ub824\uba74 '-nv' \uc635\uc158\uc744 \ucd94\uac00\ud558\uc5ec \uc815\ud655\uc131 \uac80\uc0ac\ub97c \uac74\ub108 \ub6f0\uc2ed\uc2dc\uc624.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_pt_BR.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_pt_BR.properties
index 41ee5e4..030a0af 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_pt_BR.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_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
@@ -18,7 +18,7 @@
CustomizationContextChecker.UnacknolwedgedCustomization = Personaliza\u00e7\u00e3o {0} especificada n\u00e3o usada.
-SchemaConstraintChecker.UnableToCheckCorrectness = N\u00e3o \u00e9 poss\u00edvel verificar a corre\u00e7\u00e3o do esquema em decorr\u00eancia de OutOfMemoryError. Geralmente isso ocorre quando seu esquema cont\u00e9m constru\u00e7\u00f5es como maxOccurs="999". Na pr\u00f3xima compila\u00e7\u00e3o, adicione a op\u00e7\u00e3o '-nv' para ignorar a verifica\u00e7\u00e3o de corre\u00e7\u00e3o e obter compila\u00e7\u00e3o mais r\u00e1pida.
+SchemaConstraintChecker.UnableToCheckCorrectness = N\u00e3o \u00e9 poss\u00edvel verificar a corre\u00e7\u00e3o do esquema em decorr\u00eancia de OutOfMemoryError. Geralmente isso ocorre quando seu esquema cont\u00e9m constru\u00e7\u00f5es como maxOccurs="999". Na pr\u00f3xima compila\u00e7\u00e3o, adicione a op\u00e7\u00e3o '-nv' para ignorar a verifica\u00e7\u00e3o de corre\u00e7\u00e3o e obter compila\u00e7\u00e3o mais r\u00e1pida.
diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_zh_TW.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_zh_TW.properties
index 91c4383..1be094a 100644
--- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_zh_TW.properties
+++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/parser/MessageBundle_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
@@ -18,7 +18,7 @@
CustomizationContextChecker.UnacknolwedgedCustomization = \u672a\u4f7f\u7528\u6307\u5b9a\u7684 {0} \u81ea\u8a02\u9805\u76ee.
-SchemaConstraintChecker.UnableToCheckCorrectness = \u56e0\u70ba OutOfMemoryError, \u7121\u6cd5\u6aa2\u67e5\u7db1\u8981\u7684\u6b63\u78ba\u6027. \u7576\u60a8\u7684\u7db1\u8981\u5305\u542b\u50cf\u662f maxOccurs="999" \u7684\u5efa\u69cb\u9805\u76ee\u6642, \u901a\u5e38\u5c31\u6703\u767c\u751f\u6b64\u554f\u984c. \u5728\u5f80\u5f8c\u7684\u7de8\u8b6f\u4e2d, \u65b0\u589e '-nv' \u9078\u9805\u53ef\u7565\u904e\u6b63\u78ba\u6027\u6aa2\u67e5\u4ee5\u52a0\u5feb\u7de8\u8b6f\u901f\u5ea6.
+SchemaConstraintChecker.UnableToCheckCorrectness = \u56e0\u70ba OutOfMemoryError, \u7121\u6cd5\u6aa2\u67e5\u7db1\u8981\u7684\u6b63\u78ba\u6027. \u7576\u60a8\u7684\u7db1\u8981\u5305\u542b\u50cf\u662f maxOccurs="999" \u7684\u5efa\u69cb\u9805\u76ee\u6642, \u901a\u5e38\u5c31\u6703\u767c\u751f\u6b64\u554f\u984c. \u5728\u5f80\u5f8c\u7684\u7de8\u8b6f\u4e2d, \u65b0\u589e '-nv' \u9078\u9805\u53ef\u7565\u904e\u6b63\u78ba\u6027\u6aa2\u67e5\u4ee5\u52a0\u5feb\u7de8\u8b6f\u901f\u5ea6.
diff --git a/jaxb-ri/xjc/src/test/java/Driver.java b/jaxb-ri/xjc/src/test/java/Driver.java
index be0fb15..b8db9ff 100644
--- a/jaxb-ri/xjc/src/test/java/Driver.java
+++ b/jaxb-ri/xjc/src/test/java/Driver.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,7 +36,7 @@
}
Class driver = cl.loadClass("com.sun.tools.xjc.Driver");
- Method mainMethod = driver.getDeclaredMethod("main", new Class[]{String[].class});
+ Method mainMethod = driver.getDeclaredMethod("main", String[].class);
try {
mainMethod.invoke(null,new Object[]{args});
} catch (IllegalAccessException e) {
diff --git a/jaxb-ri/xjc/src/test/java/SchemaGenerator.java b/jaxb-ri/xjc/src/test/java/SchemaGenerator.java
index e4ed21e..bcace45 100644
--- a/jaxb-ri/xjc/src/test/java/SchemaGenerator.java
+++ b/jaxb-ri/xjc/src/test/java/SchemaGenerator.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
@@ -13,7 +13,7 @@
import java.lang.reflect.Method;
/**
- * Alias of {@link com.sun.tools.jxc.SchemaGenerator}, just to make testing easier.
+ * Alias of {@code com.sun.tools.jxc.SchemaGenerator}, just to make testing easier.
*
* @author Kohsuke Kawaguchi
*/
@@ -38,7 +38,7 @@
}
Class driver = cl.loadClass("com.sun.tools.jxc.SchemaGenerator");
- Method mainMethod = driver.getDeclaredMethod("main", new Class[]{String[].class});
+ Method mainMethod = driver.getDeclaredMethod("main", String[].class);
try {
mainMethod.invoke(null,new Object[]{args});
} catch (IllegalAccessException e) {
diff --git a/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/AntExecutor.java b/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/AntExecutor.java
index 78f1547..0eec902 100644
--- a/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/AntExecutor.java
+++ b/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/AntExecutor.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
@@ -29,7 +29,7 @@
public static int exec(File script, String... targets) throws IOException {
File heapDump = null;
- List<String> cmd = new ArrayList<String>();
+ List<String> cmd = new ArrayList<>();
cmd.add("java");
if (DEBUG) {
cmd.add("-Xdebug");
diff --git a/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/OptionsJUTest.java b/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/OptionsJUTest.java
index 6fb0865..3582fb5 100644
--- a/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/OptionsJUTest.java
+++ b/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/OptionsJUTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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,7 @@
import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.util.logging.Level;
import java.util.logging.Logger;
import junit.framework.TestCase;
@@ -67,7 +68,7 @@
fis.read(in);
fis.close();
cls.delete();
- String inStr = new String(in, "UTF-8");
+ String inStr = new String(in, StandardCharsets.UTF_8);
assertTrue("Got: '" + inStr + "'", inStr.contains("// This f"));
//test UTF-16
@@ -80,7 +81,7 @@
fis.read(in);
fis.close();
cls.delete();
- inStr = new String(in, "UTF-16");
+ inStr = new String(in, StandardCharsets.UTF_16);
assertTrue("Got: '" + inStr + "'", inStr.contains("package t"));
//test default encoding
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 979756c..6309872 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
@@ -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 @@
@Override
public List<String> getCustomizationURIs() {
- return Arrays.asList("http://jaxb.dev.java.net/test");
+ return List.of("http://jaxb.dev.java.net/test");
}
@Override
diff --git a/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/api/Driver.java b/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/api/Driver.java
index 3a2b2a0..d08658f 100644
--- a/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/api/Driver.java
+++ b/jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/api/Driver.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,7 +25,6 @@
import com.sun.codemodel.writer.SingleStreamCodeWriter;
import com.sun.tools.xjc.ConsoleErrorReporter;
import java.io.IOException;
-import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.core.v2.util.XmlFactory;
import org.w3c.dom.Document;
diff --git a/jaxb-ri/xsom/pom.xml b/jaxb-ri/xsom/pom.xml
index 06d9294..9bb85f3 100644
--- a/jaxb-ri/xsom/pom.xml
+++ b/jaxb-ri/xsom/pom.xml
@@ -68,6 +68,13 @@
<relaxng.version>${project.version}</relaxng.version>
<junit.version>4.13.2</junit.version>
+ <!-- exclude big groups from the Xlint -->
+ <comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
+ <!-- -Xdoclint:-missing does not seem to work properly on the infra -->
+ <comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
+ <warn.limit>150000</warn.limit>
+ <!-- too many to fix -->
+ <jdoc.doclint>all,-missing</jdoc.doclint>
</properties>
<dependencies>
@@ -142,7 +149,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.10.0</version>
+ <version>3.10.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -213,8 +220,13 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
- <compilerArgs>
- <arg>-Xlint:all</arg>
+ <compilerArgs combine.children="append">
+ <arg>${comp.xlint}</arg>
+ <arg>${comp.xdoclint}</arg>
+ <arg>-Xmaxwarns</arg>
+ <arg>${warn.limit}</arg>
+ <arg>-Xmaxerrs</arg>
+ <arg>${warn.limit}</arg>
</compilerArgs>
</configuration>
</plugin>
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/SCD.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/SCD.java
index 8e89f9e..6aaf921 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/SCD.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/SCD.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,7 +59,7 @@
try {
SCDParser p = new SCDParser(path,nsContext);
List<?> list = p.RelativeSchemaComponentPath();
- return new SCDImpl(path,list.toArray(new Step[list.size()]));
+ return new SCDImpl(path,list.toArray(new Step[0]));
} catch (TokenMgrError e) {
throw setCause(new java.text.ParseException(e.getMessage(), -1 ),e);
} catch (ParseException e) {
@@ -80,7 +80,7 @@
* could be empty but never be null.
*/
public final Collection<XSComponent> select(XSComponent contextNode) {
- return new DeferedCollection<XSComponent>(select(Iterators.singleton(contextNode)));
+ return new DeferedCollection<>(select(Iterators.singleton(contextNode)));
}
/**
@@ -132,7 +132,7 @@
*
* @param contextNodes
* {@link XSComponent}s that represent the context node against
- * which {@link SCD} is evaluated.
+ * which is evaluated.
*
* @return
* could be empty but never be null.
@@ -145,13 +145,13 @@
*
* @param contextNodes
* {@link XSComponent}s that represent the context node against
- * which {@link SCD} is evaluated.
+ * which is evaluated.
*
* @return
* could be empty but never be null.
*/
public final Collection<XSComponent> select(Collection<? extends XSComponent> contextNodes) {
- return new DeferedCollection<XSComponent>(select(contextNodes.iterator()));
+ return new DeferedCollection<>(select(contextNodes.iterator()));
}
/**
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSComplexType.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSComplexType.java
index 92ec778..371cf99 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSComplexType.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSComplexType.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,26 +79,24 @@
boolean isMixed();
/**
- * If this {@link XSComplexType} is redefined by another complex type,
+ * If this is redefined by another complex type,
* return that component.
*
* @return null
* if this component has not been redefined.
*/
- public XSComplexType getRedefinedBy();
+ XSComplexType getRedefinedBy();
/**
* Returns a list of direct subtypes of this complex type. If the type is not subtyped, returns empty list.
* Doesn't return null.
* Note that the complex type may be extended outside of the scope of the schemaset known to XSOM.
- * @return
*/
- public List<XSComplexType> getSubtypes();
+ List<XSComplexType> getSubtypes();
/**
* Returns a list of element declarations of this type.
- * @return
*/
- public List<XSElementDecl> getElementDecls();
+ List<XSElementDecl> getElementDecls();
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSFacet.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSFacet.java
index 10c4439..20df268 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSFacet.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSFacet.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
@@ -29,16 +29,16 @@
// well-known facet name constants
- final static String FACET_LENGTH = "length";
- final static String FACET_MINLENGTH = "minLength";
- final static String FACET_MAXLENGTH = "maxLength";
- final static String FACET_PATTERN = "pattern";
- final static String FACET_ENUMERATION = "enumeration";
- final static String FACET_TOTALDIGITS = "totalDigits";
- final static String FACET_FRACTIONDIGITS = "fractionDigits";
- final static String FACET_MININCLUSIVE = "minInclusive";
- final static String FACET_MAXINCLUSIVE = "maxInclusive";
- final static String FACET_MINEXCLUSIVE = "minExclusive";
- final static String FACET_MAXEXCLUSIVE = "maxExclusive";
- final static String FACET_WHITESPACE = "whiteSpace";
+ String FACET_LENGTH = "length";
+ String FACET_MINLENGTH = "minLength";
+ String FACET_MAXLENGTH = "maxLength";
+ String FACET_PATTERN = "pattern";
+ String FACET_ENUMERATION = "enumeration";
+ String FACET_TOTALDIGITS = "totalDigits";
+ String FACET_FRACTIONDIGITS = "fractionDigits";
+ String FACET_MININCLUSIVE = "minInclusive";
+ String FACET_MAXINCLUSIVE = "maxInclusive";
+ String FACET_MINEXCLUSIVE = "minExclusive";
+ String FACET_MAXEXCLUSIVE = "maxExclusive";
+ String FACET_WHITESPACE = "whiteSpace";
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSIdentityConstraint.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSIdentityConstraint.java
index f9207ef..55f5eb1 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSIdentityConstraint.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSIdentityConstraint.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 @@
/**
* Name of the identity constraint.
*
- * A name uniquely identifies this {@link XSIdentityConstraint} within
+ * A name uniquely identifies this within
* the namespace.
*
* @return
@@ -53,9 +53,9 @@
*/
short getCategory();
- final short KEY = 0;
- final short KEYREF = 1;
- final short UNIQUE = 2;
+ short KEY = 0;
+ short KEYREF = 1;
+ short UNIQUE = 2;
/**
* Returns the selector XPath expression as string.
@@ -75,7 +75,7 @@
List<XSXPath> getFields();
/**
- * If this is {@link #KEYREF}, returns the key {@link XSIdentityConstraint}
+ * If this is {@link #KEYREF}, returns the key
* being referenced.
*
* @return
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSModelGroup.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSModelGroup.java
index 6957af7..76f686e 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSModelGroup.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSModelGroup.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,10 +22,10 @@
* Type-safe enumeration for kind of model groups.
* Constants are defined in the {@link XSModelGroup} interface.
*/
- public static enum Compositor {
+ enum Compositor {
ALL("all"),CHOICE("choice"),SEQUENCE("sequence");
- private Compositor(String _value) {
+ Compositor(String _value) {
this.value = _value;
}
@@ -43,15 +43,15 @@
/**
* A constant that represents "all" compositor.
*/
- static final Compositor ALL = Compositor.ALL;
+ Compositor ALL = Compositor.ALL;
/**
* A constant that represents "sequence" compositor.
*/
- static final Compositor SEQUENCE = Compositor.SEQUENCE;
+ Compositor SEQUENCE = Compositor.SEQUENCE;
/**
* A constant that represents "choice" compositor.
*/
- static final Compositor CHOICE = Compositor.CHOICE;
+ Compositor CHOICE = Compositor.CHOICE;
Compositor getCompositor();
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSParticle.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSParticle.java
index f538c73..e4ca1aa 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSParticle.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSParticle.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,7 +25,7 @@
* Gets the max occurs property.
*
* @return
- * {@link UNBOUNDED} will be returned if the value
+ * {@link #UNBOUNDED} will be returned if the value
* is "unbounded".
*/
BigInteger getMaxOccurs();
@@ -35,7 +35,7 @@
*/
boolean isRepeated();
- public static final int UNBOUNDED = -1;
+ int UNBOUNDED = -1;
XSTerm getTerm();
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSRestrictionSimpleType.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSRestrictionSimpleType.java
index 26fa308..de2a082 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSRestrictionSimpleType.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSRestrictionSimpleType.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
@@ -24,7 +24,7 @@
// TODO
/** Iterates facets that are specified in this step of derivation. */
- public Iterator<XSFacet> iterateDeclaredFacets();
+ Iterator<XSFacet> iterateDeclaredFacets();
/**
* Gets all the facets that are declared on this restriction.
@@ -32,7 +32,7 @@
* @return
* Can be empty but always non-null.
*/
- public Collection<? extends XSFacet> getDeclaredFacets();
+ Collection<? extends XSFacet> getDeclaredFacets();
/**
* Gets the declared facet object of the given name.
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSchema.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSchema.java
index 8d528a4..58fa4ed 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSchema.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSchema.java
@@ -103,14 +103,14 @@
XSIdentityConstraint getIdentityConstraint(String localName);
/**
- * Sine an {@link XSSchema} is not necessarily defined in
+ * Sine an is not necessarily defined in
* one schema document (for example one schema can span across
* many documents through {@code <xs:include>s}.),
* so this method always returns null.
*
* @deprecated
* Since this method always returns null, if you are calling
- * this method from {@link XSSchema} and not from {@link XSComponent},
+ * this method from and not from {@link XSComponent},
* there's something wrong with your code.
*/
@Deprecated(since="2.3", forRemoval=true)
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSimpleType.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSimpleType.java
index 36e2dcf..9d11a23 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSimpleType.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSimpleType.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,7 +47,7 @@
XSVariety getVariety();
/**
- * Gets the ancestor primitive {@link XSSimpleType} if
+ * Gets the ancestor primitive if
* this type is {@link XSVariety#ATOMIC atomic}.
*
* @return
@@ -87,13 +87,13 @@
boolean isFinal(XSVariety v);
/**
- * If this {@link XSSimpleType} is redefined by another simple type,
+ * If this is redefined by another simple type,
* return that component.
*
* @return null
* if this component has not been redefined.
*/
- public XSSimpleType getRedefinedBy();
+ XSSimpleType getRedefinedBy();
/**
* Gets the effective facet object of the given name.
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSType.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSType.java
index 1190336..6e43e9d 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSType.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSType.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
@@ -27,9 +27,9 @@
*/
XSType getBaseType();
- final static int EXTENSION = 1;
- final static int RESTRICTION = 2;
- final static int SUBSTITUTION = 4;
+ int EXTENSION = 1;
+ int RESTRICTION = 2;
+ int SUBSTITUTION = 4;
int getDerivationMethod();
@@ -47,7 +47,7 @@
XSType[] listSubstitutables();
/**
- * If this {@link XSType} is redefined by another type,
+ * If this is redefined by another type,
* return that component.
*
* @return null
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSWildcard.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSWildcard.java
index ab64cb5..7fa42ca 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSWildcard.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSWildcard.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,9 +25,9 @@
*/
public interface XSWildcard extends XSComponent, XSTerm
{
- static final int LAX = 1;
- static final int STRTICT = 2;
- static final int SKIP = 3;
+ int LAX = 1;
+ int STRTICT = 2;
+ int SKIP = 3;
/**
* Gets the processing mode.
*
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XmlString.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XmlString.java
index 37380fe..3a3b54b 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XmlString.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XmlString.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,7 +36,7 @@
public final ValidationContext context;
/**
- * Creates a new {@link XmlString} from a lexical representation and in-scope namespaces.
+ * Creates a new from a lexical representation and in-scope namespaces.
*/
public XmlString(String value, ValidationContext context) {
this.value = value;
@@ -46,7 +46,7 @@
}
/**
- * Creates a new {@link XmlString} with empty in-scope namespace bindings.
+ * Creates a new with empty in-scope namespace bindings.
*/
public XmlString(String value) {
this(value,NULL_CONTEXT);
@@ -72,7 +72,7 @@
* If the specified prefix is not declared,
* the implementation returns null.
*/
- public final String resolvePrefix(String prefix) {
+ public String resolvePrefix(String prefix) {
return context.resolveNamespacePrefix(prefix);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/AnnotationImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/AnnotationImpl.java
index 0142d9f..0967928 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/AnnotationImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/AnnotationImpl.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
@@ -58,7 +58,7 @@
public void setLineNumber(int lineNumber) {
return;
}
- };
-
+ }
+
private static final LocatorImplUnmodifiable NULL_LOCATION = new LocatorImplUnmodifiable();
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/AttributesHolder.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/AttributesHolder.java
index aa7f421..18b0960 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/AttributesHolder.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/AttributesHolder.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,7 +25,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.TreeMap;
import java.util.LinkedHashMap;
public abstract class AttributesHolder extends DeclarationImpl {
@@ -44,12 +43,12 @@
* Use linked hash map to guarantee the iteration order, and make it close to
* what was in the schema document.
*/
- protected final Map<UName,AttributeUseImpl> attributes = new LinkedHashMap<UName,AttributeUseImpl>();
+ protected final Map<UName,AttributeUseImpl> attributes = new LinkedHashMap<>();
public void addAttributeUse( UName name, AttributeUseImpl a ) {
attributes.put( name, a );
}
/** prohibited attributes. */
- protected final Set<UName> prohibitedAtts = new HashSet<UName>();
+ protected final Set<UName> prohibitedAtts = new HashSet<>();
public void addProhibitedAttribute( UName name ) {
prohibitedAtts.add(name);
}
@@ -60,8 +59,7 @@
*/
public Collection<XSAttributeUse> getAttributeUses() {
// TODO: this is fairly inefficient
- List<XSAttributeUse> v = new ArrayList<XSAttributeUse>();
- v.addAll(attributes.values());
+ List<XSAttributeUse> v = new ArrayList<>(attributes.values());
for( XSAttGroupDecl agd : getAttGroups() )
v.addAll(agd.getAttributeUses());
return v;
@@ -86,14 +84,14 @@
/** {@link Ref.AttGroup}s that are directly refered from this. */
- protected final Set<Ref.AttGroup> attGroups = new HashSet<Ref.AttGroup>();
+ protected final Set<Ref.AttGroup> attGroups = new HashSet<>();
public void addAttGroup( Ref.AttGroup a ) { attGroups.add(a); }
// Iterates all AttGroups which are directly referenced from this component
// this does not iterate att groups referenced from the base type
public Iterator<XSAttGroupDecl> iterateAttGroups() {
- return new Iterators.Adapter<XSAttGroupDecl,Ref.AttGroup>(attGroups.iterator()) {
+ return new Iterators.Adapter<>(attGroups.iterator()) {
protected XSAttGroupDecl filter(AttGroup u) {
return u.get();
}
@@ -101,7 +99,7 @@
}
public Set<XSAttGroupDecl> getAttGroups() {
- return new AbstractSet<XSAttGroupDecl>() {
+ return new AbstractSet<>() {
public Iterator<XSAttGroupDecl> iterator() {
return iterateAttGroups();
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ComplexTypeImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ComplexTypeImpl.java
index 6ea57bf..080b6e0 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ComplexTypeImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ComplexTypeImpl.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
@@ -212,15 +212,15 @@
if( baseType==null ) return super.iterateAttributeUses();
- return new Iterators.Union<XSAttributeUse>(
- new Iterators.Filter<XSAttributeUse>(baseType.iterateAttributeUses()) {
- protected boolean matches(XSAttributeUse value) {
- XSAttributeDecl u = value.getDecl();
- UName n = new UName(u.getTargetNamespace(),u.getName());
- return !prohibitedAtts.contains(n);
- }
- },
- super.iterateAttributeUses() );
+ return new Iterators.Union<>(
+ new Iterators.Filter<XSAttributeUse>(baseType.iterateAttributeUses()) {
+ protected boolean matches(XSAttributeUse value) {
+ XSAttributeDecl u = value.getDecl();
+ UName n = new UName(u.getTargetNamespace(), u.getName());
+ return !prohibitedAtts.contains(n);
+ }
+ },
+ super.iterateAttributeUses());
}
public Collection<XSAttributeUse> getAttributeUses() {
@@ -229,7 +229,7 @@
if( baseType==null ) return super.getAttributeUses();
// TODO: this is fairly inefficient
- Map<UName,XSAttributeUse> uses = new HashMap<UName, XSAttributeUse>();
+ Map<UName,XSAttributeUse> uses = new HashMap<>();
for( XSAttributeUse a : baseType.getAttributeUses())
uses.put(new UName(a.getDecl()),a);
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ComponentImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ComponentImpl.java
index 4fe75ea..8c2c07d 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ComponentImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ComponentImpl.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
@@ -97,7 +97,7 @@
}
private List<ForeignAttributesImpl> convertToList(ForeignAttributesImpl fa) {
- List<ForeignAttributesImpl> lst = new ArrayList<ForeignAttributesImpl>();
+ List<ForeignAttributesImpl> lst = new ArrayList<>();
while(fa!=null) {
lst.add(fa);
fa = fa.next;
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/DeclarationImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/DeclarationImpl.java
index d0835b3..31bc2d1 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/DeclarationImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/DeclarationImpl.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
@@ -12,7 +12,6 @@
import com.sun.xml.xsom.XSDeclaration;
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.xsom.util.NameGetter;
import org.xml.sax.Locator;
abstract class DeclarationImpl extends ComponentImpl implements XSDeclaration
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ElementDecl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ElementDecl.java
index 8e06c01..1154eff 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ElementDecl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ElementDecl.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
@@ -55,7 +55,7 @@
this.substHead = _substHead;
this.substDisallowed = _substDisallowed;
this.substExcluded = _substExcluded;
- this.idConstraints = (List<XSIdentityConstraint>) Collections.unmodifiableList((List<? extends XSIdentityConstraint>)idConstraints);
+ this.idConstraints = Collections.unmodifiableList(idConstraints);
for (IdentityConstraintImpl idc : idConstraints)
idc.setParent(this);
@@ -123,7 +123,7 @@
@Deprecated
public XSElementDecl[] listSubstitutables() {
Set<? extends XSElementDecl> s = getSubstitutables();
- return s.toArray(new XSElementDecl[s.size()]);
+ return s.toArray(new XSElementDecl[0]);
}
/** Set that represents element decls that can substitute this element. */
@@ -137,14 +137,14 @@
if( substitutables==null ) {
// if the field is null by the time this method
// is called, it means this element is substitutable by itself only.
- substitutables = substitutablesView = Collections.singleton((XSElementDecl)this);
+ substitutables = substitutablesView = Collections.singleton(this);
}
return substitutablesView;
}
protected void addSubstitutable( ElementDecl decl ) {
if( substitutables==null ) {
- substitutables = new HashSet<XSElementDecl>();
+ substitutables = new HashSet<>();
substitutables.add(this);
substitutablesView = Collections.unmodifiableSet(substitutables);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/IdentityConstraintImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/IdentityConstraintImpl.java
index 0b82384..84399cd 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/IdentityConstraintImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/IdentityConstraintImpl.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
@@ -44,7 +44,7 @@
this.name = name;
this.selector = selector;
selector.setParent(this);
- this.fields = (List<XSXPath>) Collections.unmodifiableList((List<? extends XSXPath>)fields);
+ this.fields = Collections.unmodifiableList(fields);
for( XPathImpl xp : fields )
xp.setParent(this);
this.refer = refer;
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ImplUtil.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ImplUtil.java
index 759abd5..30ec610 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ImplUtil.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/ImplUtil.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
@@ -35,13 +35,13 @@
if( t.getBaseType()==_this )
r.add(t);
}
- return (XSType[]) r.toArray(new XSType[r.size()]);
+ return (XSType[]) r.toArray(new XSType[0]);
}
public static XSType[] listSubstitutables( XSType _this ) {
Set substitables = new HashSet();
buildSubstitutables( _this, substitables );
- return (XSType[]) substitables.toArray(new XSType[substitables.size()]);
+ return (XSType[]) substitables.toArray(new XSType[0]);
}
public static void buildSubstitutables( XSType _this, Set substitutables ) {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/Ref.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/Ref.java
index 25575d4..8c8518e 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/Ref.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/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
@@ -38,41 +38,41 @@
*/
public abstract class Ref {
- public static interface Term {
+ public interface Term {
/** Obtains a reference as a term. */
XSTerm getTerm();
}
- public static interface Type {
+ public interface Type {
/** Obtains a reference as a type. */
XSType getType();
}
- public static interface ContentType {
+ public interface ContentType {
XSContentType getContentType();
}
- public static interface SimpleType extends Ref.Type {
- public XSSimpleType getType();
+ public interface SimpleType extends Ref.Type {
+ XSSimpleType getType();
}
- public static interface ComplexType extends Ref.Type {
- public XSComplexType getType();
+ public interface ComplexType extends Ref.Type {
+ XSComplexType getType();
}
- public static interface Attribute {
+ public interface Attribute {
XSAttributeDecl getAttribute();
}
- public static interface AttGroup {
+ public interface AttGroup {
XSAttGroupDecl get();
}
- public static interface Element extends Term {
+ public interface Element extends Term {
XSElementDecl get();
}
- public static interface IdentityConstraint {
+ public interface IdentityConstraint {
XSIdentityConstraint get();
}
//
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/RestrictionSimpleTypeImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/RestrictionSimpleTypeImpl.java
index 3c0b431..c7171ee 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/RestrictionSimpleTypeImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/RestrictionSimpleTypeImpl.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,7 +36,7 @@
}
- private final List<XSFacet> facets = new ArrayList<XSFacet>();
+ private final List<XSFacet> facets = new ArrayList<>();
public void addFacet( XSFacet facet ) {
facets.add(facet);
}
@@ -59,7 +59,7 @@
}
public List<XSFacet> getDeclaredFacets(String name) {
- List<XSFacet> r = new ArrayList<XSFacet>();
+ List<XSFacet> r = new ArrayList<>();
for( XSFacet f : facets )
if(f.getName().equals(name))
r.add(f);
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/SchemaImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/SchemaImpl.java
index 2aeb5af..fc79190 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/SchemaImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/SchemaImpl.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
@@ -96,7 +96,7 @@
}
- private final Map<String,XSAttributeDecl> atts = new HashMap<String,XSAttributeDecl>();
+ private final Map<String,XSAttributeDecl> atts = new HashMap<>();
private final Map<String,XSAttributeDecl> attsView = Collections.unmodifiableMap(atts);
public void addAttributeDecl(XSAttributeDecl newDecl) {
atts.put(newDecl.getName(), newDecl);
@@ -111,7 +111,7 @@
return atts.values().iterator();
}
- private final Map<String, XSElementDecl> elems = new LinkedHashMap<String, XSElementDecl>();
+ private final Map<String, XSElementDecl> elems = new LinkedHashMap<>();
private final Map<String,XSElementDecl> elemsView = Collections.unmodifiableMap(elems);
public void addElementDecl(XSElementDecl newDecl) {
elems.put(newDecl.getName(), newDecl);
@@ -126,7 +126,7 @@
return elems.values().iterator();
}
- private final Map<String,XSAttGroupDecl> attGroups = new HashMap<String,XSAttGroupDecl>();
+ private final Map<String,XSAttGroupDecl> attGroups = new HashMap<>();
private final Map<String,XSAttGroupDecl> attGroupsView = Collections.unmodifiableMap(attGroups);
public void addAttGroupDecl(XSAttGroupDecl newDecl, boolean overwrite) {
if(overwrite || !attGroups.containsKey(newDecl.getName()))
@@ -143,7 +143,7 @@
}
- private final Map<String,XSNotation> notations = new HashMap<String,XSNotation>();
+ private final Map<String,XSNotation> notations = new HashMap<>();
private final Map<String,XSNotation> notationsView = Collections.unmodifiableMap(notations);
public void addNotation( XSNotation newDecl ) {
notations.put( newDecl.getName(), newDecl );
@@ -158,7 +158,7 @@
return notations.values().iterator();
}
- private final Map<String,XSModelGroupDecl> modelGroups = new HashMap<String,XSModelGroupDecl>();
+ private final Map<String,XSModelGroupDecl> modelGroups = new HashMap<>();
private final Map<String,XSModelGroupDecl> modelGroupsView = Collections.unmodifiableMap(modelGroups);
public void addModelGroupDecl(XSModelGroupDecl newDecl, boolean overwrite) {
if(overwrite || !modelGroups.containsKey(newDecl.getName()))
@@ -175,7 +175,7 @@
}
- private final Map<String,XSIdentityConstraint> idConstraints = new HashMap<String,XSIdentityConstraint>();
+ private final Map<String,XSIdentityConstraint> idConstraints = new HashMap<>();
private final Map<String,XSIdentityConstraint> idConstraintsView = Collections.unmodifiableMap(idConstraints);
protected void addIdentityConstraint(IdentityConstraintImpl c) {
@@ -190,10 +190,10 @@
return idConstraints.get(localName);
}
- private final Map<String, XSType> allTypes = new LinkedHashMap<String, XSType>();
+ private final Map<String, XSType> allTypes = new LinkedHashMap<>();
private final Map<String,XSType> allTypesView = Collections.unmodifiableMap(allTypes);
- private final Map<String,XSSimpleType> simpleTypes = new HashMap<String,XSSimpleType>();
+ private final Map<String,XSSimpleType> simpleTypes = new HashMap<>();
private final Map<String,XSSimpleType> simpleTypesView = Collections.unmodifiableMap(simpleTypes);
public void addSimpleType(XSSimpleType newDecl, boolean overwrite) {
if(overwrite || !simpleTypes.containsKey(newDecl.getName())) {
@@ -211,7 +211,7 @@
return simpleTypes.values().iterator();
}
- private final Map<String,XSComplexType> complexTypes = new HashMap<String,XSComplexType>();
+ private final Map<String,XSComplexType> complexTypes = new HashMap<>();
private final Map<String,XSComplexType> complexTypesView = Collections.unmodifiableMap(complexTypes);
public void addComplexType(XSComplexType newDecl, boolean overwrite) {
if(overwrite || !complexTypes.containsKey(newDecl.getName())) {
@@ -255,7 +255,7 @@
public void addForeignAttributes(ForeignAttributesImpl fa) {
if(foreignAttributes==null)
- foreignAttributes = new ArrayList<ForeignAttributes>();
+ foreignAttributes = new ArrayList<>();
foreignAttributes.add(fa);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/SchemaSetImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/SchemaSetImpl.java
index 87f1dcf..b7194f8 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/SchemaSetImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/SchemaSetImpl.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
@@ -55,8 +55,8 @@
public class SchemaSetImpl implements XSSchemaSet
{
- private final Map<String,XSSchema> schemas = new HashMap<String,XSSchema>();
- private final Vector<XSSchema> schemas2 = new Vector<XSSchema>();
+ private final Map<String,XSSchema> schemas = new HashMap<>();
+ private final Vector<XSSchema> schemas2 = new Vector<>();
private final List<XSSchema> readonlySchemaList = Collections.unmodifiableList(schemas2);
/**
@@ -147,7 +147,7 @@
}
public Iterator<XSElementDecl> iterateElementDecls() {
- return new Iterators.Map<XSElementDecl,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSElementDecl> apply(XSSchema u) {
return u.iterateElementDecls();
}
@@ -155,7 +155,7 @@
}
public Iterator<XSType> iterateTypes() {
- return new Iterators.Map<XSType,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSType> apply(XSSchema u) {
return u.iterateTypes();
}
@@ -163,42 +163,42 @@
}
public Iterator<XSAttributeDecl> iterateAttributeDecls() {
- return new Iterators.Map<XSAttributeDecl,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSAttributeDecl> apply(XSSchema u) {
return u.iterateAttributeDecls();
}
};
}
public Iterator<XSAttGroupDecl> iterateAttGroupDecls() {
- return new Iterators.Map<XSAttGroupDecl,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSAttGroupDecl> apply(XSSchema u) {
return u.iterateAttGroupDecls();
}
};
}
public Iterator<XSModelGroupDecl> iterateModelGroupDecls() {
- return new Iterators.Map<XSModelGroupDecl,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSModelGroupDecl> apply(XSSchema u) {
return u.iterateModelGroupDecls();
}
};
}
public Iterator<XSSimpleType> iterateSimpleTypes() {
- return new Iterators.Map<XSSimpleType,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSSimpleType> apply(XSSchema u) {
return u.iterateSimpleTypes();
}
};
}
public Iterator<XSComplexType> iterateComplexTypes() {
- return new Iterators.Map<XSComplexType,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSComplexType> apply(XSSchema u) {
return u.iterateComplexTypes();
}
};
}
public Iterator<XSNotation> iterateNotations() {
- return new Iterators.Map<XSNotation,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSNotation> apply(XSSchema u) {
return u.iterateNotations();
}
@@ -206,7 +206,7 @@
}
public Iterator<XSIdentityConstraint> iterateIdentityConstraints() {
- return new Iterators.Map<XSIdentityConstraint,XSSchema>(iterateSchema()) {
+ return new Iterators.Map<>(iterateSchema()) {
protected Iterator<XSIdentityConstraint> apply(XSSchema u) {
return u.getIdentityConstraints().values().iterator();
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/UnionSimpleTypeImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/UnionSimpleTypeImpl.java
index f4f96d8..0f6b19f 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/UnionSimpleTypeImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/UnionSimpleTypeImpl.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
@@ -42,10 +42,11 @@
public int getMemberSize() { return memberTypes.length; }
public Iterator<XSSimpleType> iterator() {
- return new Iterator<XSSimpleType>() {
- int idx=0;
+ return new Iterator<>() {
+ int idx = 0;
+
public boolean hasNext() {
- return idx<memberTypes.length;
+ return idx < memberTypes.length;
}
public XSSimpleType next() {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/WildcardImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/WildcardImpl.java
index b57d969..c752110 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/WildcardImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/WildcardImpl.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,7 +47,7 @@
return new Any(owner,null,null,null,mode);
if(this instanceof Finite && rhs instanceof Finite) {
- Set<String> values = new HashSet<String>();
+ Set<String> values = new HashSet<>();
values.addAll( ((Finite)this).names );
values.addAll( ((Finite)rhs ).names );
return new Finite(owner,null,null,null,values,mode);
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/NGCCRuntimeEx.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/NGCCRuntimeEx.java
index f519d37..6a23beb 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/NGCCRuntimeEx.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/NGCCRuntimeEx.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
@@ -87,7 +87,7 @@
* This information is passed to AnnotationParser as
* context information
*/
- private final Stack<String> elementNames = new Stack<String>();
+ private final Stack<String> elementNames = new Stack<>();
/**
* Points to the schema document (the parser of it) that included/imported
@@ -225,9 +225,7 @@
/**
* Includes the specified schema.
- *
- * @param schemaLocation
- * @throws org.xml.sax.SAXException */
+ * */
public void includeSchema( String schemaLocation ) throws SAXException {
NGCCRuntimeEx runtime = new NGCCRuntimeEx(parser,chameleonMode,this);
runtime.currentSchema = this.currentSchema;
@@ -247,10 +245,7 @@
/**
* Imports the specified schema.
- *
- * @param ns
- * @param schemaLocation
- * @throws org.xml.sax.SAXException */
+ * */
public void importSchema( String ns, String schemaLocation ) throws SAXException {
NGCCRuntimeEx newRuntime = new NGCCRuntimeEx(parser,false,this);
InputSource source = resolveRelativeURL(ns,schemaLocation);
@@ -332,13 +327,9 @@
/**
* Parses the specified entity.
*
- * @param source
* @param importLocation
* The source location of the import/include statement.
* Used for reporting errors.
- * @param includeMode
- * @param expectedNamespace
- * @throws org.xml.sax.SAXException
*/
public void parseEntity( InputSource source, boolean includeMode, String expectedNamespace, Locator importLocation )
throws SAXException {
@@ -479,7 +470,6 @@
* Parses UName under the given context.
* @param qname Attribute name.
* @return New {@link UName} instance based on attribute name.
- * @throws org.xml.sax.SAXException
*/
public UName parseUName(final String qname ) throws SAXException {
int idx = qname.indexOf(':');
@@ -519,7 +509,7 @@
/**
* returns true if the specified char is a white space character.
*/
- private final boolean isWhiteSpace(char ch) {
+ private boolean isWhiteSpace(char ch) {
// most of the characters are non-control characters.
// so check that first to quickly return false for most of the cases.
if (ch > 0x20) {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/ParserContext.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/ParserContext.java
index 0081506..613eca7 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/ParserContext.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/ParserContext.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,8 +51,8 @@
final XMLParser parser;
- private final Vector<Patch> patchers = new Vector<Patch>();
- private final Vector<Patch> errorCheckers = new Vector<Patch>();
+ private final Vector<Patch> patchers = new Vector<>();
+ private final Vector<Patch> errorCheckers = new Vector<>();
/**
* Documents that are parsed already. Used to avoid cyclic inclusion/double
@@ -61,7 +61,7 @@
* The actual data structure is map from {@link SchemaDocumentImpl} to itself,
* so that we can access the {@link SchemaDocumentImpl} itself.
*/
- public final Map<SchemaDocumentImpl, SchemaDocumentImpl> parsedDocuments = new HashMap<SchemaDocumentImpl, SchemaDocumentImpl>();
+ public final Map<SchemaDocumentImpl, SchemaDocumentImpl> parsedDocuments = new HashMap<>();
public ParserContext( XSOMParser owner, XMLParser parser ) {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/PatcherManager.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/PatcherManager.java
index dd50241..8552b4f 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/PatcherManager.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/PatcherManager.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,7 +31,7 @@
void reportError( String message, Locator source ) throws SAXException;
- public interface Patcher {
+ interface Patcher {
void run() throws SAXException;
}
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/SchemaDocumentImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/SchemaDocumentImpl.java
index a856c2f..4991bbd 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/SchemaDocumentImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/SchemaDocumentImpl.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,12 +34,12 @@
/**
* {@link SchemaDocumentImpl}s that are referenced from this document.
*/
- final Set<SchemaDocumentImpl> references = new HashSet<SchemaDocumentImpl>();
+ final Set<SchemaDocumentImpl> references = new HashSet<>();
/**
* {@link SchemaDocumentImpl}s that are referencing this document.
*/
- final Set<SchemaDocumentImpl> referers = new HashSet<SchemaDocumentImpl>();
+ final Set<SchemaDocumentImpl> referers = new HashSet<>();
protected SchemaDocumentImpl(SchemaImpl schema, String _schemaDocumentURI) {
this.schema = schema;
@@ -59,7 +59,7 @@
}
public Set<SchemaDocument> getReferencedDocuments() {
- return Collections.<SchemaDocument>unmodifiableSet(references);
+ return Collections.unmodifiableSet(references);
}
public Set<SchemaDocument> getIncludedDocuments() {
@@ -69,7 +69,7 @@
public Set<SchemaDocument> getImportedDocuments(String targetNamespace) {
if(targetNamespace==null)
throw new IllegalArgumentException();
- Set<SchemaDocument> r = new HashSet<SchemaDocument>();
+ Set<SchemaDocument> r = new HashSet<>();
for (SchemaDocumentImpl doc : references) {
if(doc.getTargetNamespace().equals(targetNamespace))
r.add(doc);
@@ -90,7 +90,7 @@
}
public Set<SchemaDocument> getReferers() {
- return Collections.<SchemaDocument>unmodifiableSet(referers);
+ return Collections.unmodifiableSet(referers);
}
@Override
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/AttributesImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/AttributesImpl.java
index 1970301..63fd743 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/AttributesImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/AttributesImpl.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
@@ -97,7 +97,6 @@
* Return the number of attributes in the list.
*
* @return The number of attributes in the list.
- * @see org.xml.sax.Attributes#getLength
*/
public int getLength ()
{
@@ -111,7 +110,6 @@
* @param index The attribute's index (zero-based).
* @return The Namespace URI, the empty string if none is
* available, or null if the index is out of range.
- * @see org.xml.sax.Attributes#getURI
*/
public String getURI (int index)
{
@@ -129,7 +127,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's local name, the empty string if
* none is available, or null if the index if out of range.
- * @see org.xml.sax.Attributes#getLocalName
*/
public String getLocalName (int index)
{
@@ -147,7 +144,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's qualified name, the empty string if
* none is available, or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getQName
*/
public String getQName (int index)
{
@@ -165,7 +161,6 @@
* @param index The attribute's index (zero-based).
* @return The attribute's type, "CDATA" if the type is unknown, or null
* if the index is out of bounds.
- * @see org.xml.sax.Attributes#getType(int)
*/
public String getType (int index)
{
@@ -182,7 +177,6 @@
*
* @param index The attribute's index (zero-based).
* @return The attribute's value or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getValue(int)
*/
public String getValue (int index)
{
@@ -205,7 +199,6 @@
* string if none is available.
* @param localName The attribute's local name.
* @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String,java.lang.String)
*/
public int getIndex (String uri, String localName)
{
@@ -224,7 +217,6 @@
*
* @param qName The qualified name.
* @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String)
*/
public int getIndex (String qName)
{
@@ -246,7 +238,6 @@
* @param localName The local name.
* @return The attribute's type, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String,java.lang.String)
*/
public String getType (String uri, String localName)
{
@@ -266,7 +257,6 @@
* @param qName The qualified name.
* @return The attribute's type, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String)
*/
public String getType (String qName)
{
@@ -288,7 +278,6 @@
* @param localName The local name.
* @return The attribute's value, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String,java.lang.String)
*/
public String getValue (String uri, String localName)
{
@@ -308,7 +297,6 @@
* @param qName The qualified name.
* @return The attribute's value, or null if there is no
* matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String)
*/
public String getValue (String qName)
{
@@ -577,7 +565,7 @@
while (max < n * 5) {
max *= 2;
}
- String newData[] = new String[max];
+ String[] newData = new String[max];
System.arraycopy(data, 0, newData, 0, length*5);
data = newData;
}
@@ -604,7 +592,7 @@
////////////////////////////////////////////////////////////////////
int length;
- String data [];
+ String[] data;
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/NGCCRuntime.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/NGCCRuntime.java
index 99454c1..4a04b4f 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/NGCCRuntime.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/NGCCRuntime.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
@@ -252,7 +252,7 @@
public void onEnterElementConsumed(
String uri, String localName, String qname,Attributes atts) throws SAXException {
attStack.push(currentAtts=new AttributesImpl(atts));
- nsEffectiveStack.push( Integer.valueOf(nsEffectivePtr) );
+ nsEffectiveStack.push(nsEffectivePtr);
nsEffectivePtr = namespaces.size();
}
@@ -262,7 +262,7 @@
currentAtts = null;
else
currentAtts = (AttributesImpl)attStack.peek();
- nsEffectivePtr = ((Integer)nsEffectiveStack.pop()).intValue();
+ nsEffectivePtr = (Integer) nsEffectiveStack.pop();
}
public void endElement(String uri, String localname, String qname)
@@ -508,10 +508,9 @@
protected void unexpectedX(String token) throws SAXException {
throw new SAXParseException(MessageFormat.format(
"Unexpected {0} appears at line {1} column {2}",
- new Object[]{
- token,
- Integer.valueOf(getLocator().getLineNumber()),
- Integer.valueOf(getLocator().getColumnNumber()) }),
+ token,
+ getLocator().getLineNumber(),
+ getLocator().getColumnNumber()),
getLocator());
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/Schema.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/Schema.java
index 10d1a75..c4d0167 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/Schema.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/Schema.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
@@ -11,22 +11,14 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.XMLReader;
- import com.sun.xml.xsom.*;
+import com.sun.xml.xsom.*;
import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+import org.xml.sax.helpers.*;
public class Schema extends NGCCHandler {
@@ -122,11 +114,11 @@
}
private void action11()throws SAXException {
- $runtime.finalDefault=this.finalDefault.intValue();
+ $runtime.finalDefault= this.finalDefault;
}
private void action12()throws SAXException {
- $runtime.blockDefault=this.blockDefault.intValue();
+ $runtime.blockDefault= this.blockDefault;
}
private void action13()throws SAXException {
@@ -1146,7 +1138,7 @@
break;
case 544:
{
- afd = ((Boolean)$__result__).booleanValue();
+ afd = (Boolean) $__result__;
action14();
$_ngcc_current_state = 50;
}
@@ -1217,7 +1209,7 @@
break;
case 539:
{
- efd = ((Boolean)$__result__).booleanValue();
+ efd = (Boolean) $__result__;
action13();
$_ngcc_current_state = 46;
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_List.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_List.java
index 3e840b8..9c301e1 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_List.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_List.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
@@ -11,20 +11,14 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+
+import java.util.*;
class SimpleType_List extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_Restriction.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_Restriction.java
index 6217e2c..7ba4703 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_Restriction.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_Restriction.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
@@ -11,20 +11,15 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
+import com.sun.xml.xsom.*;
import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+
+import java.util.*;
class SimpleType_Restriction extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_Union.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_Union.java
index 29bae6c..06758d3 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_Union.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/SimpleType_Union.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
@@ -11,21 +11,14 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import java.util.Vector;
+
+import java.util.*;
class SimpleType_Union extends NGCCHandler {
@@ -66,7 +59,7 @@
result = new UnionSimpleTypeImpl(
$runtime.document, annotation, locator, fa, name, name==null, finalSet,
- (Ref.SimpleType[])members.toArray(new Ref.SimpleType[members.size()]) );
+ (Ref.SimpleType[])members.toArray(new Ref.SimpleType[0]) );
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/annotation.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/annotation.java
index f875c42..ae9d271 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/annotation.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/annotation.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
@@ -11,21 +11,12 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import com.sun.xml.xsom.parser.AnnotationParser;
class annotation extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/attributeDeclBody.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/attributeDeclBody.java
index 9f05d4f..3aa7aba 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/attributeDeclBody.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/attributeDeclBody.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
@@ -472,7 +472,7 @@
break;
case 395:
{
- form = ((Boolean)$__result__).booleanValue();
+ form = (Boolean) $__result__;
action1();
$_ngcc_current_state = 14;
}
@@ -506,7 +506,7 @@
if(!isLocal) form = true;
String tns;
- if(form==true) tns = $runtime.currentSchema.getTargetNamespace();
+ if(form) tns = $runtime.currentSchema.getTargetNamespace();
else tns = "";
// proper handling of anonymous types
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/attributeUses.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/attributeUses.java
index fc3e335..f0fa57f 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/attributeUses.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/attributeUses.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
@@ -11,20 +11,12 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
class attributeUses extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/complexType.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/complexType.java
index 710e367..37264bb 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/complexType.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/complexType.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
@@ -1970,9 +1970,9 @@
(ParticleImpl)baseContentType,
(ParticleImpl)expContent}), null );
}
- };
+ }
- private Ref.ContentType buildComplexExtensionContentModel( XSContentType explicitContent ) {
+ private Ref.ContentType buildComplexExtensionContentModel( XSContentType explicitContent ) {
if(explicitContent==$runtime.parser.schemaSet.empty)
return new BaseComplexTypeContentRef(baseType);
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/complexType_complexContent_body.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/complexType_complexContent_body.java
index 8549fe6..a5a4afe 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/complexType_complexContent_body.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/complexType_complexContent_body.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
@@ -11,20 +11,10 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
- import com.sun.xml.xsom.impl.*;
+import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
class complexType_complexContent_body extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/elementDeclBody.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/elementDeclBody.java
index 3ad83f0..f23a440 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/elementDeclBody.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/elementDeclBody.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
@@ -1067,7 +1067,7 @@
break;
case 40:
{
- form = ((Boolean)$__result__).booleanValue();
+ form = (Boolean) $__result__;
action3();
$_ngcc_current_state = 25;
}
@@ -1109,9 +1109,9 @@
private ElementDecl makeResult() {
if(finalValue==null)
- finalValue = Integer.valueOf($runtime.finalDefault);
+ finalValue = $runtime.finalDefault;
if(blockValue==null)
- blockValue = Integer.valueOf($runtime.blockDefault);
+ blockValue = $runtime.blockDefault;
if(!formSpecified)
form = $runtime.elementFormDefault;
@@ -1142,11 +1142,11 @@
$runtime.createXmlString(fixedValue),
$runtime.parseBoolean(nillable),
$runtime.parseBoolean(abstractValue),
- (java.lang.Boolean)(formSpecified ? form : null),
+ formSpecified ? form : null,
type,
substHeadRef,
- blockValue.intValue(),
- finalValue.intValue(),
+ blockValue,
+ finalValue,
idcs);
// if this element has anonymous complex type, it will be set here.
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/erSet.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/erSet.java
index 576ae37..b66a380 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/erSet.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/erSet.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
@@ -11,20 +11,10 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
- import com.sun.xml.xsom.impl.*;
- import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+import com.sun.xml.xsom.*;
+import com.sun.xml.xsom.impl.parser.*;
class erSet extends NGCCHandler {
@@ -153,17 +143,17 @@
private Integer makeResult() {
- if(v==null) return Integer.valueOf($runtime.finalDefault);
+ if(v==null) return $runtime.finalDefault;
- if(v.indexOf("#all")!=-1)
- return Integer.valueOf(XSType.EXTENSION|XSType.RESTRICTION);
+ if(v.contains("#all"))
+ return XSType.EXTENSION | XSType.RESTRICTION;
int r = 0;
- if(v.indexOf("extension")!=-1) r|=XSType.EXTENSION;
- if(v.indexOf("restriction")!=-1) r|=XSType.RESTRICTION;
+ if(v.contains("extension")) r|=XSType.EXTENSION;
+ if(v.contains("restriction")) r|=XSType.RESTRICTION;
- return Integer.valueOf(r);
+ return r;
}
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/ersSet.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/ersSet.java
index a883077..2bd378d 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/ersSet.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/ersSet.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
@@ -11,20 +11,10 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
- import com.sun.xml.xsom.impl.*;
- import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+import com.sun.xml.xsom.*;
+import com.sun.xml.xsom.impl.parser.*;
class ersSet extends NGCCHandler {
@@ -153,18 +143,18 @@
private Integer makeResult() {
- if(v==null) return Integer.valueOf($runtime.blockDefault);
+ if(v==null) return $runtime.blockDefault;
- if(v.indexOf("#all")!=-1)
- return Integer.valueOf(XSType.EXTENSION|XSType.RESTRICTION|XSType.SUBSTITUTION);
+ if(v.contains("#all"))
+ return XSType.EXTENSION | XSType.RESTRICTION | XSType.SUBSTITUTION;
int r = 0;
- if(v.indexOf("extension")!=-1) r|=XSType.EXTENSION;
- if(v.indexOf("restriction")!=-1) r|=XSType.RESTRICTION;
- if(v.indexOf("substitution")!=-1) r|=XSType.SUBSTITUTION;
+ if(v.contains("extension")) r|=XSType.EXTENSION;
+ if(v.contains("restriction")) r|=XSType.RESTRICTION;
+ if(v.contains("substitution")) r|=XSType.SUBSTITUTION;
- return Integer.valueOf(r);
+ return r;
}
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/facet.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/facet.java
index f2bde16..2539b96 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/facet.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/facet.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
@@ -11,20 +11,12 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
class facet extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/foreignAttributes.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/foreignAttributes.java
index 4cbf0ea..43ace29 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/foreignAttributes.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/foreignAttributes.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
@@ -11,20 +11,10 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
- import com.sun.xml.xsom.impl.*;
+import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
class foreignAttributes extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/identityConstraint.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/identityConstraint.java
index 101f7a2..b648ccb 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/identityConstraint.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/identityConstraint.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,14 +59,17 @@
}
private void action2()throws SAXException {
- if($localName.equals("key"))
- category = XSIdentityConstraint.KEY;
- else
- if($localName.equals("keyref"))
- category = XSIdentityConstraint.KEYREF;
- else
- if($localName.equals("unique"))
- category = XSIdentityConstraint.UNIQUE;
+ switch ($localName) {
+ case "key":
+ category = XSIdentityConstraint.KEY;
+ break;
+ case "keyref":
+ category = XSIdentityConstraint.KEYREF;
+ break;
+ case "unique":
+ category = XSIdentityConstraint.UNIQUE;
+ break;
+ }
}
public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/importDecl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/importDecl.java
index 52589e1..5d910a0 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/importDecl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/importDecl.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
@@ -11,20 +11,10 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
- import com.sun.xml.xsom.impl.*;
- import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.impl.parser.*;
class importDecl extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/includeDecl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/includeDecl.java
index 3af5d03..1eeeef4 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/includeDecl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/includeDecl.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
@@ -11,20 +11,10 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
- import com.sun.xml.xsom.impl.*;
- import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.impl.parser.*;
class includeDecl extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/modelGroupBody.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/modelGroupBody.java
index db2991c..26864c0 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/modelGroupBody.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/modelGroupBody.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
@@ -11,21 +11,15 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
+import com.sun.xml.xsom.*;
import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import java.util.Vector;
+
+import java.util.*;
class modelGroupBody extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/occurs.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/occurs.java
index caa3199..29e0580 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/occurs.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/occurs.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
@@ -11,20 +11,10 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
- import com.sun.xml.xsom.impl.*;
- import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+import com.sun.xml.xsom.impl.parser.*;
+
import java.math.BigInteger;
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/particle.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/particle.java
index 186c761..d076060 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/particle.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/particle.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
@@ -11,20 +11,12 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
class particle extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/qualification.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/qualification.java
index 1fc6b09..9e046ea 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/qualification.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/qualification.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
@@ -11,20 +11,9 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
- import com.sun.xml.xsom.impl.*;
- import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
+import com.sun.xml.xsom.impl.parser.*;
class qualification extends NGCCHandler {
@@ -57,7 +46,7 @@
switch($_ngcc_current_state) {
case 0:
{
- revertToParentFromEnterElement(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname, $attrs);
+ revertToParentFromEnterElement(text.trim().equals("qualified"), super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
default:
@@ -76,7 +65,7 @@
switch($_ngcc_current_state) {
case 0:
{
- revertToParentFromLeaveElement(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
+ revertToParentFromLeaveElement(text.trim().equals("qualified"), super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -95,7 +84,7 @@
switch($_ngcc_current_state) {
case 0:
{
- revertToParentFromEnterAttribute(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
+ revertToParentFromEnterAttribute(text.trim().equals("qualified"), super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -114,7 +103,7 @@
switch($_ngcc_current_state) {
case 0:
{
- revertToParentFromLeaveAttribute(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
+ revertToParentFromLeaveAttribute(text.trim().equals("qualified"), super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -130,7 +119,7 @@
switch($_ngcc_current_state) {
case 0:
{
- revertToParentFromText(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $value);
+ revertToParentFromText(text.trim().equals("qualified"), super._cookie, $value);
}
break;
case 1:
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/redefine.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/redefine.java
index 45d2116..4ae9c88 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/redefine.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/redefine.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
@@ -11,20 +11,12 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
+import com.sun.xml.xsom.*;
import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
class redefine extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/wildcardBody.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/wildcardBody.java
index 865415b..0addc2e 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/wildcardBody.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/wildcardBody.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
@@ -11,22 +11,15 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
+import com.sun.xml.xsom.*;
import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import java.util.StringTokenizer;
- import java.util.HashSet;
+
+import java.util.*;
class wildcardBody extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/xpath.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/xpath.java
index 111d1da..a9d4e1d 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/xpath.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/xpath.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
@@ -11,20 +11,11 @@
/* this file is generated by RelaxNGCC */
package com.sun.xml.xsom.impl.parser.state;
import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
import org.xml.sax.Attributes;
-import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
- import com.sun.xml.xsom.*;
- import com.sun.xml.xsom.parser.*;
+import com.sun.xml.xsom.parser.*;
import com.sun.xml.xsom.impl.*;
import com.sun.xml.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
class xpath extends NGCCHandler {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/AbstractAxisImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/AbstractAxisImpl.java
index 0dbb75a..fce2d2c 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/AbstractAxisImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/AbstractAxisImpl.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,11 +51,11 @@
}
protected final Iterator<T> union(T... items) {
- return new Iterators.Array<T>(items);
+ return new Iterators.Array<>(items);
}
protected final Iterator<T> union(Iterator<? extends T> first, Iterator<? extends T> second) {
- return new Iterators.Union<T>(first,second);
+ return new Iterators.Union<>(first, second);
}
public Iterator<T> iterator(XSComponent contextNode) {
@@ -151,7 +151,7 @@
public Iterator<T> modelGroup(XSModelGroup group) {
// compensate for particles that are ignored in SCD
- return new Iterators.Map<T,XSParticle>(group.iterator()) {
+ return new Iterators.Map<>(group.iterator()) {
protected Iterator<? extends T> apply(XSParticle p) {
return particle(p);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Axis.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Axis.java
index ffcd12b..0fbf345 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Axis.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Axis.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
@@ -61,13 +61,13 @@
* Pseudo-axis that selects all the {@link XSSchema}s in the current set.
* Used to implement the absolute path expression
*/
- public static final Axis<XSSchema> ROOT = new Axis<XSSchema>() {
+ Axis<XSSchema> ROOT = new Axis<>() {
public Iterator<XSSchema> iterator(XSComponent contextNode) {
return contextNode.getRoot().iterateSchema();
}
public Iterator<XSSchema> iterator(Iterator<? extends XSComponent> contextNodes) {
- if(!contextNodes.hasNext())
+ if (!contextNodes.hasNext())
return Iterators.empty();
else
// this assumes that all current nodes belong to the same owner.
@@ -92,14 +92,14 @@
* <li>combination of above.
* </ol>
*/
- public static final Axis<XSComponent> INTERMEDIATE_SKIP = new AbstractAxisImpl<XSComponent>() {
+ Axis<XSComponent> INTERMEDIATE_SKIP = new AbstractAxisImpl<>() {
public Iterator<XSComponent> elementDecl(XSElementDecl decl) {
XSComplexType ct = decl.getType().asComplexType();
- if(ct==null)
+ if (ct == null)
return empty();
else {
// also pick up model groups inside this complex type
- return new Iterators.Union<XSComponent>(singleton(ct),complexType(ct));
+ return new Iterators.Union<>(singleton(ct), complexType(ct));
}
}
@@ -117,8 +117,8 @@
private Iterator<XSComponent> descendants(XSModelGroup mg) {
// TODO: write a tree iterator
// for now, we do it eagerly because I'm lazy
- List<XSComponent> r = new ArrayList<XSComponent>();
- visit(mg,r);
+ List<XSComponent> r = new ArrayList<>();
+ visit(mg, r);
return r.iterator();
}
@@ -127,8 +127,8 @@
r.add(mg);
for (XSParticle p : mg) {
XSModelGroup child = p.getTerm().asModelGroup();
- if(child!=null)
- visit(child,r);
+ if (child != null)
+ visit(child, r);
}
}
@@ -143,10 +143,11 @@
* So far the default axes together are guaranteed not to cause any cycle, so
* no cycle check is needed (if it's needed, the life would be much harder!)
*/
- public static final Axis<XSComponent> DESCENDANTS = new Axis<XSComponent>() {
+ Axis<XSComponent> DESCENDANTS = new Axis<>() {
public Iterator<XSComponent> iterator(XSComponent contextNode) {
return new Visitor().iterator(contextNode);
}
+
public Iterator<XSComponent> iterator(Iterator<? extends XSComponent> contextNodes) {
return new Visitor().iterator(contextNodes);
}
@@ -159,12 +160,12 @@
* Stateful visitor that remembers what's already traversed, to reduce the search space.
*/
final class Visitor extends AbstractAxisImpl<XSComponent> {
- private final Set<XSComponent> visited = new HashSet<XSComponent>();
+ private final Set<XSComponent> visited = new HashSet<>();
/**
* Recursively apply the {@link Axis#DESCENDANTS} axis.
*/
- final class Recursion extends Iterators.Map<XSComponent,XSComponent> {
+ final class Recursion extends Iterators.Map<XSComponent, XSComponent> {
public Recursion(Iterator<? extends XSComponent> core) {
super(core);
}
@@ -173,78 +174,79 @@
return DESCENDANTS.iterator(u);
}
}
+
public Iterator<XSComponent> schema(XSSchema schema) {
- if(visited.add(schema))
- return ret( schema, new Recursion(schema.iterateElementDecls()));
+ if (visited.add(schema))
+ return ret(schema, new Recursion(schema.iterateElementDecls()));
else
return empty();
}
public Iterator<XSComponent> elementDecl(XSElementDecl decl) {
- if(visited.add(decl))
- return ret(decl, iterator(decl.getType()) );
+ if (visited.add(decl))
+ return ret(decl, iterator(decl.getType()));
else
return empty();
}
public Iterator<XSComponent> simpleType(XSSimpleType type) {
- if(visited.add(type))
+ if (visited.add(type))
return ret(type, FACET.iterator(type));
else
return empty();
}
public Iterator<XSComponent> complexType(XSComplexType type) {
- if(visited.add(type))
+ if (visited.add(type))
return ret(type, iterator(type.getContentType()));
else
return empty();
}
public Iterator<XSComponent> particle(XSParticle particle) {
- if(visited.add(particle))
+ if (visited.add(particle))
return ret(particle, iterator(particle.getTerm()));
else
return empty();
}
public Iterator<XSComponent> modelGroupDecl(XSModelGroupDecl decl) {
- if(visited.add(decl))
+ if (visited.add(decl))
return ret(decl, iterator(decl.getModelGroup()));
else
return empty();
}
public Iterator<XSComponent> modelGroup(XSModelGroup group) {
- if(visited.add(group))
+ if (visited.add(group))
return ret(group, new Recursion(group.iterator()));
else
return empty();
}
public Iterator<XSComponent> attGroupDecl(XSAttGroupDecl decl) {
- if(visited.add(decl))
+ if (visited.add(decl))
return ret(decl, new Recursion(decl.iterateAttributeUses()));
else
return empty();
}
public Iterator<XSComponent> attributeUse(XSAttributeUse use) {
- if(visited.add(use))
+ if (visited.add(use))
return ret(use, iterator(use.getDecl()));
else
return empty();
}
public Iterator<XSComponent> attributeDecl(XSAttributeDecl decl) {
- if(visited.add(decl))
+ if (visited.add(decl))
return ret(decl, iterator(decl.getType()));
else
return empty();
}
- private Iterator<XSComponent> ret( XSComponent one, Iterator<? extends XSComponent> rest ) {
- return union(singleton(one),rest);
+ private Iterator<XSComponent> ret(XSComponent one, Iterator<? extends XSComponent> rest) {
+ return union(singleton(one), rest);
}
}
@@ -253,13 +255,13 @@
}
};
- public static final Axis<XSSchema> X_SCHEMA = new Axis<XSSchema>() {
+ Axis<XSSchema> X_SCHEMA = new Axis<>() {
public Iterator<XSSchema> iterator(XSComponent contextNode) {
return Iterators.singleton(contextNode.getOwnerSchema());
}
public Iterator<XSSchema> iterator(Iterator<? extends XSComponent> contextNodes) {
- return new Iterators.Adapter<XSSchema,XSComponent>(contextNodes) {
+ return new Iterators.Adapter<XSSchema, XSComponent>(contextNodes) {
protected XSSchema filter(XSComponent u) {
return u.getOwnerSchema();
}
@@ -275,7 +277,7 @@
}
};
- public static final Axis<XSElementDecl> SUBSTITUTION_GROUP = new AbstractAxisImpl<XSElementDecl>() {
+ Axis<XSElementDecl> SUBSTITUTION_GROUP = new AbstractAxisImpl<>() {
public Iterator<XSElementDecl> elementDecl(XSElementDecl decl) {
return singleton(decl.getSubstAffiliation());
}
@@ -285,7 +287,7 @@
}
};
- public static final Axis<XSAttributeDecl> ATTRIBUTE = new AbstractAxisImpl<XSAttributeDecl>() {
+ Axis<XSAttributeDecl> ATTRIBUTE = new AbstractAxisImpl<>() {
public Iterator<XSAttributeDecl> complexType(XSComplexType type) {
return attributeHolder(type);
}
@@ -296,7 +298,7 @@
private Iterator<XSAttributeDecl> attributeHolder(final XSAttContainer atts) {
// TODO: check spec. is this correct?
- return new Iterators.Adapter<XSAttributeDecl,XSAttributeUse>(atts.iterateAttributeUses()) {
+ return new Iterators.Adapter<XSAttributeDecl, XSAttributeUse>(atts.iterateAttributeUses()) {
protected XSAttributeDecl filter(XSAttributeUse u) {
return u.getDecl();
}
@@ -312,7 +314,7 @@
}
};
- public static final Axis<XSElementDecl> ELEMENT = new AbstractAxisImpl<XSElementDecl>() {
+ Axis<XSElementDecl> ELEMENT = new AbstractAxisImpl<>() {
public Iterator<XSElementDecl> particle(XSParticle particle) {
return singleton(particle.getTerm().asElementDecl());
}
@@ -344,7 +346,7 @@
};
- public static final Axis<XSType> TYPE_DEFINITION = new AbstractAxisImpl<XSType>() {
+ Axis<XSType> TYPE_DEFINITION = new AbstractAxisImpl<>() {
public Iterator<XSType> schema(XSSchema schema) {
return schema.iterateTypes();
}
@@ -362,7 +364,7 @@
}
};
- public static final Axis<XSType> BASETYPE = new AbstractAxisImpl<XSType>() {
+ Axis<XSType> BASETYPE = new AbstractAxisImpl<>() {
public Iterator<XSType> simpleType(XSSimpleType type) {
return singleton(type.getBaseType());
}
@@ -376,7 +378,7 @@
}
};
- public static final Axis<XSSimpleType> PRIMITIVE_TYPE = new AbstractAxisImpl<XSSimpleType>() {
+ Axis<XSSimpleType> PRIMITIVE_TYPE = new AbstractAxisImpl<>() {
public Iterator<XSSimpleType> simpleType(XSSimpleType type) {
return singleton(type.getPrimitiveType());
}
@@ -386,10 +388,10 @@
}
};
- public static final Axis<XSSimpleType> ITEM_TYPE = new AbstractAxisImpl<XSSimpleType>() {
+ Axis<XSSimpleType> ITEM_TYPE = new AbstractAxisImpl<>() {
public Iterator<XSSimpleType> simpleType(XSSimpleType type) {
XSListSimpleType baseList = type.getBaseListType();
- if(baseList==null) return empty();
+ if (baseList == null) return empty();
return singleton(baseList.getItemType());
}
@@ -398,10 +400,10 @@
}
};
- public static final Axis<XSSimpleType> MEMBER_TYPE = new AbstractAxisImpl<XSSimpleType>() {
+ Axis<XSSimpleType> MEMBER_TYPE = new AbstractAxisImpl<>() {
public Iterator<XSSimpleType> simpleType(XSSimpleType type) {
XSUnionSimpleType baseUnion = type.getBaseUnionType();
- if(baseUnion ==null) return empty();
+ if (baseUnion == null) return empty();
return baseUnion.iterator();
}
@@ -410,7 +412,7 @@
}
};
- public static final Axis<XSComponent> SCOPE = new AbstractAxisImpl<XSComponent>() {
+ Axis<XSComponent> SCOPE = new AbstractAxisImpl<>() {
public Iterator<XSComponent> complexType(XSComplexType type) {
return singleton(type.getScope());
}
@@ -422,7 +424,7 @@
}
};
- public static final Axis<XSAttGroupDecl> ATTRIBUTE_GROUP = new AbstractAxisImpl<XSAttGroupDecl>() {
+ Axis<XSAttGroupDecl> ATTRIBUTE_GROUP = new AbstractAxisImpl<>() {
public Iterator<XSAttGroupDecl> schema(XSSchema schema) {
return schema.iterateAttGroupDecls();
}
@@ -432,7 +434,7 @@
}
};
- public static final Axis<XSModelGroupDecl> MODEL_GROUP_DECL = new AbstractAxisImpl<XSModelGroupDecl>() {
+ Axis<XSModelGroupDecl> MODEL_GROUP_DECL = new AbstractAxisImpl<>() {
public Iterator<XSModelGroupDecl> schema(XSSchema schema) {
return schema.iterateModelGroupDecls();
}
@@ -446,7 +448,7 @@
}
};
- public static final Axis<XSIdentityConstraint> IDENTITY_CONSTRAINT = new AbstractAxisImpl<XSIdentityConstraint>() {
+ Axis<XSIdentityConstraint> IDENTITY_CONSTRAINT = new AbstractAxisImpl<>() {
public Iterator<XSIdentityConstraint> elementDecl(XSElementDecl decl) {
return decl.getIdentityConstraints().iterator();
}
@@ -461,7 +463,7 @@
}
};
- public static final Axis<XSIdentityConstraint> REFERENCED_KEY = new AbstractAxisImpl<XSIdentityConstraint>() {
+ Axis<XSIdentityConstraint> REFERENCED_KEY = new AbstractAxisImpl<>() {
public Iterator<XSIdentityConstraint> identityConstraint(XSIdentityConstraint decl) {
return singleton(decl.getReferencedKey());
}
@@ -471,7 +473,7 @@
}
};
- public static final Axis<XSNotation> NOTATION = new AbstractAxisImpl<XSNotation>() {
+ Axis<XSNotation> NOTATION = new AbstractAxisImpl<>() {
public Iterator<XSNotation> schema(XSSchema schema) {
return schema.iterateNotations();
}
@@ -481,7 +483,7 @@
}
};
- public static final Axis<XSWildcard> WILDCARD = new AbstractAxisImpl<XSWildcard>() {
+ Axis<XSWildcard> WILDCARD = new AbstractAxisImpl<>() {
public Iterator<XSWildcard> particle(XSParticle particle) {
return singleton(particle.getTerm().asWildcard());
}
@@ -491,7 +493,7 @@
}
};
- public static final Axis<XSWildcard> ATTRIBUTE_WILDCARD = new AbstractAxisImpl<XSWildcard>() {
+ Axis<XSWildcard> ATTRIBUTE_WILDCARD = new AbstractAxisImpl<>() {
public Iterator<XSWildcard> complexType(XSComplexType type) {
return singleton(type.getAttributeWildcard());
}
@@ -505,11 +507,11 @@
}
};
- public static final Axis<XSFacet> FACET = new AbstractAxisImpl<XSFacet>() {
+ Axis<XSFacet> FACET = new AbstractAxisImpl<>() {
public Iterator<XSFacet> simpleType(XSSimpleType type) {
// TODO: it's not clear if "facets" mean all inherited facets or just declared facets
XSRestrictionSimpleType r = type.asRestriction();
- if(r!=null)
+ if (r != null)
return r.iterateDeclaredFacets();
else
return empty();
@@ -520,12 +522,12 @@
}
};
- public static final Axis<XSModelGroup> MODELGROUP_ALL = new ModelGroupAxis(Compositor.ALL);
- public static final Axis<XSModelGroup> MODELGROUP_CHOICE = new ModelGroupAxis(Compositor.CHOICE);
- public static final Axis<XSModelGroup> MODELGROUP_SEQUENCE = new ModelGroupAxis(Compositor.SEQUENCE);
- public static final Axis<XSModelGroup> MODELGROUP_ANY = new ModelGroupAxis(null);
+ Axis<XSModelGroup> MODELGROUP_ALL = new ModelGroupAxis(Compositor.ALL);
+ Axis<XSModelGroup> MODELGROUP_CHOICE = new ModelGroupAxis(Compositor.CHOICE);
+ Axis<XSModelGroup> MODELGROUP_SEQUENCE = new ModelGroupAxis(Compositor.SEQUENCE);
+ Axis<XSModelGroup> MODELGROUP_ANY = new ModelGroupAxis(null);
- static final class ModelGroupAxis extends AbstractAxisImpl<XSModelGroup> {
+ final class ModelGroupAxis extends AbstractAxisImpl<XSModelGroup> {
private final XSModelGroup.Compositor compositor;
ModelGroupAxis(Compositor compositor) {
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Iterators.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Iterators.java
index aa76ef3..749a472 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Iterators.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Iterators.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,7 +36,7 @@
}
public static <T> Iterator<T> singleton(T value) {
- return new Singleton<T>(value);
+ return new Singleton<>(value);
}
/**
@@ -148,7 +148,7 @@
* Only return unique items.
*/
static final class Unique<T> extends Filter<T> {
- private Set<T> values = new HashSet<T>();
+ private Set<T> values = new HashSet<>();
public Unique(Iterator<? extends T> core) {
super(core);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/ParseException.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/ParseException.java
index 0f64b8b..75b70c9 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/ParseException.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/ParseException.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
@@ -110,7 +110,7 @@
if (!specialConstructor) {
return super.getMessage();
}
- StringBuffer expected = new StringBuffer();
+ StringBuilder expected = new StringBuilder();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
if (maxSize < expectedTokenSequences[i].length) {
@@ -124,26 +124,26 @@
}
expected.append(eol).append(" ");
}
- String retval = "Encountered \"";
+ StringBuilder retval = new StringBuilder("Encountered \"");
Token tok = currentToken.next;
for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += " ";
+ if (i != 0) retval.append(" ");
if (tok.kind == 0) {
- retval += tokenImage.get(0);
+ retval.append(tokenImage.get(0));
break;
}
- retval += add_escapes(tok.image);
+ retval.append(add_escapes(tok.image));
tok = tok.next;
}
- retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
- retval += "." + eol;
+ retval.append("\" at line ").append(currentToken.next.beginLine).append(", column ").append(currentToken.next.beginColumn);
+ retval.append(".").append(eol);
if (expectedTokenSequences.length == 1) {
- retval += "Was expecting:" + eol + " ";
+ retval.append("Was expecting:").append(eol).append(" ");
} else {
- retval += "Was expecting one of:" + eol + " ";
+ retval.append("Was expecting one of:").append(eol).append(" ");
}
- retval += expected.toString();
- return retval;
+ retval.append(expected);
+ return retval.toString();
}
/**
@@ -157,7 +157,7 @@
* string literal.
*/
protected String add_escapes(String str) {
- StringBuffer retval = new StringBuffer();
+ StringBuilder retval = new StringBuilder();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
@@ -183,7 +183,7 @@
retval.append("\\\"");
continue;
case '\'':
- retval.append("\\\'");
+ retval.append("\\'");
continue;
case '\\':
retval.append("\\\\");
@@ -191,7 +191,7 @@
default:
if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+ retval.append("\\u").append(s.substring(s.length() - 4));
} else {
retval.append(ch);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDImpl.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDImpl.java
index 8d3f27a..3db12f1 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDImpl.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDImpl.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,14 +47,14 @@
// TODO: this step is not needed if the next step is known not to react to
// complex type nor model groups, such as, say Axis.FACET
- nodeSet = new Iterators.Unique<XSComponent>(
- new Iterators.Map<XSComponent,XSComponent>(nodeSet) {
- protected Iterator<XSComponent> apply(XSComponent u) {
- return new Iterators.Union<XSComponent>(
- Iterators.singleton(u),
- Axis.INTERMEDIATE_SKIP.iterator(u) );
+ nodeSet = new Iterators.Unique<>(
+ new Iterators.Map<>(nodeSet) {
+ protected Iterator<XSComponent> apply(XSComponent u) {
+ return new Iterators.Union<>(
+ Iterators.singleton(u),
+ Axis.INTERMEDIATE_SKIP.iterator(u));
+ }
}
- }
);
}
nodeSet = steps[i].evaluate(nodeSet);
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParser.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParser.java
index f5e0d0b..b3a95b5 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParser.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParser.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
@@ -460,7 +460,7 @@
for (int i = 0; i < 19; i++) jj_la1[i] = -1;
}
- final private Token jj_consume_token(int kind) throws ParseException {
+ private Token jj_consume_token(int kind) throws ParseException {
Token oldToken;
if ((oldToken = token).next != null) token = token.next;
else token = token.next = token_source.getNextToken();
@@ -491,7 +491,7 @@
return t;
}
- final private int jj_ntk() {
+ private int jj_ntk() {
if ((jj_nt=token.next) == null)
return (jj_ntk = (token.next=token_source.getNextToken()).kind);
else
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParserConstants.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParserConstants.java
index ad87625..3a53eb2 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParserConstants.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParserConstants.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,54 +30,52 @@
int DEFAULT = 0;
-static final List<String> tokenImage = Collections.unmodifiableList(Arrays.asList(
- new String[] {
- "<EOF>",
- "\" \"",
- "\"\\t\"",
- "\"\\n\"",
- "\"\\r\"",
- "\"\\f\"",
- "<Letter>",
- "<BaseChar>",
- "<Ideographic>",
- "<CombiningChar>",
- "<UnicodeDigit>",
- "<Extender>",
- "<NCNAME>",
- "<NUMBER>",
- "<FACETNAME>",
- "\":\"",
- "\"/\"",
- "\"//\"",
- "\"attribute::\"",
- "\"@\"",
- "\"element::\"",
- "\"substitutionGroup::\"",
- "\"type::\"",
- "\"~\"",
- "\"baseType::\"",
- "\"primitiveType::\"",
- "\"itemType::\"",
- "\"memberType::\"",
- "\"scope::\"",
- "\"attributeGroup::\"",
- "\"group::\"",
- "\"identityContraint::\"",
- "\"key::\"",
- "\"notation::\"",
- "\"model::sequence\"",
- "\"model::choice\"",
- "\"model::all\"",
- "\"model::*\"",
- "\"any::*\"",
- "\"anyAttribute::*\"",
- "\"facet::*\"",
- "\"facet::\"",
- "\"component::*\"",
- "\"x-schema::\"",
- "\"x-schema::*\"",
- "\"*\"",
- "\"0\"",
- }));
+List<String> tokenImage = Collections.unmodifiableList(Arrays.asList(
+ "<EOF>",
+ "\" \"",
+ "\"\\t\"",
+ "\"\\n\"",
+ "\"\\r\"",
+ "\"\\f\"",
+ "<Letter>",
+ "<BaseChar>",
+ "<Ideographic>",
+ "<CombiningChar>",
+ "<UnicodeDigit>",
+ "<Extender>",
+ "<NCNAME>",
+ "<NUMBER>",
+ "<FACETNAME>",
+ "\":\"",
+ "\"/\"",
+ "\"//\"",
+ "\"attribute::\"",
+ "\"@\"",
+ "\"element::\"",
+ "\"substitutionGroup::\"",
+ "\"type::\"",
+ "\"~\"",
+ "\"baseType::\"",
+ "\"primitiveType::\"",
+ "\"itemType::\"",
+ "\"memberType::\"",
+ "\"scope::\"",
+ "\"attributeGroup::\"",
+ "\"group::\"",
+ "\"identityContraint::\"",
+ "\"key::\"",
+ "\"notation::\"",
+ "\"model::sequence\"",
+ "\"model::choice\"",
+ "\"model::all\"",
+ "\"model::*\"",
+ "\"any::*\"",
+ "\"anyAttribute::*\"",
+ "\"facet::*\"",
+ "\"facet::\"",
+ "\"component::*\"",
+ "\"x-schema::\"",
+ "\"x-schema::*\"",
+ "\"*\"",
+ "\"0\""));
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParserTokenManager.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParserTokenManager.java
index 7a4a7e4..f4570eb 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParserTokenManager.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SCDParserTokenManager.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
@@ -10,16 +10,12 @@
/* Generated By:JavaCC: Do not edit this line. SCDParserTokenManager.java */
package com.sun.xml.xsom.impl.scd;
-import java.util.*;
-import java.io.*;
-import com.sun.xml.xsom.impl.UName;
-import javax.xml.namespace.*;
public class SCDParserTokenManager implements SCDParserConstants
{
public java.io.PrintStream debugStream = System.out;
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
+private int jjStopStringLiteralDfa_0(int pos, long active0)
{
switch (pos)
{
@@ -507,17 +503,17 @@
return -1;
}
}
-private final int jjStartNfa_0(int pos, long active0)
+private int jjStartNfa_0(int pos, long active0)
{
return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
}
-private final int jjStopAtPos(int pos, int kind)
+private int jjStopAtPos(int pos, int kind)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
return pos + 1;
}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
+private int jjStartNfaWithStates_0(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
@@ -525,7 +521,7 @@
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_0(state, pos + 1);
}
-private final int jjMoveStringLiteralDfa0_0()
+private int jjMoveStringLiteralDfa0_0()
{
switch(curChar)
{
@@ -574,7 +570,7 @@
return jjMoveNfa_0(0, 0);
}
}
-private final int jjMoveStringLiteralDfa1_0(long active0)
+private int jjMoveStringLiteralDfa1_0(long active0)
{
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
@@ -616,7 +612,7 @@
}
return jjStartNfa_0(0, active0);
}
-private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
+private int jjMoveStringLiteralDfa2_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(0, old0);
@@ -654,7 +650,7 @@
}
return jjStartNfa_0(1, active0);
}
-private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
+private int jjMoveStringLiteralDfa3_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(1, old0);
@@ -694,7 +690,7 @@
}
return jjStartNfa_0(2, active0);
}
-private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
+private int jjMoveStringLiteralDfa4_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(2, old0);
@@ -730,7 +726,7 @@
}
return jjStartNfa_0(3, active0);
}
-private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
+private int jjMoveStringLiteralDfa5_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(3, old0);
@@ -768,7 +764,7 @@
}
return jjStartNfa_0(4, active0);
}
-private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
+private int jjMoveStringLiteralDfa6_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(4, old0);
@@ -813,7 +809,7 @@
}
return jjStartNfa_0(5, active0);
}
-private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
+private int jjMoveStringLiteralDfa7_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(5, old0);
@@ -857,7 +853,7 @@
}
return jjStartNfa_0(6, active0);
}
-private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
+private int jjMoveStringLiteralDfa8_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(6, old0);
@@ -891,7 +887,7 @@
}
return jjStartNfa_0(7, active0);
}
-private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
+private int jjMoveStringLiteralDfa9_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(7, old0);
@@ -938,7 +934,7 @@
}
return jjStartNfa_0(8, active0);
}
-private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
+private int jjMoveStringLiteralDfa10_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(8, old0);
@@ -976,7 +972,7 @@
}
return jjStartNfa_0(9, active0);
}
-private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
+private int jjMoveStringLiteralDfa11_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(9, old0);
@@ -1012,7 +1008,7 @@
}
return jjStartNfa_0(10, active0);
}
-private final int jjMoveStringLiteralDfa12_0(long old0, long active0)
+private int jjMoveStringLiteralDfa12_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(10, old0);
@@ -1042,7 +1038,7 @@
}
return jjStartNfa_0(11, active0);
}
-private final int jjMoveStringLiteralDfa13_0(long old0, long active0)
+private int jjMoveStringLiteralDfa13_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(11, old0);
@@ -1068,7 +1064,7 @@
}
return jjStartNfa_0(12, active0);
}
-private final int jjMoveStringLiteralDfa14_0(long old0, long active0)
+private int jjMoveStringLiteralDfa14_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(12, old0);
@@ -1100,7 +1096,7 @@
}
return jjStartNfa_0(13, active0);
}
-private final int jjMoveStringLiteralDfa15_0(long old0, long active0)
+private int jjMoveStringLiteralDfa15_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(13, old0);
@@ -1124,7 +1120,7 @@
}
return jjStartNfa_0(14, active0);
}
-private final int jjMoveStringLiteralDfa16_0(long old0, long active0)
+private int jjMoveStringLiteralDfa16_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(14, old0);
@@ -1144,7 +1140,7 @@
}
return jjStartNfa_0(15, active0);
}
-private final int jjMoveStringLiteralDfa17_0(long old0, long active0)
+private int jjMoveStringLiteralDfa17_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(15, old0);
@@ -1162,7 +1158,7 @@
}
return jjStartNfa_0(16, active0);
}
-private final int jjMoveStringLiteralDfa18_0(long old0, long active0)
+private int jjMoveStringLiteralDfa18_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(16, old0);
@@ -1184,7 +1180,7 @@
}
return jjStartNfa_0(17, active0);
}
-private final void jjCheckNAdd(int state)
+private void jjCheckNAdd(int state)
{
if (jjrounds[state] != jjround)
{
@@ -1192,24 +1188,24 @@
jjrounds[state] = jjround;
}
}
-private final void jjAddStates(int start, int end)
+private void jjAddStates(int start, int end)
{
do {
jjstateSet[jjnewStateCnt++] = jjnextStates[start];
} while (start++ != end);
}
-private final void jjCheckNAddTwoStates(int state1, int state2)
+private void jjCheckNAddTwoStates(int state1, int state2)
{
jjCheckNAdd(state1);
jjCheckNAdd(state2);
}
-private final void jjCheckNAddStates(int start, int end)
+private void jjCheckNAddStates(int start, int end)
{
do {
jjCheckNAdd(jjnextStates[start]);
} while (start++ != end);
}
-private final void jjCheckNAddStates(int start)
+private void jjCheckNAddStates(int start)
{
jjCheckNAdd(jjnextStates[start]);
jjCheckNAdd(jjnextStates[start + 1]);
@@ -1331,7 +1327,7 @@
static final long[] jjbitVec39 = {
0x3efffe000000a0L, 0xfffffffffffffffeL, 0xfffffffe661fffffL, 0x77ffffffffffffffL
};
-private final int jjMoveNfa_0(int startState, int curPos)
+private int jjMoveNfa_0(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
@@ -2084,7 +2080,7 @@
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = curChar >> 8;
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -2177,7 +2173,7 @@
static final int[] jjnextStates = {
3, 4, 103, 113, 123, 133, 140, 147,
};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
+private static boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
switch(hiByte)
{
@@ -2233,7 +2229,7 @@
return false;
}
}
-private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
+private static boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
{
switch(hiByte)
{
@@ -2334,7 +2330,7 @@
input_stream = stream;
ReInitRounds();
}
-private final void ReInitRounds()
+private void ReInitRounds()
{
int i;
jjround = 0x80000001;
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SimpleCharStream.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SimpleCharStream.java
index af229e7..725d161 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SimpleCharStream.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SimpleCharStream.java
@@ -23,8 +23,8 @@
int available;
int tokenBegin;
public int bufpos = -1;
- protected int bufline[];
- protected int bufcolumn[];
+ protected int[] bufline;
+ protected int[] bufcolumn;
protected int column = 0;
protected int line = 1;
@@ -46,8 +46,8 @@
protected void ExpandBuff(boolean wrapAround)
{
char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
+ int[] newbufline = new int[bufsize + 2048];
+ int[] newbufcolumn = new int[bufsize + 2048];
try
{
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Step.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Step.java
index d5c63f2..91bbbd3 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Step.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/Step.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
@@ -53,14 +53,14 @@
*/
public final Iterator<T> evaluate(Iterator<XSComponent> nodeSet) {
// list up the whole thing
- Iterator<T> r = new Iterators.Map<T,XSComponent>(nodeSet) {
+ Iterator<T> r = new Iterators.Map<>(nodeSet) {
protected Iterator<? extends T> apply(XSComponent contextNode) {
return filter(axis.iterator(contextNode));
}
};
// avoid duplicates
- r = new Iterators.Unique<T>(r);
+ r = new Iterators.Unique<>(r);
if(predicate>=0) {
T item=null;
@@ -69,7 +69,7 @@
return Iterators.empty();
item = r.next();
}
- return new Iterators.Singleton<T>(item);
+ return new Iterators.Singleton<>(item);
}
return r;
@@ -95,7 +95,7 @@
}
protected Iterator<T> filter(Iterator<? extends T> base) {
- return new Iterators.Filter<T>(base) {
+ return new Iterators.Filter<>(base) {
protected boolean matches(T d) {
return match(d);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/TokenMgrError.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/TokenMgrError.java
index b29289e..288fd45 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/TokenMgrError.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/TokenMgrError.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 @@
* equivalents in the given string
*/
protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
+ StringBuilder retval = new StringBuilder();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
@@ -74,7 +74,7 @@
retval.append("\\\"");
continue;
case '\'':
- retval.append("\\\'");
+ retval.append("\\'");
continue;
case '\\':
retval.append("\\\\");
@@ -82,7 +82,7 @@
default:
if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+ retval.append("\\u").append(s.substring(s.length() - 4));
} else {
retval.append(ch);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/util/SchemaTreeTraverser.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/util/SchemaTreeTraverser.java
index 042da2a..e2f097d 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/util/SchemaTreeTraverser.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/util/SchemaTreeTraverser.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
@@ -469,9 +469,8 @@
else {
// reference to a global one
String str = MessageFormat.format(
- "Attribute ref \"'{'{0}'}'{1}{2}\"", new Object[]{
- decl.getTargetNamespace(), decl.getName(),
- additionalAtts});
+ "Attribute ref \"'{'{0}'}'{1}{2}\"", decl.getTargetNamespace(), decl.getName(),
+ additionalAtts);
SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
this.currNode.add(newNode);
}
@@ -494,17 +493,15 @@
XSSimpleType type = decl.getType();
String str = MessageFormat.format("Attribute \"{0}\"{1}{2}{3}{4}",
- new Object[]{
- decl.getName(),
- additionalAtts,
- type.isLocal() ? "" : MessageFormat.format(
- " type=\"'{'{0}'}'{1}\"", new Object[]{
- type.getTargetNamespace(),
- type.getName()}),
- decl.getFixedValue() == null ? "" : " fixed=\""
- + decl.getFixedValue() + "\"",
- decl.getDefaultValue() == null ? "" : " default=\""
- + decl.getDefaultValue() + "\""});
+ decl.getName(),
+ additionalAtts,
+ type.isLocal() ? "" : MessageFormat.format(
+ " type=\"'{'{0}'}'{1}\"", type.getTargetNamespace(),
+ type.getName()),
+ decl.getFixedValue() == null ? "" : " fixed=\""
+ + decl.getFixedValue() + "\"",
+ decl.getDefaultValue() == null ? "" : " default=\""
+ + decl.getDefaultValue() + "\"");
SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
this.currNode.add(newNode);
@@ -522,8 +519,8 @@
public void simpleType(XSSimpleType type) {
String str = MessageFormat.format("Simple type {0}",
- new Object[]{type.isLocal() ? "" : " name=\""
- + type.getName() + "\""});
+ type.isLocal() ? "" : " name=\""
+ + type.getName() + "\"");
SchemaTreeNode newNode = new SchemaTreeNode(str, type.getLocator());
this.currNode.add(newNode);
@@ -551,8 +548,8 @@
else {
// global type
String str = MessageFormat.format("List itemType=\"'{'{0}'}'{1}\"",
- new Object[]{itemType.getTargetNamespace(),
- itemType.getName()});
+ itemType.getTargetNamespace(),
+ itemType.getName());
SchemaTreeNode newNode = new SchemaTreeNode(str, itemType
.getLocator());
this.currNode.add(newNode);
@@ -564,15 +561,14 @@
*/
public void unionSimpleType(XSUnionSimpleType type) {
final int len = type.getMemberSize();
- StringBuffer ref = new StringBuffer();
+ StringBuilder ref = new StringBuilder();
for (int i = 0; i < len; i++) {
XSSimpleType member = type.getMember(i);
if (member.isGlobal()) {
ref.append(MessageFormat.format(" '{'{0}'}'{1}",
- new Object[]{
- member.getTargetNamespace(),
- member.getName()}));
+ member.getTargetNamespace(),
+ member.getName()));
}
}
@@ -610,9 +606,9 @@
XSSimpleType baseType = type.getSimpleBaseType();
String str = MessageFormat.format("Restriction {0}",
- new Object[]{baseType.isLocal() ? "" : " base=\"{"
+ baseType.isLocal() ? "" : " base=\"{"
+ baseType.getTargetNamespace() + "}"
- + baseType.getName() + "\""});
+ + baseType.getName() + "\"");
SchemaTreeNode newNode = new SchemaTreeNode(str, baseType.getLocator());
this.currNode.add(newNode);
@@ -635,8 +631,8 @@
*/
public void facet(XSFacet facet) {
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "{0} value=\"{1}\"", new Object[]{facet.getName(),
- facet.getValue(), }),
+ "{0} value=\"{1}\"", facet.getName(),
+ facet.getValue()),
facet.getLocator());
this.currNode.add(newNode);
}
@@ -647,8 +643,8 @@
public void notation(XSNotation notation) {
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
"Notation name='\"0}\" public =\"{1}\" system=\"{2}\"",
- new Object[]{notation.getName(), notation.getPublicId(),
- notation.getSystemId()}), notation.getLocator());
+ notation.getName(), notation.getPublicId(),
+ notation.getSystemId()), notation.getLocator());
this.currNode.add(newNode);
}
@@ -657,8 +653,8 @@
*/
public void complexType(XSComplexType type) {
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "ComplexType {0}", new Object[]{type.isLocal() ? ""
- : " name=\"" + type.getName() + "\""}), type
+ "ComplexType {0}", type.isLocal() ? ""
+ : " name=\"" + type.getName() + "\""), type
.getLocator());
this.currNode.add(newNode);
this.currNode = newNode;
@@ -677,9 +673,8 @@
if (type.getDerivationMethod() == XSType.RESTRICTION) {
// restriction
String str = MessageFormat.format(
- "Restriction base=\"<{0}>{1}\"", new Object[]{
- baseType.getTargetNamespace(),
- baseType.getName()});
+ "Restriction base=\"<{0}>{1}\"", baseType.getTargetNamespace(),
+ baseType.getName());
SchemaTreeNode newNode3 = new SchemaTreeNode(str, baseType
.getLocator());
this.currNode.add(newNode3);
@@ -692,9 +687,8 @@
else {
// extension
String str = MessageFormat.format(
- "Extension base=\"<{0}>{1}\"", new Object[]{
- baseType.getTargetNamespace(),
- baseType.getName()});
+ "Extension base=\"<{0}>{1}\"", baseType.getTargetNamespace(),
+ baseType.getName());
SchemaTreeNode newNode3 = new SchemaTreeNode(str, baseType
.getLocator());
this.currNode.add(newNode3);
@@ -734,9 +728,8 @@
if (type.getDerivationMethod() == XSType.RESTRICTION) {
// restriction
String str = MessageFormat.format(
- "Restriction base=\"<{0}>{1}\"", new Object[]{
- baseType.getTargetNamespace(),
- baseType.getName()});
+ "Restriction base=\"<{0}>{1}\"", baseType.getTargetNamespace(),
+ baseType.getName());
SchemaTreeNode newNode3 = new SchemaTreeNode(str,
baseType.getLocator());
this.currNode.add(newNode3);
@@ -750,9 +743,8 @@
else {
// extension
String str = MessageFormat.format(
- "Extension base=\"'{'{0}'}'{1}\"", new Object[]{
- baseType.getTargetNamespace(),
- baseType.getName()});
+ "Extension base=\"'{'{0}'}'{1}\"", baseType.getTargetNamespace(),
+ baseType.getName());
SchemaTreeNode newNode3 = new SchemaTreeNode(str,
baseType.getLocator());
this.currNode.add(newNode3);
@@ -823,11 +815,10 @@
// TODO: various other attributes
String str = MessageFormat.format("Element name=\"{0}\"{1}{2}",
- new Object[]{
- decl.getName(),
- type.isLocal() ? "" : " type=\"{"
- + type.getTargetNamespace() + "}"
- + type.getName() + "\"", extraAtts});
+ decl.getName(),
+ type.isLocal() ? "" : " type=\"{"
+ + type.getTargetNamespace() + "}"
+ + type.getName() + "\"", extraAtts);
SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
this.currNode.add(newNode);
@@ -847,7 +838,7 @@
*/
public void modelGroupDecl(XSModelGroupDecl decl) {
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "Group name=\"{0}\"", new Object[]{decl.getName()}),
+ "Group name=\"{0}\"", decl.getName()),
decl.getLocator());
this.currNode.add(newNode);
this.currNode = newNode;
@@ -872,7 +863,7 @@
*/
private void modelGroup(XSModelGroup group, String extraAtts) {
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "{0}{1}", new Object[]{group.getCompositor(), extraAtts}),
+ "{0}{1}", group.getCompositor(), extraAtts),
group.getLocator());
this.currNode.add(newNode);
this.currNode = newNode;
@@ -891,7 +882,7 @@
public void particle(XSParticle part) {
BigInteger i;
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
i = part.getMaxOccurs();
if (i.equals(BigInteger.valueOf(XSParticle.UNBOUNDED))) {
@@ -899,13 +890,13 @@
}
else {
if (!i.equals(BigInteger.ONE)) {
- buf.append(" maxOccurs=\"" + i + "\"");
+ buf.append(" maxOccurs=\"").append(i).append("\"");
}
}
i = part.getMinOccurs();
if (!i.equals(BigInteger.ONE)) {
- buf.append(" minOccurs=\"" + i + "\"");
+ buf.append(" minOccurs=\"").append(i).append("\"");
}
final String extraAtts = buf.toString();
@@ -919,8 +910,8 @@
// reference
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat
.format("Element ref=\"'{'{0}'}'{1}\"{2}",
- new Object[]{decl.getTargetNamespace(),
- decl.getName(), extraAtts}),
+ decl.getTargetNamespace(),
+ decl.getName(), extraAtts),
decl.getLocator());
currNode.add(newNode);
}
@@ -929,9 +920,8 @@
public void modelGroupDecl(XSModelGroupDecl decl) {
// reference
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat
- .format("Group ref=\"'{'{0}'}'{1}\"{2}", new Object[]{
- decl.getTargetNamespace(), decl.getName(),
- extraAtts}), decl.getLocator());
+ .format("Group ref=\"'{'{0}'}'{1}\"{2}", decl.getTargetNamespace(), decl.getName(),
+ extraAtts), decl.getLocator());
currNode.add(newNode);
}
@@ -961,7 +951,7 @@
private void wildcard(XSWildcard wc, String extraAtts) {
// TODO
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "Any ", new Object[]{extraAtts}), wc.getLocator());
+ "Any ", extraAtts), wc.getLocator());
currNode.add(newNode);
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/util/SchemaWriter.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/util/SchemaWriter.java
index b9612d5..39e5afc 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/util/SchemaWriter.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/util/SchemaWriter.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
@@ -248,7 +248,7 @@
public void unionSimpleType( XSUnionSimpleType type ) {
final int len = type.getMemberSize();
- StringBuffer ref = new StringBuffer();
+ StringBuilder ref = new StringBuilder();
for( int i=0; i<len; i++ ) {
XSSimpleType member = type.getMember(i);
@@ -555,7 +555,7 @@
println(MessageFormat.format("<{0}{1}{2}{3}/>",tagName, proessContents, wc.apply(WILDCARD_NS), extraAtts));
}
- private static final XSWildcardFunction<String> WILDCARD_NS = new XSWildcardFunction<String>() {
+ private static final XSWildcardFunction<String> WILDCARD_NS = new XSWildcardFunction<>() {
public String any(Any wc) {
return ""; // default
}
@@ -568,8 +568,8 @@
StringBuilder buf = new StringBuilder(" namespace='");
boolean first = true;
for (String s : wc.getNamespaces()) {
- if(first) first=false;
- else buf.append(' ');
+ if (first) first = false;
+ else buf.append(' ');
buf.append(s);
}
return buf.append('\'').toString();
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/parser/SchemaDocument.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/parser/SchemaDocument.java
index d81b171..be5b46e 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/parser/SchemaDocument.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/parser/SchemaDocument.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,7 +59,7 @@
*
* <p>
* The returned {@link XSSchema} contains not just components
- * defined in this {@link SchemaDocument} but all the other components
+ * defined in this but all the other components
* defined in all the schemas that collectively define this namespace.
*
* @return
@@ -68,7 +68,7 @@
XSSchema getSchema();
/**
- * Set of {@link SchemaDocument}s that are included/imported from this document.
+ * Set of s that are included/imported from this document.
*
* @return
* can be empty but never null. read-only.
@@ -76,7 +76,7 @@
Set<SchemaDocument> getReferencedDocuments();
/**
- * Gets the {@link SchemaDocument}s that are included from this document.
+ * Gets the s that are included from this document.
*
* @return
* can be empty but never null. read-only.
@@ -85,11 +85,11 @@
Set<SchemaDocument> getIncludedDocuments();
/**
- * Gets the {@link SchemaDocument}s that are imported from this document.
+ * Gets the s that are imported from this document.
*
* @param targetNamespace
* The namespace URI of the import that you want to
- * get {@link SchemaDocument}s for.
+ * get s for.
* @return
* can be empty but never null. read-only.
* this set is always a subset of {@link #getReferencedDocuments()}.
@@ -115,7 +115,7 @@
boolean imports(SchemaDocument doc);
/**
- * Set of {@link SchemaDocument}s that include/import this document.
+ * Set of s that include/import this document.
*
* <p>
* This works as the opposite of {@link #getReferencedDocuments()}.
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/parser/XSOMParser.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/parser/XSOMParser.java
index 1068488..79eed2f 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/parser/XSOMParser.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/parser/XSOMParser.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
@@ -14,6 +14,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
+import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.Set;
import java.util.HashSet;
@@ -193,7 +194,7 @@
* can be empty but never null.
*/
public Set<SchemaDocument> getDocuments() {
- return new HashSet<SchemaDocument>(context.parsedDocuments.keySet());
+ return new HashSet<>(context.parsedDocuments.keySet());
}
public EntityResolver getEntityResolver() {
@@ -231,11 +232,11 @@
setAnnotationParser( new AnnotationParserFactory() {
public AnnotationParser create() {
try {
- return (AnnotationParser)annParser.newInstance();
- } catch( InstantiationException e ) {
- throw new InstantiationError(e.getMessage());
+ return (AnnotationParser)annParser.getConstructor().newInstance();
} catch( IllegalAccessException e ) {
throw new IllegalAccessError(e.getMessage());
+ } catch(ReflectiveOperationException e ) {
+ throw new InstantiationError(e.getMessage());
}
}
});
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/ComponentNameFunction.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/ComponentNameFunction.java
index b094e60..5d85261 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/ComponentNameFunction.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/ComponentNameFunction.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,68 +39,44 @@
// delegate to this object to get the localized name of the component type
private NameGetter nameGetter = new NameGetter(null);
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#annotation(XSAnnotation)
- */
public String annotation(XSAnnotation ann) {
// unnamed component
return nameGetter.annotation( ann );
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#attGroupDecl(XSAttGroupDecl)
- */
public String attGroupDecl(XSAttGroupDecl decl) {
String name = decl.getName();
if( name == null ) name = "";
return name + " " + nameGetter.attGroupDecl( decl );
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#attributeDecl(XSAttributeDecl)
- */
public String attributeDecl(XSAttributeDecl decl) {
String name = decl.getName();
if( name == null ) name = "";
return name + " " + nameGetter.attributeDecl( decl );
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#attributeUse(XSAttributeUse)
- */
public String attributeUse(XSAttributeUse use) {
// unnamed component
return nameGetter.attributeUse( use );
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#complexType(XSComplexType)
- */
public String complexType(XSComplexType type) {
String name = type.getName();
if( name == null ) name = "anonymous";
return name + " " + nameGetter.complexType( type );
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#schema(XSSchema)
- */
public String schema(XSSchema schema) {
return nameGetter.schema( schema ) + " \"" + schema.getTargetNamespace()+"\"";
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#facet(XSFacet)
- */
public String facet(XSFacet facet) {
String name = facet.getName();
if( name == null ) name = "";
return name + " " + nameGetter.facet( facet );
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#notation(XSNotation)
- */
public String notation(XSNotation notation) {
String name = notation.getName();
if( name == null ) name = "";
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/ContextClassloaderLocal.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/ContextClassloaderLocal.java
index 095fa11..b639644 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/ContextClassloaderLocal.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/ContextClassloaderLocal.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -23,7 +23,7 @@
private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
+ private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<>();
public V get() throws Error {
ClassLoader tccl = getContextClassLoader();
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/DeferedCollection.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/DeferedCollection.java
index 0a9d27d..21d38c0 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/DeferedCollection.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/DeferedCollection.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,7 +31,7 @@
/**
* Stores values that are already fetched from {@link #result}.
*/
- private final List<T> archive = new ArrayList<T>();
+ private final List<T> archive = new ArrayList<>();
public DeferedCollection(Iterator<T> result) {
this.result = result;
@@ -69,18 +69,19 @@
}
public Iterator<T> iterator() {
- return new Iterator<T>() {
- int idx=0;
+ return new Iterator<>() {
+ int idx = 0;
+
public boolean hasNext() {
- if(idx<archive.size())
+ if (idx < archive.size())
return true;
return result.hasNext();
}
public T next() {
- if(idx==archive.size())
+ if (idx == archive.size())
fetch();
- if(idx==archive.size())
+ if (idx == archive.size())
throw new NoSuchElementException();
return archive.get(idx++);
}
@@ -109,7 +110,7 @@
}
/**
- * Fetches another item from {@link
+ * Fetches another item from {@link #result}.
*/
private void fetch() {
if(result.hasNext())
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/DomAnnotationParserFactory.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/DomAnnotationParserFactory.java
index a712255..b3dd1f1 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/DomAnnotationParserFactory.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/DomAnnotationParserFactory.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,7 +51,7 @@
return new AnnotationParserImpl(disableSecureProcessing);
}
- private static final ContextClassloaderLocal<SAXTransformerFactory> stf = new ContextClassloaderLocal<SAXTransformerFactory>() {
+ private static final ContextClassloaderLocal<SAXTransformerFactory> stf = new ContextClassloaderLocal<>() {
@Override
protected SAXTransformerFactory initialValue() throws Exception {
return (SAXTransformerFactory) SAXTransformerFactory.newInstance();
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/XSFinder.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/XSFinder.java
index db05beb..cfb8392 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/XSFinder.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/util/XSFinder.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,58 +51,34 @@
return c.apply(this);
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#annotation(com.sun.xml.xsom.XSAnnotation)
- */
public Boolean annotation(XSAnnotation ann) {
return Boolean.FALSE;
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#attGroupDecl(com.sun.xml.xsom.XSAttGroupDecl)
- */
public Boolean attGroupDecl(XSAttGroupDecl decl) {
return Boolean.FALSE;
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#attributeDecl(com.sun.xml.xsom.XSAttributeDecl)
- */
public Boolean attributeDecl(XSAttributeDecl decl) {
return Boolean.FALSE;
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#attributeUse(com.sun.xml.xsom.XSAttributeUse)
- */
public Boolean attributeUse(XSAttributeUse use) {
return Boolean.FALSE;
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#complexType(com.sun.xml.xsom.XSComplexType)
- */
public Boolean complexType(XSComplexType type) {
return Boolean.FALSE;
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#schema(com.sun.xml.xsom.XSSchema)
- */
public Boolean schema(XSSchema schema) {
return Boolean.FALSE;
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#facet(com.sun.xml.xsom.XSFacet)
- */
public Boolean facet(XSFacet facet) {
return Boolean.FALSE;
}
- /**
- * @see com.sun.xml.xsom.visitor.XSFunction#notation(com.sun.xml.xsom.XSNotation)
- */
public Boolean notation(XSNotation notation) {
return Boolean.FALSE;
}
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/visitor/XSFunction.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/visitor/XSFunction.java
index 9605a70..bd0cbae 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/visitor/XSFunction.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/visitor/XSFunction.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,8 +20,6 @@
import com.sun.xml.xsom.XSSchema;
import com.sun.xml.xsom.XSIdentityConstraint;
import com.sun.xml.xsom.XSXPath;
-import com.sun.xml.xsom.impl.IdentityConstraintImpl;
-import com.sun.xml.xsom.impl.XPathImpl;
/**
* Function object that works on the entire XML Schema components.
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/visitor/XSVisitor.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/visitor/XSVisitor.java
index 0f0b052..84f282c 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/visitor/XSVisitor.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/visitor/XSVisitor.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,8 +20,6 @@
import com.sun.xml.xsom.XSSchema;
import com.sun.xml.xsom.XSIdentityConstraint;
import com.sun.xml.xsom.XSXPath;
-import com.sun.xml.xsom.impl.IdentityConstraintImpl;
-import com.sun.xml.xsom.impl.XPathImpl;
/**
* Visitor for {@link com.sun.xml.xsom.XSComponent}
diff --git a/jaxb-ri/xsom/src/test/java/com/sun/xml/xsom/test/MapNamespaceContext.java b/jaxb-ri/xsom/src/test/java/com/sun/xml/xsom/test/MapNamespaceContext.java
index 581b969..3eb0593 100644
--- a/jaxb-ri/xsom/src/test/java/com/sun/xml/xsom/test/MapNamespaceContext.java
+++ b/jaxb-ri/xsom/src/test/java/com/sun/xml/xsom/test/MapNamespaceContext.java
@@ -1,7 +1,7 @@
package com.sun.xml.xsom.test;
/*
- * 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,7 +20,7 @@
*/
public class MapNamespaceContext implements NamespaceContext {
- private final Map<String,String> core = new HashMap<String, String>();
+ private final Map<String,String> core = new HashMap<>();
public MapNamespaceContext(String... mapping) {
for( int i=0; i<mapping.length; i+=2 )