Skip to content

Commit f513608

Browse files
committed
Sonarqube Fixes
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]>
1 parent 9127f91 commit f513608

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

jaxb-ri/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationArrayMember.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public Collection<JAnnotationValue> annotations2() {
266266
* @deprecated
267267
* use {@link #annotate}
268268
*/
269-
@Deprecated
269+
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
270270
public JAnnotationArrayMember param (JAnnotationUse value ){
271271
values.add(value);
272272
return this;

jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/marshaller/Messages.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static String format( String property, Object[] args ) {
6969
/**
7070
* @deprecated use ERR_MISSING_OBJECT2
7171
*/
72-
@Deprecated
72+
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
7373
public static final String ERR_MISSING_OBJECT = // 0 args
7474
"SAXMarshaller.MissingObject";
7575

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

9191
/**
9292
* @deprecated only used from 1.0
9393
*/
94-
@Deprecated
94+
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
9595
public static final String ERR_NOT_IDENTIFIABLE = // 0 args
9696
"SAXMarshaller.NotIdentifiable";
9797

jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/unmarshaller/DOMScanner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void scan( Element e) throws SAXException {
121121
* @deprecated in JAXB 2.0
122122
* Use {@link #scan(Element)}
123123
*/
124-
@Deprecated
124+
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
125125
public void parse( Element e, ContentHandler handler ) throws SAXException {
126126
// it might be better to set receiver at the constructor.
127127
receiver = handler;
@@ -143,7 +143,7 @@ public void parse( Element e, ContentHandler handler ) throws SAXException {
143143
* @deprecated in JAXB 2.0
144144
* Use {@link #scan(Element)}
145145
*/
146-
@Deprecated
146+
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
147147
public void parseWithContext( Element e, ContentHandler handler ) throws SAXException {
148148
setContentHandler(handler);
149149
scan(e);

jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ConfigReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public final class ConfigReader {
5858
* The set of classes to be passed to XJC
5959
*
6060
*/
61-
private final Set<Reference> classesToBeIncluded = new HashSet<Reference>();
61+
private final Set<Reference> classesToBeIncluded = new HashSet<>();
6262

6363

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

234234

235235
/**

jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/Coordinator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public <T extends XmlAdapter> boolean containsAdapter(Class<T> type) {
7878
}
7979

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

8383
/**
8484
* The {@link Coordinator} in charge before this {@link Coordinator}.

jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/reflect/Lister.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public ItemT[] build() {
212212
/**
213213
* Listers for the primitive type arrays, keyed by their primitive Class object.
214214
*/
215-
/*package*/ static final Map<Class,Lister> primitiveArrayListers = new HashMap<Class,Lister>();
215+
/*package*/ static final Map<Class,Lister> primitiveArrayListers = new HashMap<>();
216216

217217
static {
218218
// register primitive array listers

jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSchema.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public interface XSSchema extends XSComponent
113113
* this method from {@link XSSchema} and not from {@link XSComponent},
114114
* there's something wrong with your code.
115115
*/
116-
@Deprecated
116+
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
117117
SchemaDocument getSourceDocument();
118118

119119
/**

jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/scd/SimpleCharStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public char readChar() throws java.io.IOException
212212
* @deprecated
213213
* @see #getEndColumn
214214
*/
215-
@Deprecated
215+
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
216216
public int getColumn() {
217217
return bufcolumn[bufpos];
218218
}
@@ -221,7 +221,7 @@ public int getColumn() {
221221
* @deprecated
222222
* @see #getEndLine
223223
*/
224-
@Deprecated
224+
@Deprecated(since="4.0.0-SNAPSHOT", forRemoval=true)
225225
public int getLine() {
226226
return bufline[bufpos];
227227
}

0 commit comments

Comments
 (0)