Skip to content

Commit

Permalink
Honor Systems generated updates
Browse files Browse the repository at this point in the history
x-stream#211
Automatic updates
https://jenkins.updater.j2eeguys.com/
xstream/src/java/com/thoughtworks/xstream/mapper/SecurityMapper.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream-benchmark/src/java/com/thoughtworks/xstream/tools/benchmark/model/FiveBean.java
    uses deprecated method java/lang/Boolean::<init>(Z)V [java.9]
xstream/src/java/com/thoughtworks/xstream/io/StatefulWriter.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream-benchmark/src/java/com/thoughtworks/xstream/tools/benchmark/targets/ExtendedTarget.java
    uses deprecated method java/lang/Boolean::<init>(Z)V [java.9]
    uses deprecated method java/lang/Integer::<init>(I)V [java.9]
xstream/src/java/com/thoughtworks/xstream/io/json/JettisonStaxWriter.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream-jmh/src/java/com/thoughtworks/xstream/benchmark/jmh/StringConverterBenchmark.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream-benchmark/src/java/com/thoughtworks/xstream/tools/benchmark/model/Five.java
    uses deprecated method java/lang/Boolean::<init>(Z)V [java.9]
xstream/src/java/com/thoughtworks/xstream/converters/reflection/XStream12FieldKeySorter.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream/src/java/com/thoughtworks/xstream/core/util/PresortedMap.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream/src/java/com/thoughtworks/xstream/core/util/WeakCache.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream/src/java/com/thoughtworks/xstream/converters/reflection/AbstractReflectionConverter.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream/src/java/com/thoughtworks/xstream/io/xml/TraxSource.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream-benchmark/src/java/com/thoughtworks/xstream/tools/benchmark/targets/BasicTarget.java
    uses deprecated method java/lang/Long::<init>(J)V [java.9]
    uses deprecated method java/lang/Byte::<init>(B)V [java.9]
    uses deprecated method java/lang/Double::<init>(D)V [java.9]
    uses deprecated method java/lang/Float::<init>(F)V [java.9]
    uses deprecated method java/lang/Integer::<init>(I)V [java.9]
xstream/src/java/com/thoughtworks/xstream/converters/reflection/NativeFieldKeySorter.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream/src/java/com/thoughtworks/xstream/core/util/ThreadSafePropertyEditor.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream/src/java/com/thoughtworks/xstream/core/util/ThreadSafeSimpleDateFormat.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream/src/java/com/thoughtworks/xstream/core/DefaultConverterLookup.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
xstream-benchmark/src/java/com/thoughtworks/xstream/tools/benchmark/model/SerializableFive.java
    uses deprecated method java/lang/Boolean::<init>(Z)V [java.9]
xstream/src/java/com/thoughtworks/xstream/mapper/AnnotationMapper.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]

Also-by: Stephen Davidson <[email protected]>
Signed-off-by: Honor Systems Updater Jenkins <[email protected]>
  • Loading branch information
hsujenkins committed May 2, 2022
1 parent c3e60a4 commit 792e447
Show file tree
Hide file tree
Showing 19 changed files with 27 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public boolean equals(Object obj) {
}

