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/src/java/com/thoughtworks/xstream/io/StatefulWriter.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
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/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/io/xml/TraxSource.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]
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/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/src/java/com/thoughtworks/xstream/mapper/AnnotationMapper.java
    Replace the type specification in this constructor call with the diamond operator ("<>"). [squid:S2293]

Signed-off-by: Honor Systems Updater Jenkins <[email protected]>
  • Loading branch information
hsujenkins committed Apr 29, 2022
1 parent eb21c8d commit c3e60a4
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
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<String, String>(), lengthLimit);
this(new ConcurrentHashMap<>(), lengthLimit);
}

@Override
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<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,7 +37,7 @@ public class DefaultConverterLookup implements ConverterLookup, ConverterRegistr
private Map<String, Converter> serializationMap = null;

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

/**
Expand Down Expand Up @@ -107,7 +107,7 @@ private Object writeReplace() {
}

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

public PresortedMap() {
this(null, new ArraySet<Map.Entry<K, V>>());
this(null, new ArraySet<>());
}

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

private PresortedMap(final Comparator<K> comparator, final PresortedMap.ArraySet<Map.Entry<K, V>> set) {
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<DateFormat>(initialPoolSize, maxPoolSize, new Pool.Factory<DateFormat>() {
pool = new Pool<>(initialPoolSize, 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,7 +42,7 @@ public class WeakCache<K, V> extends AbstractMap<K, V> {
* @since 1.4
*/
public WeakCache() {
this(new WeakHashMap<K, Reference<V>>());
this(new WeakHashMap<>());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void startNodeCommon() {
}
state = STATE_NODE_START;
++balance;
attributes.push(new HashSet<String>());
attributes.push(new HashSet<>());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class JettisonStaxWriter extends StaxWriter {

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

/**
* @since 1.4
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<Object>(olist);
source = list instanceof Queue ? (Queue<?>)list : new ListWrappingQueue<>(olist);

configureXMLReader();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +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<XStreamConverter>(Arrays.asList(convertersAnnotation.value()))
: new ArrayList<XStreamConverter>();
? new ArrayList<>(Arrays.asList(convertersAnnotation.value()))
: new ArrayList<>();
if (converterAnnotation != null) {
annotations.add(converterAnnotation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public SecurityMapper(final Mapper wrapped) {
public SecurityMapper(final Mapper wrapped, final TypePermission... permissions) {
super(wrapped);
this.permissions = permissions == null //
? new ArrayList<TypePermission>()
: new ArrayList<TypePermission>(Arrays.asList(permissions));
? new ArrayList<>()
: new ArrayList<>(Arrays.asList(permissions));
}

/**
Expand Down

0 comments on commit c3e60a4

Please sign in to comment.