[java-support] branch maint-7 updated: JPAR-106 - address Java 9 deprecations
Ian Young
ian at iay.org.uk
Wed Feb 21 12:56:54 EST 2018
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch maint-7
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=fcff07c2e50e0fb96dff763013c500c3110e2f1c
The following commit(s) were added to refs/heads/maint-7 by this push:
new fcff07c JPAR-106 - address Java 9 deprecations
fcff07c is described below
commit fcff07c2e50e0fb96dff763013c500c3110e2f1c
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Feb 21 17:53:01 2018 +0000
JPAR-106 - address Java 9 deprecations
---
.../net/shibboleth/utilities/java/support/collection/MapTest.java | 2 +-
.../net/shibboleth/utilities/java/support/collection/PairTest.java | 4 ++--
.../utilities/java/support/net/SimpleURLCanonicalizerTest.java | 2 +-
.../utilities/java/support/primitive/LazilyFormattedStringTest.java | 4 ++--
.../utilities/java/support/primitive/ObjectSupportTest.java | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/test/java/net/shibboleth/utilities/java/support/collection/MapTest.java b/src/test/java/net/shibboleth/utilities/java/support/collection/MapTest.java
index 2423247..ac12c2c 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/collection/MapTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/collection/MapTest.java
@@ -43,7 +43,7 @@ public class MapTest {
private final static Object VALUE_2 = "Value2";
- private final static Integer INTEGER_3 = new Integer(2);
+ private final static Integer INTEGER_3 = 2;
private final static Object VALUE_3 = INTEGER_3;
diff --git a/src/test/java/net/shibboleth/utilities/java/support/collection/PairTest.java b/src/test/java/net/shibboleth/utilities/java/support/collection/PairTest.java
index e4623b5..c57c1fb 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/collection/PairTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/collection/PairTest.java
@@ -27,9 +27,9 @@ public class PairTest {
private final static String STRING_2 = "StringTwo";
- private final static Integer INTEGER_1 = new Integer(-6);
+ private final static Integer INTEGER_1 = -6;
- private final static Integer INTEGER_2 = new Integer(0);
+ private final static Integer INTEGER_2 = 0;
@Test
public void testPair() {
diff --git a/src/test/java/net/shibboleth/utilities/java/support/net/SimpleURLCanonicalizerTest.java b/src/test/java/net/shibboleth/utilities/java/support/net/SimpleURLCanonicalizerTest.java
index a7b3451..ff38015 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/net/SimpleURLCanonicalizerTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/net/SimpleURLCanonicalizerTest.java
@@ -47,7 +47,7 @@ public class SimpleURLCanonicalizerTest {
Assert.assertEquals(SimpleURLCanonicalizer.canonicalize("http://www.example.org:8080/Foo/Bar/baz"), "http://www.example.org:8080/Foo/Bar/baz");
SimpleURLCanonicalizer.registerSchemePortMapping("myscheme", 1967);
- Assert.assertEquals(SimpleURLCanonicalizer.getRegisteredPort("MyScheme"), new Integer(1967));
+ Assert.assertEquals(SimpleURLCanonicalizer.getRegisteredPort("MyScheme"), Integer.valueOf(1967));
}
}
diff --git a/src/test/java/net/shibboleth/utilities/java/support/primitive/LazilyFormattedStringTest.java b/src/test/java/net/shibboleth/utilities/java/support/primitive/LazilyFormattedStringTest.java
index 3f08341..92a5e9f 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/primitive/LazilyFormattedStringTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/primitive/LazilyFormattedStringTest.java
@@ -29,7 +29,7 @@ public class LazilyFormattedStringTest {
@Test public void testFormat() {
Formatter formatter = new Formatter();
- Object value = new Integer(1234567);
+ Object value = Integer.valueOf(1234567);
formatter.format(FORMAT, value, value, value);
LazilyFormattedString testString = new LazilyFormattedString(FORMAT, value, value, value);
@@ -40,7 +40,7 @@ public class LazilyFormattedStringTest {
@Test public void testNullFormat() {
Formatter formatter = new Formatter();
- Object value = new Integer(78654321);
+ Object value = Integer.valueOf(78654321);
formatter.format(FORMAT, null, value, null, value);
LazilyFormattedString testString = new LazilyFormattedString(FORMAT, null, value, null, value);
diff --git a/src/test/java/net/shibboleth/utilities/java/support/primitive/ObjectSupportTest.java b/src/test/java/net/shibboleth/utilities/java/support/primitive/ObjectSupportTest.java
index 3a6ff22..9ba22bb 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/primitive/ObjectSupportTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/primitive/ObjectSupportTest.java
@@ -42,8 +42,8 @@ public class ObjectSupportTest {
}
@Test public void testHashCode() {
- ComplexClass c1 = new ComplexClass(new Integer(1), new Double(3.4), "String!");
- ComplexClass c2 = new ComplexClass("String3", new Integer(1243), new Boolean(false));
+ ComplexClass c1 = new ComplexClass(Integer.valueOf(1), Double.valueOf(3.4), "String!");
+ ComplexClass c2 = new ComplexClass("String3", Integer.valueOf(1243), Boolean.valueOf(false));
Assert.assertEquals(ObjectSupport.hashCode(null), 0, "Hashcode of null is 0");
Assert.assertEquals(ObjectSupport.hashCode(c1), c1.hashCode(),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list