Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonarqube Fixes #1603 #1604

Merged
merged 3 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -266,7 +266,7 @@ public Collection<JAnnotationValue> annotations2() {
* @deprecated
* use {@link #annotate}
*/
@Deprecated
@Deprecated(since="2.3", forRemoval=true)
public JAnnotationArrayMember param (JAnnotationUse value ){
values.add(value);
return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -69,7 +69,7 @@ static String format( String property, Object[] args ) {
/**
* @deprecated use ERR_MISSING_OBJECT2
*/
@Deprecated
@Deprecated(since="2.0", 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="2.0", forRemoval=true)
public static final String ERR_DANGLING_IDREF = // 1 arg
"SAXMarshaller.DanglingIDREF";

/**
* @deprecated only used from 1.0
*/
@Deprecated
@Deprecated(since="2.0", 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
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -121,7 +121,7 @@ public void scan( Element e) throws SAXException {
* @deprecated in JAXB 2.0
* Use {@link #scan(Element)}
*/
@Deprecated
@Deprecated(since="2.0", 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="2.0", forRemoval=true)
public void parseWithContext( Element e, ContentHandler handler ) throws SAXException {
setContentHandler(handler);
scan(e);
Expand Down
6 changes: 3 additions & 3 deletions jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ConfigReader.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -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
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -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
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSSchema.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -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="2.3", forRemoval=true)
SchemaDocument getSourceDocument();

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -212,7 +212,7 @@ public char readChar() throws java.io.IOException
* @deprecated
* @see #getEndColumn
*/
@Deprecated
@Deprecated(since="2.3", forRemoval=true)
public int getColumn() {
return bufcolumn[bufpos];
}
Expand All @@ -221,7 +221,7 @@ public int getColumn() {
* @deprecated
* @see #getEndLine
*/
@Deprecated
@Deprecated(since="2.3", forRemoval=true)
public int getLine() {
return bufline[bufpos];
}
Expand Down