From e997263e3914d1bd016cbc5932b89331783da6ad Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Sat, 4 Nov 2023 20:39:48 +0100 Subject: [PATCH] Retter test. --- .../test/java/net/bytebuddy/ClassFileVersionOtherTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/ClassFileVersionOtherTest.java b/byte-buddy-dep/src/test/java/net/bytebuddy/ClassFileVersionOtherTest.java index 47ff3e66a8..6352930af2 100644 --- a/byte-buddy-dep/src/test/java/net/bytebuddy/ClassFileVersionOtherTest.java +++ b/byte-buddy-dep/src/test/java/net/bytebuddy/ClassFileVersionOtherTest.java @@ -19,7 +19,9 @@ public void testExplicitConstructionOfUnknownVersion() throws Exception { Pattern pattern = Pattern.compile("V[0-9]+(_[0-9]+)?"); for (Field field : Opcodes.class.getFields()) { if (pattern.matcher(field.getName()).matches()) { - if (version < Double.parseDouble(field.getName().substring(1).replace('_', '.'))) { + double candidate = Double.parseDouble(field.getName().substring(1).replace('_', '.')); + if (version < candidate) { + version = candidate; value = field.getInt(null); } }