Clean up warnings and dead code in spring-core module
This commit is contained in:
@@ -1297,13 +1297,9 @@ public class BridgeMethodResolverTests {
|
||||
//-------------------
|
||||
|
||||
public static abstract class BaseEntity {
|
||||
|
||||
private String id;
|
||||
}
|
||||
|
||||
public static class FooEntity extends BaseEntity {
|
||||
|
||||
private String name;
|
||||
}
|
||||
|
||||
public static class BaseClass<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -82,23 +82,23 @@ public class ConstantsTests {
|
||||
|
||||
Set<?> values = c.getValues("");
|
||||
assertEquals(7, values.size());
|
||||
assertTrue(values.contains(new Integer(0)));
|
||||
assertTrue(values.contains(new Integer(66)));
|
||||
assertTrue(values.contains(Integer.valueOf(0)));
|
||||
assertTrue(values.contains(Integer.valueOf(66)));
|
||||
assertTrue(values.contains(""));
|
||||
|
||||
values = c.getValues("D");
|
||||
assertEquals(1, values.size());
|
||||
assertTrue(values.contains(new Integer(0)));
|
||||
assertTrue(values.contains(Integer.valueOf(0)));
|
||||
|
||||
values = c.getValues("prefix");
|
||||
assertEquals(2, values.size());
|
||||
assertTrue(values.contains(new Integer(1)));
|
||||
assertTrue(values.contains(new Integer(2)));
|
||||
assertTrue(values.contains(Integer.valueOf(1)));
|
||||
assertTrue(values.contains(Integer.valueOf(2)));
|
||||
|
||||
values = c.getValuesForProperty("myProperty");
|
||||
assertEquals(2, values.size());
|
||||
assertTrue(values.contains(new Integer(1)));
|
||||
assertTrue(values.contains(new Integer(2)));
|
||||
assertTrue(values.contains(Integer.valueOf(1)));
|
||||
assertTrue(values.contains(Integer.valueOf(2)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -110,23 +110,23 @@ public class ConstantsTests {
|
||||
|
||||
Set<?> values = c.getValues("");
|
||||
assertEquals(7, values.size());
|
||||
assertTrue(values.contains(new Integer(0)));
|
||||
assertTrue(values.contains(new Integer(66)));
|
||||
assertTrue(values.contains(Integer.valueOf(0)));
|
||||
assertTrue(values.contains(Integer.valueOf(66)));
|
||||
assertTrue(values.contains(""));
|
||||
|
||||
values = c.getValues("D");
|
||||
assertEquals(1, values.size());
|
||||
assertTrue(values.contains(new Integer(0)));
|
||||
assertTrue(values.contains(Integer.valueOf(0)));
|
||||
|
||||
values = c.getValues("prefix");
|
||||
assertEquals(2, values.size());
|
||||
assertTrue(values.contains(new Integer(1)));
|
||||
assertTrue(values.contains(new Integer(2)));
|
||||
assertTrue(values.contains(Integer.valueOf(1)));
|
||||
assertTrue(values.contains(Integer.valueOf(2)));
|
||||
|
||||
values = c.getValuesForProperty("myProperty");
|
||||
assertEquals(2, values.size());
|
||||
assertTrue(values.contains(new Integer(1)));
|
||||
assertTrue(values.contains(new Integer(2)));
|
||||
assertTrue(values.contains(Integer.valueOf(1)));
|
||||
assertTrue(values.contains(Integer.valueOf(2)));
|
||||
}
|
||||
finally {
|
||||
Locale.setDefault(oldLocale);
|
||||
@@ -144,24 +144,24 @@ public class ConstantsTests {
|
||||
|
||||
Set<?> values = c.getValuesForSuffix("_PROPERTY");
|
||||
assertEquals(2, values.size());
|
||||
assertTrue(values.contains(new Integer(3)));
|
||||
assertTrue(values.contains(new Integer(4)));
|
||||
assertTrue(values.contains(Integer.valueOf(3)));
|
||||
assertTrue(values.contains(Integer.valueOf(4)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void toCode() {
|
||||
Constants c = new Constants(A.class);
|
||||
|
||||
assertEquals("DOG", c.toCode(new Integer(0), ""));
|
||||
assertEquals("DOG", c.toCode(new Integer(0), "D"));
|
||||
assertEquals("DOG", c.toCode(new Integer(0), "DO"));
|
||||
assertEquals("DOG", c.toCode(new Integer(0), "DoG"));
|
||||
assertEquals("DOG", c.toCode(new Integer(0), null));
|
||||
assertEquals("CAT", c.toCode(new Integer(66), ""));
|
||||
assertEquals("CAT", c.toCode(new Integer(66), "C"));
|
||||
assertEquals("CAT", c.toCode(new Integer(66), "ca"));
|
||||
assertEquals("CAT", c.toCode(new Integer(66), "cAt"));
|
||||
assertEquals("CAT", c.toCode(new Integer(66), null));
|
||||
assertEquals("DOG", c.toCode(Integer.valueOf(0), ""));
|
||||
assertEquals("DOG", c.toCode(Integer.valueOf(0), "D"));
|
||||
assertEquals("DOG", c.toCode(Integer.valueOf(0), "DO"));
|
||||
assertEquals("DOG", c.toCode(Integer.valueOf(0), "DoG"));
|
||||
assertEquals("DOG", c.toCode(Integer.valueOf(0), null));
|
||||
assertEquals("CAT", c.toCode(Integer.valueOf(66), ""));
|
||||
assertEquals("CAT", c.toCode(Integer.valueOf(66), "C"));
|
||||
assertEquals("CAT", c.toCode(Integer.valueOf(66), "ca"));
|
||||
assertEquals("CAT", c.toCode(Integer.valueOf(66), "cAt"));
|
||||
assertEquals("CAT", c.toCode(Integer.valueOf(66), null));
|
||||
assertEquals("S1", c.toCode("", ""));
|
||||
assertEquals("S1", c.toCode("", "s"));
|
||||
assertEquals("S1", c.toCode("", "s1"));
|
||||
@@ -179,8 +179,8 @@ public class ConstantsTests {
|
||||
catch (Constants.ConstantException expected) {
|
||||
}
|
||||
|
||||
assertEquals("MY_PROPERTY_NO", c.toCodeForProperty(new Integer(1), "myProperty"));
|
||||
assertEquals("MY_PROPERTY_YES", c.toCodeForProperty(new Integer(2), "myProperty"));
|
||||
assertEquals("MY_PROPERTY_NO", c.toCodeForProperty(Integer.valueOf(1), "myProperty"));
|
||||
assertEquals("MY_PROPERTY_YES", c.toCodeForProperty(Integer.valueOf(2), "myProperty"));
|
||||
try {
|
||||
c.toCodeForProperty("bogus", "bogus");
|
||||
fail("Should have thrown ConstantException");
|
||||
@@ -188,16 +188,16 @@ public class ConstantsTests {
|
||||
catch (Constants.ConstantException expected) {
|
||||
}
|
||||
|
||||
assertEquals("DOG", c.toCodeForSuffix(new Integer(0), ""));
|
||||
assertEquals("DOG", c.toCodeForSuffix(new Integer(0), "G"));
|
||||
assertEquals("DOG", c.toCodeForSuffix(new Integer(0), "OG"));
|
||||
assertEquals("DOG", c.toCodeForSuffix(new Integer(0), "DoG"));
|
||||
assertEquals("DOG", c.toCodeForSuffix(new Integer(0), null));
|
||||
assertEquals("CAT", c.toCodeForSuffix(new Integer(66), ""));
|
||||
assertEquals("CAT", c.toCodeForSuffix(new Integer(66), "T"));
|
||||
assertEquals("CAT", c.toCodeForSuffix(new Integer(66), "at"));
|
||||
assertEquals("CAT", c.toCodeForSuffix(new Integer(66), "cAt"));
|
||||
assertEquals("CAT", c.toCodeForSuffix(new Integer(66), null));
|
||||
assertEquals("DOG", c.toCodeForSuffix(Integer.valueOf(0), ""));
|
||||
assertEquals("DOG", c.toCodeForSuffix(Integer.valueOf(0), "G"));
|
||||
assertEquals("DOG", c.toCodeForSuffix(Integer.valueOf(0), "OG"));
|
||||
assertEquals("DOG", c.toCodeForSuffix(Integer.valueOf(0), "DoG"));
|
||||
assertEquals("DOG", c.toCodeForSuffix(Integer.valueOf(0), null));
|
||||
assertEquals("CAT", c.toCodeForSuffix(Integer.valueOf(66), ""));
|
||||
assertEquals("CAT", c.toCodeForSuffix(Integer.valueOf(66), "T"));
|
||||
assertEquals("CAT", c.toCodeForSuffix(Integer.valueOf(66), "at"));
|
||||
assertEquals("CAT", c.toCodeForSuffix(Integer.valueOf(66), "cAt"));
|
||||
assertEquals("CAT", c.toCodeForSuffix(Integer.valueOf(66), null));
|
||||
assertEquals("S1", c.toCodeForSuffix("", ""));
|
||||
assertEquals("S1", c.toCodeForSuffix("", "1"));
|
||||
assertEquals("S1", c.toCodeForSuffix("", "s1"));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.core.codec;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
import java.util.Collections;
|
||||
@@ -78,4 +77,6 @@ public class DataBufferDecoderTests extends AbstractDataBufferAllocatingTestCase
|
||||
assertEquals("foobar", DataBufferTestUtils.dumpString(outputBuffer, StandardCharsets.UTF_8));
|
||||
|
||||
release(outputBuffer);
|
||||
}}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -516,7 +516,7 @@ public class TypeDescriptorTests {
|
||||
@Test
|
||||
public void narrow() {
|
||||
TypeDescriptor desc = TypeDescriptor.valueOf(Number.class);
|
||||
Integer value = new Integer(3);
|
||||
Integer value = Integer.valueOf(3);
|
||||
desc = desc.narrow(value);
|
||||
assertEquals(Integer.class, desc.getType());
|
||||
}
|
||||
@@ -524,7 +524,7 @@ public class TypeDescriptorTests {
|
||||
@Test
|
||||
public void elementType() {
|
||||
TypeDescriptor desc = TypeDescriptor.valueOf(List.class);
|
||||
Integer value = new Integer(3);
|
||||
Integer value = Integer.valueOf(3);
|
||||
desc = desc.elementTypeDescriptor(value);
|
||||
assertEquals(Integer.class, desc.getType());
|
||||
}
|
||||
@@ -542,7 +542,7 @@ public class TypeDescriptorTests {
|
||||
@Test
|
||||
public void mapKeyType() {
|
||||
TypeDescriptor desc = TypeDescriptor.valueOf(Map.class);
|
||||
Integer value = new Integer(3);
|
||||
Integer value = Integer.valueOf(3);
|
||||
desc = desc.getMapKeyTypeDescriptor(value);
|
||||
assertEquals(Integer.class, desc.getType());
|
||||
}
|
||||
@@ -560,7 +560,7 @@ public class TypeDescriptorTests {
|
||||
@Test
|
||||
public void mapValueType() {
|
||||
TypeDescriptor desc = TypeDescriptor.valueOf(Map.class);
|
||||
Integer value = new Integer(3);
|
||||
Integer value = Integer.valueOf(3);
|
||||
desc = desc.getMapValueTypeDescriptor(value);
|
||||
assertEquals(Integer.class, desc.getType());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -122,7 +122,7 @@ public class ConvertingComparatorTests {
|
||||
|
||||
@Override
|
||||
public Integer convert(String source) {
|
||||
return new Integer(source);
|
||||
return Integer.valueOf(source);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public class DefaultConversionServiceTests {
|
||||
|
||||
@Test
|
||||
public void testStringToInteger() {
|
||||
assertEquals(Integer.valueOf("1"), conversionService.convert("1", Integer.class));
|
||||
assertEquals(Integer.valueOf(1), conversionService.convert("1", Integer.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -166,7 +166,7 @@ public class DefaultConversionServiceTests {
|
||||
|
||||
@Test
|
||||
public void testStringToLong() {
|
||||
assertEquals(Long.valueOf("1"), conversionService.convert("1", Long.class));
|
||||
assertEquals(Long.valueOf(1), conversionService.convert("1", Long.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -181,7 +181,7 @@ public class DefaultConversionServiceTests {
|
||||
|
||||
@Test
|
||||
public void testFloatToString() {
|
||||
assertEquals("1.0", conversionService.convert(new Float("1.0"), String.class));
|
||||
assertEquals("1.0", conversionService.convert(Float.valueOf("1.0"), String.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -191,7 +191,7 @@ public class DefaultConversionServiceTests {
|
||||
|
||||
@Test
|
||||
public void testDoubleToString() {
|
||||
assertEquals("1.0", conversionService.convert(new Double("1.0"), String.class));
|
||||
assertEquals("1.0", conversionService.convert(Double.valueOf("1.0"), String.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -336,7 +336,7 @@ public class DefaultConversionServiceTests {
|
||||
|
||||
@Test
|
||||
public void testCharacterToNumber() {
|
||||
assertEquals(new Integer(65), conversionService.convert('A', Integer.class));
|
||||
assertEquals(Integer.valueOf(65), conversionService.convert('A', Integer.class));
|
||||
}
|
||||
|
||||
// collection conversion
|
||||
@@ -354,9 +354,9 @@ public class DefaultConversionServiceTests {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Integer> result = (List<Integer>) conversionService.convert(new String[] {"1", "2", "3"}, TypeDescriptor
|
||||
.valueOf(String[].class), new TypeDescriptor(getClass().getDeclaredField("genericList")));
|
||||
assertEquals(new Integer("1"), result.get(0));
|
||||
assertEquals(new Integer("2"), result.get(1));
|
||||
assertEquals(new Integer("3"), result.get(2));
|
||||
assertEquals(Integer.valueOf(1), result.get(0));
|
||||
assertEquals(Integer.valueOf(2), result.get(1));
|
||||
assertEquals(Integer.valueOf(3), result.get(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -430,9 +430,9 @@ public class DefaultConversionServiceTests {
|
||||
public void convertStringToArrayWithElementConversion() {
|
||||
Integer[] result = conversionService.convert("1,2,3", Integer[].class);
|
||||
assertEquals(3, result.length);
|
||||
assertEquals(new Integer(1), result[0]);
|
||||
assertEquals(new Integer(2), result[1]);
|
||||
assertEquals(new Integer(3), result[2]);
|
||||
assertEquals(Integer.valueOf(1), result[0]);
|
||||
assertEquals(Integer.valueOf(2), result[1]);
|
||||
assertEquals(Integer.valueOf(3), result[2]);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -461,7 +461,7 @@ public class DefaultConversionServiceTests {
|
||||
public void convertArrayToObjectWithElementConversion() {
|
||||
String[] array = new String[] {"3"};
|
||||
Integer result = conversionService.convert(array, Integer.class);
|
||||
assertEquals(new Integer(3), result);
|
||||
assertEquals(Integer.valueOf(3), result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -482,7 +482,7 @@ public class DefaultConversionServiceTests {
|
||||
public void convertObjectToArrayWithElementConversion() {
|
||||
Integer[] result = conversionService.convert(3L, Integer[].class);
|
||||
assertEquals(1, result.length);
|
||||
assertEquals(new Integer(3), result[0]);
|
||||
assertEquals(Integer.valueOf(3), result[0]);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -504,9 +504,9 @@ public class DefaultConversionServiceTests {
|
||||
list.add("2");
|
||||
list.add("3");
|
||||
Integer[] result = conversionService.convert(list, Integer[].class);
|
||||
assertEquals(new Integer(1), result[0]);
|
||||
assertEquals(new Integer(2), result[1]);
|
||||
assertEquals(new Integer(3), result[2]);
|
||||
assertEquals(Integer.valueOf(1), result[0]);
|
||||
assertEquals(Integer.valueOf(2), result[1]);
|
||||
assertEquals(Integer.valueOf(3), result[2]);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -556,14 +556,14 @@ public class DefaultConversionServiceTests {
|
||||
public void convertCollectionToObject() {
|
||||
List<Long> list = Collections.singletonList(3L);
|
||||
Long result = conversionService.convert(list, Long.class);
|
||||
assertEquals(new Long(3), result);
|
||||
assertEquals(Long.valueOf(3), result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void convertCollectionToObjectWithElementConversion() {
|
||||
List<String> list = Collections.singletonList("3");
|
||||
Integer result = conversionService.convert(list, Integer.class);
|
||||
assertEquals(new Integer(3), result);
|
||||
assertEquals(Integer.valueOf(3), result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -604,15 +604,15 @@ public class DefaultConversionServiceTests {
|
||||
List<Integer> result = (List<Integer>) conversionService.convert(3L, TypeDescriptor.valueOf(Long.class),
|
||||
new TypeDescriptor(getClass().getField("genericList")));
|
||||
assertEquals(1, result.size());
|
||||
assertEquals(new Integer(3), result.get(0));
|
||||
assertEquals(Integer.valueOf(3), result.get(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void convertArrayToArray() {
|
||||
Integer[] result = conversionService.convert(new String[] {"1", "2", "3"}, Integer[].class);
|
||||
assertEquals(new Integer(1), result[0]);
|
||||
assertEquals(new Integer(2), result[1]);
|
||||
assertEquals(new Integer(3), result[2]);
|
||||
assertEquals(Integer.valueOf(1), result[0]);
|
||||
assertEquals(Integer.valueOf(2), result[1]);
|
||||
assertEquals(Integer.valueOf(3), result[2]);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -679,9 +679,9 @@ public class DefaultConversionServiceTests {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Integer> bar = (List<Integer>) conversionService.convert(foo, TypeDescriptor.forObject(foo),
|
||||
new TypeDescriptor(getClass().getField("genericList")));
|
||||
assertEquals(new Integer(1), bar.get(0));
|
||||
assertEquals(new Integer(2), bar.get(1));
|
||||
assertEquals(new Integer(3), bar.get(2));
|
||||
assertEquals(Integer.valueOf(1), bar.get(0));
|
||||
assertEquals(Integer.valueOf(2), bar.get(1));
|
||||
assertEquals(Integer.valueOf(3), bar.get(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -717,9 +717,9 @@ public class DefaultConversionServiceTests {
|
||||
List<Integer> bar = (List<Integer>) conversionService.convert(values,
|
||||
TypeDescriptor.forObject(values), new TypeDescriptor(getClass().getField("genericList")));
|
||||
assertEquals(3, bar.size());
|
||||
assertEquals(new Integer(1), bar.get(0));
|
||||
assertEquals(new Integer(2), bar.get(1));
|
||||
assertEquals(new Integer(3), bar.get(2));
|
||||
assertEquals(Integer.valueOf(1), bar.get(0));
|
||||
assertEquals(Integer.valueOf(2), bar.get(1));
|
||||
assertEquals(Integer.valueOf(3), bar.get(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -730,8 +730,8 @@ public class DefaultConversionServiceTests {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Integer> integers = (List<Integer>) conversionService.convert(strings,
|
||||
TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(Integer.class)));
|
||||
assertEquals(new Integer(3), integers.get(0));
|
||||
assertEquals(new Integer(9), integers.get(1));
|
||||
assertEquals(Integer.valueOf(3), integers.get(0));
|
||||
assertEquals(Integer.valueOf(9), integers.get(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -764,8 +764,8 @@ public class DefaultConversionServiceTests {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Integer, Integer> integers = (Map<Integer, Integer>) conversionService.convert(strings,
|
||||
TypeDescriptor.map(Map.class, TypeDescriptor.valueOf(Integer.class), TypeDescriptor.valueOf(Integer.class)));
|
||||
assertEquals(new Integer(9), integers.get(3));
|
||||
assertEquals(new Integer(31), integers.get(6));
|
||||
assertEquals(Integer.valueOf(9), integers.get(3));
|
||||
assertEquals(Integer.valueOf(31), integers.get(6));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -858,13 +858,13 @@ public class DefaultConversionServiceTests {
|
||||
|
||||
@Test(expected = ConverterNotFoundException.class)
|
||||
public void convertObjectToObjectNoValueOfMethodOrConstructor() {
|
||||
conversionService.convert(new Long(3), SSN.class);
|
||||
conversionService.convert(Long.valueOf(3), SSN.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void convertObjectToObjectFinderMethod() {
|
||||
TestEntity e = conversionService.convert(1L, TestEntity.class);
|
||||
assertEquals(new Long(1), e.getId());
|
||||
assertEquals(Long.valueOf(1), e.getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -877,7 +877,7 @@ public class DefaultConversionServiceTests {
|
||||
@Test
|
||||
public void convertObjectToObjectFinderMethodWithIdConversion() {
|
||||
TestEntity entity = conversionService.convert("1", TestEntity.class);
|
||||
assertEquals(new Long(1), entity.getId());
|
||||
assertEquals(Long.valueOf(1), entity.getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -964,7 +964,7 @@ public class DefaultConversionServiceTests {
|
||||
watch.stop();
|
||||
watch.start("convert 4,000,000 manually");
|
||||
for (int i = 0; i < 4000000; i++) {
|
||||
new Integer(3).toString();
|
||||
Integer.valueOf(3).toString();
|
||||
}
|
||||
watch.stop();
|
||||
// System.out.println(watch.prettyPrint());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -104,7 +104,7 @@ public class GenericConversionServiceTests {
|
||||
@Test
|
||||
public void convert() {
|
||||
conversionService.addConverterFactory(new StringToNumberConverterFactory());
|
||||
assertEquals(new Integer(3), conversionService.convert("3", Integer.class));
|
||||
assertEquals(Integer.valueOf(3), conversionService.convert("3", Integer.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -188,7 +188,7 @@ public class GenericConversionServiceTests {
|
||||
}
|
||||
});
|
||||
Integer result = conversionService.convert("3", Integer.class);
|
||||
assertEquals(new Integer(3), result);
|
||||
assertEquals(Integer.valueOf(3), result);
|
||||
}
|
||||
|
||||
// SPR-8718
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -114,7 +114,7 @@ public class ReactiveAdapterRegistryTests {
|
||||
Publisher<Integer> source = Flowable.fromArray(1, 2, 3);
|
||||
Object target = getAdapter(Mono.class).fromPublisher(source);
|
||||
assertTrue(target instanceof Mono);
|
||||
assertEquals(new Integer(1), ((Mono<Integer>) target).block(Duration.ofMillis(1000)));
|
||||
assertEquals(Integer.valueOf(1), ((Mono<Integer>) target).block(Duration.ofMillis(1000)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -122,7 +122,7 @@ public class ReactiveAdapterRegistryTests {
|
||||
Publisher<Integer> source = Flowable.fromArray(1, 2, 3);
|
||||
Object target = getAdapter(CompletableFuture.class).fromPublisher(source);
|
||||
assertTrue(target instanceof CompletableFuture);
|
||||
assertEquals(new Integer(1), ((CompletableFuture<Integer>) target).get());
|
||||
assertEquals(Integer.valueOf(1), ((CompletableFuture<Integer>) target).get());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -139,7 +139,7 @@ public class ReactiveAdapterRegistryTests {
|
||||
Publisher<Integer> source = Flowable.fromArray(1);
|
||||
Object target = getAdapter(rx.Single.class).fromPublisher(source);
|
||||
assertTrue(target instanceof rx.Single);
|
||||
assertEquals(new Integer(1), ((rx.Single<Integer>) target).toBlocking().value());
|
||||
assertEquals(Integer.valueOf(1), ((rx.Single<Integer>) target).toBlocking().value());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -173,7 +173,7 @@ public class ReactiveAdapterRegistryTests {
|
||||
Publisher<Integer> source = Flowable.fromArray(1);
|
||||
Object target = getAdapter(io.reactivex.Single.class).fromPublisher(source);
|
||||
assertTrue(target instanceof io.reactivex.Single);
|
||||
assertEquals(new Integer(1), ((io.reactivex.Single<Integer>) target).blockingGet());
|
||||
assertEquals(Integer.valueOf(1), ((io.reactivex.Single<Integer>) target).blockingGet());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -198,7 +198,7 @@ public class ReactiveAdapterRegistryTests {
|
||||
Object source = rx.Single.just(1);
|
||||
Object target = getAdapter(rx.Single.class).toPublisher(source);
|
||||
assertTrue("Expected Mono Publisher: " + target.getClass().getName(), target instanceof Mono);
|
||||
assertEquals(new Integer(1), ((Mono<Integer>) target).block(Duration.ofMillis(1000)));
|
||||
assertEquals(Integer.valueOf(1), ((Mono<Integer>) target).block(Duration.ofMillis(1000)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -232,7 +232,7 @@ public class ReactiveAdapterRegistryTests {
|
||||
Object source = io.reactivex.Single.just(1);
|
||||
Object target = getAdapter(io.reactivex.Single.class).toPublisher(source);
|
||||
assertTrue("Expected Mono Publisher: " + target.getClass().getName(), target instanceof Mono);
|
||||
assertEquals(new Integer(1), ((Mono<Integer>) target).block(Duration.ofMillis(1000)));
|
||||
assertEquals(Integer.valueOf(1), ((Mono<Integer>) target).block(Duration.ofMillis(1000)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -249,7 +249,7 @@ public class ReactiveAdapterRegistryTests {
|
||||
future.complete(1);
|
||||
Object target = getAdapter(CompletableFuture.class).toPublisher(future);
|
||||
assertTrue("Expected Mono Publisher: " + target.getClass().getName(), target instanceof Mono);
|
||||
assertEquals(new Integer(1), ((Mono<Integer>) target).block(Duration.ofMillis(1000)));
|
||||
assertEquals(Integer.valueOf(1), ((Mono<Integer>) target).block(Duration.ofMillis(1000)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.core.io.buffer;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URI;
|
||||
import java.nio.ByteBuffer;
|
||||
@@ -100,7 +99,6 @@ public class DataBufferUtilsTests extends AbstractDataBufferAllocatingTestCase {
|
||||
|
||||
@Test
|
||||
public void readInputStream() throws Exception {
|
||||
InputStream is = DataBufferUtilsTests.class.getResourceAsStream("DataBufferUtilsTests.txt");
|
||||
Flux<DataBuffer> flux = DataBufferUtils.readInputStream(
|
||||
() -> DataBufferUtilsTests.class.getResourceAsStream("DataBufferUtilsTests.txt"),
|
||||
this.bufferFactory, 3);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -71,12 +71,12 @@ public class CollectionUtilsTests {
|
||||
public void testMergePrimitiveArrayIntoCollection() {
|
||||
int[] arr = new int[] {1, 2};
|
||||
List<Comparable<?>> list = new LinkedList<>();
|
||||
list.add(new Integer(3));
|
||||
list.add(Integer.valueOf(3));
|
||||
|
||||
CollectionUtils.mergeArrayIntoCollection(arr, list);
|
||||
assertEquals(new Integer(3), list.get(0));
|
||||
assertEquals(new Integer(1), list.get(1));
|
||||
assertEquals(new Integer(2), list.get(2));
|
||||
assertEquals(Integer.valueOf(3), list.get(0));
|
||||
assertEquals(Integer.valueOf(1), list.get(1));
|
||||
assertEquals(Integer.valueOf(2), list.get(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -85,7 +85,7 @@ public class CollectionUtilsTests {
|
||||
defaults.setProperty("prop1", "value1");
|
||||
Properties props = new Properties(defaults);
|
||||
props.setProperty("prop2", "value2");
|
||||
props.put("prop3", new Integer(3));
|
||||
props.put("prop3", Integer.valueOf(3));
|
||||
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("prop4", "value4");
|
||||
@@ -93,7 +93,7 @@ public class CollectionUtilsTests {
|
||||
CollectionUtils.mergePropertiesIntoMap(props, map);
|
||||
assertEquals("value1", map.get("prop1"));
|
||||
assertEquals("value2", map.get("prop2"));
|
||||
assertEquals(new Integer(3), map.get("prop3"));
|
||||
assertEquals(Integer.valueOf(3), map.get("prop3"));
|
||||
assertEquals("value4", map.get("prop4"));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,12 +40,12 @@ public class NumberUtilsTests {
|
||||
String aFloat = "" + Float.MAX_VALUE;
|
||||
String aDouble = "" + Double.MAX_VALUE;
|
||||
|
||||
assertEquals("Byte did not parse", new Byte(Byte.MAX_VALUE), NumberUtils.parseNumber(aByte, Byte.class));
|
||||
assertEquals("Short did not parse", new Short(Short.MAX_VALUE), NumberUtils.parseNumber(aShort, Short.class));
|
||||
assertEquals("Integer did not parse", new Integer(Integer.MAX_VALUE), NumberUtils.parseNumber(anInteger, Integer.class));
|
||||
assertEquals("Long did not parse", new Long(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class));
|
||||
assertEquals("Float did not parse", new Float(Float.MAX_VALUE), NumberUtils.parseNumber(aFloat, Float.class));
|
||||
assertEquals("Double did not parse", new Double(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class));
|
||||
assertEquals("Byte did not parse", Byte.valueOf(Byte.MAX_VALUE), NumberUtils.parseNumber(aByte, Byte.class));
|
||||
assertEquals("Short did not parse", Short.valueOf(Short.MAX_VALUE), NumberUtils.parseNumber(aShort, Short.class));
|
||||
assertEquals("Integer did not parse", Integer.valueOf(Integer.MAX_VALUE), NumberUtils.parseNumber(anInteger, Integer.class));
|
||||
assertEquals("Long did not parse", Long.valueOf(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class));
|
||||
assertEquals("Float did not parse", Float.valueOf(Float.MAX_VALUE), NumberUtils.parseNumber(aFloat, Float.class));
|
||||
assertEquals("Double did not parse", Double.valueOf(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -58,12 +58,12 @@ public class NumberUtilsTests {
|
||||
String aFloat = "" + Float.MAX_VALUE;
|
||||
String aDouble = "" + Double.MAX_VALUE;
|
||||
|
||||
assertEquals("Byte did not parse", new Byte(Byte.MAX_VALUE), NumberUtils.parseNumber(aByte, Byte.class, nf));
|
||||
assertEquals("Short did not parse", new Short(Short.MAX_VALUE), NumberUtils.parseNumber(aShort, Short.class, nf));
|
||||
assertEquals("Integer did not parse", new Integer(Integer.MAX_VALUE), NumberUtils.parseNumber(anInteger, Integer.class, nf));
|
||||
assertEquals("Long did not parse", new Long(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class, nf));
|
||||
assertEquals("Float did not parse", new Float(Float.MAX_VALUE), NumberUtils.parseNumber(aFloat, Float.class, nf));
|
||||
assertEquals("Double did not parse", new Double(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class, nf));
|
||||
assertEquals("Byte did not parse", Byte.valueOf(Byte.MAX_VALUE), NumberUtils.parseNumber(aByte, Byte.class, nf));
|
||||
assertEquals("Short did not parse", Short.valueOf(Short.MAX_VALUE), NumberUtils.parseNumber(aShort, Short.class, nf));
|
||||
assertEquals("Integer did not parse", Integer.valueOf(Integer.MAX_VALUE), NumberUtils.parseNumber(anInteger, Integer.class, nf));
|
||||
assertEquals("Long did not parse", Long.valueOf(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class, nf));
|
||||
assertEquals("Float did not parse", Float.valueOf(Float.MAX_VALUE), NumberUtils.parseNumber(aFloat, Float.class, nf));
|
||||
assertEquals("Double did not parse", Double.valueOf(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class, nf));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -75,12 +75,12 @@ public class NumberUtilsTests {
|
||||
String aFloat = " " + Float.MAX_VALUE + " ";
|
||||
String aDouble = " " + Double.MAX_VALUE + " ";
|
||||
|
||||
assertEquals("Byte did not parse", new Byte(Byte.MAX_VALUE), NumberUtils.parseNumber(aByte, Byte.class));
|
||||
assertEquals("Short did not parse", new Short(Short.MAX_VALUE), NumberUtils.parseNumber(aShort, Short.class));
|
||||
assertEquals("Integer did not parse", new Integer(Integer.MAX_VALUE), NumberUtils.parseNumber(anInteger, Integer.class));
|
||||
assertEquals("Long did not parse", new Long(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class));
|
||||
assertEquals("Float did not parse", new Float(Float.MAX_VALUE), NumberUtils.parseNumber(aFloat, Float.class));
|
||||
assertEquals("Double did not parse", new Double(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class));
|
||||
assertEquals("Byte did not parse", Byte.valueOf(Byte.MAX_VALUE), NumberUtils.parseNumber(aByte, Byte.class));
|
||||
assertEquals("Short did not parse", Short.valueOf(Short.MAX_VALUE), NumberUtils.parseNumber(aShort, Short.class));
|
||||
assertEquals("Integer did not parse", Integer.valueOf(Integer.MAX_VALUE), NumberUtils.parseNumber(anInteger, Integer.class));
|
||||
assertEquals("Long did not parse", Long.valueOf(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class));
|
||||
assertEquals("Float did not parse", Float.valueOf(Float.MAX_VALUE), NumberUtils.parseNumber(aFloat, Float.class));
|
||||
assertEquals("Double did not parse", Double.valueOf(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -93,18 +93,18 @@ public class NumberUtilsTests {
|
||||
String aFloat = " " + Float.MAX_VALUE + " ";
|
||||
String aDouble = " " + Double.MAX_VALUE + " ";
|
||||
|
||||
assertEquals("Byte did not parse", new Byte(Byte.MAX_VALUE), NumberUtils.parseNumber(aByte, Byte.class, nf));
|
||||
assertEquals("Short did not parse", new Short(Short.MAX_VALUE), NumberUtils.parseNumber(aShort, Short.class, nf));
|
||||
assertEquals("Integer did not parse", new Integer(Integer.MAX_VALUE), NumberUtils.parseNumber(anInteger, Integer.class, nf));
|
||||
assertEquals("Long did not parse", new Long(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class, nf));
|
||||
assertEquals("Float did not parse", new Float(Float.MAX_VALUE), NumberUtils.parseNumber(aFloat, Float.class, nf));
|
||||
assertEquals("Double did not parse", new Double(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class, nf));
|
||||
assertEquals("Byte did not parse", Byte.valueOf(Byte.MAX_VALUE), NumberUtils.parseNumber(aByte, Byte.class, nf));
|
||||
assertEquals("Short did not parse", Short.valueOf(Short.MAX_VALUE), NumberUtils.parseNumber(aShort, Short.class, nf));
|
||||
assertEquals("Integer did not parse", Integer.valueOf(Integer.MAX_VALUE), NumberUtils.parseNumber(anInteger, Integer.class, nf));
|
||||
assertEquals("Long did not parse", Long.valueOf(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class, nf));
|
||||
assertEquals("Float did not parse", Float.valueOf(Float.MAX_VALUE), NumberUtils.parseNumber(aFloat, Float.class, nf));
|
||||
assertEquals("Double did not parse", Double.valueOf(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class, nf));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseNumberAsHex() {
|
||||
String aByte = "0x" + Integer.toHexString(new Byte(Byte.MAX_VALUE).intValue());
|
||||
String aShort = "0x" + Integer.toHexString(new Short(Short.MAX_VALUE).intValue());
|
||||
String aByte = "0x" + Integer.toHexString(Byte.valueOf(Byte.MAX_VALUE).intValue());
|
||||
String aShort = "0x" + Integer.toHexString(Short.valueOf(Short.MAX_VALUE).intValue());
|
||||
String anInteger = "0x" + Integer.toHexString(Integer.MAX_VALUE);
|
||||
String aLong = "0x" + Long.toHexString(Long.MAX_VALUE);
|
||||
String aReallyBigInt = "FEBD4E677898DFEBFFEE44";
|
||||
@@ -135,7 +135,7 @@ public class NumberUtilsTests {
|
||||
|
||||
@Test
|
||||
public void convertDoubleToBigInteger() {
|
||||
Double decimal = new Double(3.14d);
|
||||
Double decimal = Double.valueOf(3.14d);
|
||||
assertEquals(new BigInteger("3"), NumberUtils.convertNumberToTargetClass(decimal, BigInteger.class));
|
||||
}
|
||||
|
||||
@@ -223,8 +223,8 @@ public class NumberUtilsTests {
|
||||
catch (IllegalArgumentException expected) {
|
||||
}
|
||||
|
||||
assertEquals(new Long(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class));
|
||||
assertEquals(new Double(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class));
|
||||
assertEquals(Long.valueOf(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class));
|
||||
assertEquals(Double.valueOf(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -253,8 +253,8 @@ public class NumberUtilsTests {
|
||||
catch (IllegalArgumentException expected) {
|
||||
}
|
||||
|
||||
assertEquals(new Long(Long.MIN_VALUE), NumberUtils.parseNumber(aLong, Long.class));
|
||||
assertEquals(new Double(Double.MIN_VALUE), NumberUtils.parseNumber(aDouble, Double.class));
|
||||
assertEquals(Long.valueOf(Long.MIN_VALUE), NumberUtils.parseNumber(aLong, Long.class));
|
||||
assertEquals(Double.valueOf(Double.MIN_VALUE), NumberUtils.parseNumber(aDouble, Double.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -284,8 +284,8 @@ public class NumberUtilsTests {
|
||||
catch (IllegalArgumentException expected) {
|
||||
}
|
||||
|
||||
assertEquals(new Long(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class, nf));
|
||||
assertEquals(new Double(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class, nf));
|
||||
assertEquals(Long.valueOf(Long.MAX_VALUE), NumberUtils.parseNumber(aLong, Long.class, nf));
|
||||
assertEquals(Double.valueOf(Double.MAX_VALUE), NumberUtils.parseNumber(aDouble, Double.class, nf));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -315,8 +315,8 @@ public class NumberUtilsTests {
|
||||
catch (IllegalArgumentException expected) {
|
||||
}
|
||||
|
||||
assertEquals(new Long(Long.MIN_VALUE), NumberUtils.parseNumber(aLong, Long.class, nf));
|
||||
assertEquals(new Double(Double.MIN_VALUE), NumberUtils.parseNumber(aDouble, Double.class, nf));
|
||||
assertEquals(Long.valueOf(Long.MIN_VALUE), NumberUtils.parseNumber(aLong, Long.class, nf));
|
||||
assertEquals(Double.valueOf(Double.MIN_VALUE), NumberUtils.parseNumber(aDouble, Double.class, nf));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -102,7 +102,7 @@ public class ObjectUtilsTests {
|
||||
assertTrue(isEmpty(new Integer[0]));
|
||||
|
||||
assertFalse(isEmpty(new int[] { 42 }));
|
||||
assertFalse(isEmpty(new Integer[] { new Integer(42) }));
|
||||
assertFalse(isEmpty(new Integer[] { 42 }));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -737,7 +737,7 @@ public class ObjectUtilsTests {
|
||||
|
||||
@Test
|
||||
public void nullSafeToStringWithObjectArray() {
|
||||
Object[] array = {"Han", new Long(43)};
|
||||
Object[] array = {"Han", Long.valueOf(43)};
|
||||
assertEquals("{Han, 43}", ObjectUtils.nullSafeToString(array));
|
||||
}
|
||||
|
||||
|
||||
@@ -302,13 +302,13 @@ public class ReflectionUtilsTests {
|
||||
class Parent {
|
||||
@SuppressWarnings("unused")
|
||||
public Number m1() {
|
||||
return new Integer(42);
|
||||
return Integer.valueOf(42);
|
||||
}
|
||||
}
|
||||
class Leaf extends Parent {
|
||||
@Override
|
||||
public Integer m1() {
|
||||
return new Integer(42);
|
||||
return Integer.valueOf(42);
|
||||
}
|
||||
}
|
||||
int m1MethodCount = 0;
|
||||
|
||||
@@ -305,7 +305,7 @@ public class StringUtilsTests {
|
||||
public void testQuoteIfString() {
|
||||
assertEquals("'myString'", StringUtils.quoteIfString("myString"));
|
||||
assertEquals("''", StringUtils.quoteIfString(""));
|
||||
assertEquals(new Integer(5), StringUtils.quoteIfString(5));
|
||||
assertEquals(Integer.valueOf(5), StringUtils.quoteIfString(5));
|
||||
assertNull(StringUtils.quoteIfString(null));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,14 +35,14 @@ public class BooleanComparatorTests {
|
||||
@Test
|
||||
public void shouldCompareWithTrueLow() {
|
||||
Comparator<Boolean> c = new BooleanComparator(true);
|
||||
assertThat(c.compare(new Boolean(true), new Boolean(false)), is(-1));
|
||||
assertThat(c.compare(true, false), is(-1));
|
||||
assertThat(c.compare(Boolean.TRUE, Boolean.TRUE), is(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldCompareWithTrueHigh() {
|
||||
Comparator<Boolean> c = new BooleanComparator(false);
|
||||
assertThat(c.compare(new Boolean(true), new Boolean(false)), is(1));
|
||||
assertThat(c.compare(true, false), is(1));
|
||||
assertThat(c.compare(Boolean.TRUE, Boolean.TRUE), is(0));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,7 +37,7 @@ import org.junit.Test;
|
||||
*/
|
||||
public class ListBasedXMLEventReaderTests {
|
||||
|
||||
private final XMLInputFactory inputFactory = XMLInputFactory.newFactory();
|
||||
private final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
|
||||
|
||||
private final XMLOutputFactory outputFactory = XMLOutputFactory.newFactory();
|
||||
|
||||
@@ -65,4 +65,4 @@ public class ListBasedXMLEventReaderTests {
|
||||
return events;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user