public int hashCode() {
return super.hashCode() + two + new Boolean(three).hashCode() + five.toString().hashCode();
return super.hashCode() + two + Boolean.valueOf(three).hashCode() + five.toString().hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ public boolean equals(Object obj) {
}

public int hashCode() {
return super.hashCode() + two + new Boolean(three).hashCode() + five.toString().hashCode();
return super.hashCode() + two + Boolean.valueOf(three).hashCode() + five.toString().hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public boolean equals(Object obj) {
}

public int hashCode() {
return super.hashCode() + two + new Boolean(three).hashCode() + five.toString().hashCode();
return super.hashCode() + two + Boolean.valueOf(three).hashCode() + five.toString().hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public class BasicTarget implements Target {

public BasicTarget() {
list = new ArrayList();
list.add(new Integer(1));
list.add(new Byte((byte)2));
list.add(Integer.valueOf(1));
list.add(Byte.valueOf((byte)2));
list.add(new Short((short)3));
list.add(new Long(4));
list.add(Long.valueOf(4));
list.add("Profile");
list.add(Boolean.TRUE);
list.add(new Float(1.2f));
list.add(new Double(1.2f));
list.add(Float.valueOf(1.2f));
list.add(Double.valueOf(1.2f));
list.add(new File("profile.txt"));
list.add(Locale.ENGLISH);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ static class RunnableInvocationHandler implements InvocationHandler {

public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (method.equals(EQUALS)) {
return new Boolean(args[0] instanceof Runnable);
return Boolean.valueOf(args[0] instanceof Runnable);
} else if (method.getName().equals("hashCode")) {
return new Integer(System.identityHashCode(proxy));
return Integer.valueOf(System.identityHashCode(proxy));
} else if (method.getName().equals("toString")) {
return "Proxy" + System.identityHashCode(proxy);
} else if (method.getName().equals("getClass")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private ConcurrentHashMapStringConverter(final ConcurrentMap<String, String> map
* @since 1.4.9
*/
public ConcurrentHashMapStringConverter(final int lengthLimit) {
this(new ConcurrentHashMap<>(), lengthLimit);
this(new ConcurrentHashMap<it);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void writeItem(final Object item) {
};

final Map<String, Set<Mapper.ImplicitCollectionMapping>> hiddenMappers =
new HashMap<String, Set<Mapper.ImplicitCollectionMapping>>();
new HashMap<>();
for (final FieldInfo info : fields) {
if (info.value != null) {
final boolean isCollection = info.value instanceof Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class NativeFieldKeySorter implements FieldKeySorter {

@Override
public Map<FieldKey, Field> sort(final Class<?> type, final Map<FieldKey, Field> keyedByFieldKey) {
final Map<FieldKey, Field> map = new TreeMap<>(new Comparator<FieldKey>() {
final Map<FieldKey, Field> map = new TreeMap<r<FieldKey>() {

@Override
public int compare(final FieldKey fieldKey1, final FieldKey fieldKey2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class XStream12FieldKeySorter implements FieldKeySorter {

@Override
public Map<FieldKey, Field> sort(final Class<?> type, final Map<FieldKey, Field> keyedByFieldKey) {
final Map<FieldKey, Field> map = new TreeMap<FieldKey, Field>(new Comparator<FieldKey>() {
final Map<FieldKey, Field> map = new TreeMap<>(new Comparator<FieldKey>() {

@Override
public int compare(final FieldKey fieldKey1, final FieldKey fieldKey2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ public class DefaultConverterLookup implements ConverterLookup, ConverterRegistr
private Map<String, Converter> serializationMap = null;

public DefaultConverterLookup() {
this(new HashMap<>());
}

/**
this(new HashMap</**
* Constructs a DefaultConverterLookup with a provided map.
*
* @param map the map to use
Expand Down Expand Up @@ -107,7 +104,7 @@ private Object writeReplace() {
}

private Object readResolve() {
typeToConverterMap = serializationMap == null ? new HashMap<>() : serializationMap;
typeToConverterMap = serializationMap == null ? new HashMap<onMap;
serializationMap = null;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ private static class ArraySet<T> extends ArrayList<T> implements Set<T> {
private final Comparator<K> comparator;

public PresortedMap() {
this(null, new ArraySet<>());
}

public PresortedMap(final Comparator<K> comparator) {
this(comparator, new ArraySet<>());
}

private PresortedMap(final Comparator<K> comparator, final PresortedMap.ArraySet<Map.Entry<K, V>> set) {
this(null, new ArraySet< public PresortedMap(final Comparator<K> comparator) {
this(comparator, new ArraySet< private PresortedMap(final Comparator<K> comparator, final PresortedMap.ArraySet<Map.Entry<K, V>> set) {
this.comparator = comparator != null ? comparator : new ArraySetComparator<>(set);
this.set = set;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public ThreadSafePropertyEditor(
throw new IllegalArgumentException(type.getName() + " is not a " + PropertyEditor.class.getName());
}
editorType = type;
pool = new Pool<PropertyEditor>(initialPoolSize, maxPoolSize, new Pool.Factory<PropertyEditor>() {
pool = new Pool<>(initialPoolSize, maxPoolSize, new Pool.Factory<PropertyEditor>() {
@Override
public PropertyEditor newInstance() {
ErrorWritingException ex = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ThreadSafeSimpleDateFormat(
final int maxPoolSize, final boolean lenient) {
formatString = format;
this.timeZone = timeZone;
pool = new Pool<>(initialPoolSize, maxPoolSize, new Pool.Factory<DateFormat>() {
pool = new Pool<oolSize, maxPoolSize, new Pool.Factory<DateFormat>() {
@Override
public SimpleDateFormat newInstance() {
final SimpleDateFormat dateFormat = new SimpleDateFormat(formatString, locale);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ public class WeakCache<K, V> extends AbstractMap<K, V> {
* @since 1.4
*/
public WeakCache() {
this(new WeakHashMap<>());
}

/**
this(new WeakHashMap< /**
* Construct a WeakCache.
*
* @param map the map to use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ private void startNodeCommon() {
}
state = STATE_NODE_START;
++balance;
attributes.push(new HashSet<>());
}
attributes.push(new HashSet< }

@Override
public void addAttribute(final String name, final String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
public class JettisonStaxWriter extends StaxWriter {

private final MappedNamespaceConvention convention;
private final Deque<String> stack = new ArrayDeque<>();

/**
private final Deque<String> stack = new ArrayDeque< /**
* @since 1.4
*/
public JettisonStaxWriter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public void setSourceAsList(final List<?> list) {
}
@SuppressWarnings("unchecked")
final List<Object> olist = (List<Object>)list;
source = list instanceof Queue ? (Queue<?>)list : new ListWrappingQueue<>(olist);
source = list instanceof Queue ? (Queue<?>)list : new ListWrappingQueue<t);

configureXMLReader();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@ private void processConverterAnnotations(final Class<?> type) {
final XStreamConverters convertersAnnotation = type.getAnnotation(XStreamConverters.class);
final XStreamConverter converterAnnotation = type.getAnnotation(XStreamConverter.class);
final List<XStreamConverter> annotations = convertersAnnotation != null
? new ArrayList<>(Arrays.asList(convertersAnnotation.value()))
: new ArrayList<>();
if (converterAnnotation != null) {
? new ArrayList<convertersAnnotation.value()))
: new ArrayList< if (converterAnnotation != null) {
annotations.add(converterAnnotation);
}
for (final XStreamConverter annotation : annotations) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public SecurityMapper(final Mapper wrapped) {
public SecurityMapper(final Mapper wrapped, final TypePermission... permissions) {
super(wrapped);
this.permissions = permissions == null //
? new ArrayList<>()
: new ArrayList<>(Arrays.asList(permissions));
? new ArrayList< : new ArrayList<t(permissions));
}

/**
Expand Down

0 comments on commit 792e447

Please sign in to comment.