This repository was archived by the owner on Feb 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
main/java/org/owasp/dependencycheck/utils
test/java/org/owasp/dependencycheck/utils Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public static int getJavaVersion() {
63
63
*/
64
64
public static int getJavaUpdateVersion () {
65
65
//"1.8.0_144" "11.0.2+9" "17.0.8.1"
66
- String runtimeVersion = System .getProperty ("java.runtime. version" );
66
+ String runtimeVersion = System .getProperty ("java.version" );
67
67
return parseUpdate (runtimeVersion );
68
68
}
69
69
Original file line number Diff line number Diff line change 18
18
package org .owasp .dependencycheck .utils ;
19
19
20
20
import org .junit .Test ;
21
+
21
22
import static org .junit .Assert .*;
22
23
23
24
/**
24
- *
25
25
* @author Jeremy Long
26
26
*/
27
27
public class UtilsTest {
@@ -47,6 +47,11 @@ public void testParseUpdate() {
47
47
result = Utils .parseUpdate (runtimeVersion );
48
48
assertEquals (expResult , result );
49
49
50
+ runtimeVersion = "11.0.2" ;
51
+ expResult = 2 ;
52
+ result = Utils .parseUpdate (runtimeVersion );
53
+ assertEquals (expResult , result );
54
+
50
55
runtimeVersion = "17.0.8.1" ;
51
56
expResult = 8 ;
52
57
result = Utils .parseUpdate (runtimeVersion );
You can’t perform that action at this time.
0 commit comments