Skip to content

Commit

Permalink
Sonarqube Fixes
Browse files Browse the repository at this point in the history
eclipse-ee4j#1603
xsom/src/main/java/com/sun/xml/xsom/XSSchema.java
    Add 'since' and/or 'forRemoval' arguments to the @deprecated annotation. [squid:MissingDeprecatedCheck]
jxc/src/main/java/com/sun/tools/jxc/ConfigReader.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Lister.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xsom/src/main/java/com/sun/xml/xsom/impl/scd/SimpleCharStream.java
    Add 'since' and/or 'forRemoval' arguments to the @deprecated annotation. [squid:MissingDeprecatedCheck]
core/src/main/java/org/glassfish/jaxb/core/marshaller/Messages.java
    Add 'since' and/or 'forRemoval' arguments to the @deprecated annotation. [squid:MissingDeprecatedCheck]
xsom/src/main/java/com/sun/xml/xsom/impl/parser/SAXParserFactoryAdaptor.java
    Add 'since' and/or 'forRemoval' arguments to the @deprecated annotation. [squid:MissingDeprecatedCheck]
core/src/main/java/org/glassfish/jaxb/core/unmarshaller/DOMScanner.java
    Add 'since' and/or 'forRemoval' arguments to the @deprecated annotation. [squid:MissingDeprecatedCheck]
codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationArrayMember.java
    Add 'since' and/or 'forRemoval' arguments to the @deprecated annotation. [squid:MissingDeprecatedCheck]
runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Coordinator.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]

Signed-off-by: Sanddust <[email protected]>
Also-by: Stephen Davidson <[email protected]>
  • Loading branch information
sanddusttx committed Feb 13, 2022
1 parent 9127f91 commit f513608
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public Collection<JAnnotationValue> annotations2() {
* @deprecated
* use {@link #annotate}
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
public JAnnotationArrayMember param (JAnnotationUse value ){
values.add(value);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static String format( String property, Object[] args ) {
/**
* @deprecated use ERR_MISSING_OBJECT2
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
public static final String ERR_MISSING_OBJECT = // 0 args
"SAXMarshaller.MissingObject";

Expand All @@ -84,14 +84,14 @@ static String format( String property, Object[] args ) {
/**
* @deprecated only used from 1.0
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
public static final String ERR_DANGLING_IDREF = // 1 arg
"SAXMarshaller.DanglingIDREF";

/**
* @deprecated only used from 1.0
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
public static final String ERR_NOT_IDENTIFIABLE = // 0 args
"SAXMarshaller.NotIdentifiable";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void scan( Element e) throws SAXException {
* @deprecated in JAXB 2.0
* Use {@link #scan(Element)}
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
public void parse( Element e, ContentHandler handler ) throws SAXException {
// it might be better to set receiver at the constructor.
receiver = handler;
Expand All @@ -143,7 +143,7 @@ public void parse( Element e, ContentHandler handler ) throws SAXException {
* @deprecated in JAXB 2.0
* Use {@link #scan(Element)}
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
public void parseWithContext( Element e, ContentHandler handler ) throws SAXException {
setContentHandler(handler);
scan(e);
Expand Down
4 changes: 2 additions & 2 deletions jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ConfigReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public final class ConfigReader {
* The set of classes to be passed to XJC
*
*/
private final Set<Reference> classesToBeIncluded = new HashSet<Reference>();
private final Set<Reference> classesToBeIncluded = new HashSet<>();


/**
Expand Down Expand Up @@ -229,7 +229,7 @@ private static final class SchemaOutputResolverImpl extends SchemaOutputResolver
* Namespace URI to the location of the schema.
* This captures what the user specifies.
*/
private final Map<String,File> schemas = new HashMap<String,File>();
private final Map<String,File> schemas = new HashMap<>();


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public <T extends XmlAdapter> boolean containsAdapter(Class<T> type) {
}

// this much is necessary to avoid calling get and set twice when we push.
private static final ThreadLocal<Coordinator> activeTable = new ThreadLocal<Coordinator>();
private static final ThreadLocal<Coordinator> activeTable = new ThreadLocal<>();

/**
* The {@link Coordinator} in charge before this {@link Coordinator}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public ItemT[] build() {
/**
* Listers for the primitive type arrays, keyed by their primitive Class object.
*/
/*package*/ static final Map<Class,Lister> primitiveArrayListers = new HashMap<Class,Lister>();
/*package*/ static final Map<Class,Lister> primitiveArrayListers = new HashMap<>();

static {
// register primitive array listers
Expand Down
2 changes: 1 addition & 1 deletion jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public interface XSSchema extends XSComponent
* this method from {@link XSSchema} and not from {@link XSComponent},
* there's something wrong with your code.
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
SchemaDocument getSourceDocument();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public char readChar() throws java.io.IOException
* @deprecated
* @see #getEndColumn
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
public int getColumn() {
return bufcolumn[bufpos];
}
Expand All @@ -221,7 +221,7 @@ public int getColumn() {
* @deprecated
* @see #getEndLine
*/
@Deprecated
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
public int getLine() {
return bufline[bufpos];
}
Expand Down

0 comments on commit f513608

Please sign in to comment.