Skip to content

Commit dd552ba

Browse files
committed
Fixed some deprecation warnings
1 parent 4e0324a commit dd552ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/com/github/robtimus/obfuscation/ObfuscatingPropertiesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void testToString() {
248248
// That's fine though, as objectProperties suffers the same issue.
249249

250250
// In Java 9, Properties was refactored. As a result, it throws a StackOverflowError if the Properties object contains (parts of) itself
251-
if (JRE.currentVersion().compareTo(JRE.JAVA_8) <= 0) {
251+
if (JRE.currentJre().compareTo(JRE.JAVA_8) <= 0) {
252252
assertHasToString(objectObfuscating.values(), "[", "]", "[***]", "(***)", "[***]", "(***)");
253253
} else {
254254
assertThrows(StackOverflowError.class, objectProperties.values()::toString);
@@ -294,7 +294,7 @@ void testToString() {
294294
// As a result, the entrySet's toString() is inherited from Object, and the obfuscated value is not (***) but j***X, where X is the last
295295
// character of the hexadecimal hashCode
296296
// In Java 16 this was fixed, but as a result, it throws a StackOverflowError if the Properties object contains (parts of) itself
297-
JRE currentJRE = JRE.currentVersion();
297+
JRE currentJRE = JRE.currentJre();
298298
if (currentJRE.compareTo(JRE.JAVA_8) <= 0) {
299299
assertHasToString(objectObfuscating.entrySet(), "[", "]", "keySet=[***]", expectedEntrySetValue, "obfuscatingKeySet=[***]",
300300
"obfuscatingEntrySet=(***)");

0 commit comments

Comments
 (0)