Skip to content

Commit ca20093

Browse files
shredcmaglie
authored andcommitted
Remove Java version evaluation
According to JEP223, Java versions do not include trailing zero elements. This means that e.g. Java 14.0.0 reports its version just as "14". The changed code part expected at least three characters, so it failed to start on such "zero-zero" Java releases. The evaluated java version was not used anywhere, so the code block was removed.
1 parent a1e43ce commit ca20093

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

arduino-core/src/processing/app/legacy/PApplet.java

-21
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,6 @@ public class PApplet {
1616
/** Path to sketch folder */
1717
public String sketchPath; //folder;
1818

19-
/**
20-
* Full name of the Java version (i.e. 1.5.0_11).
21-
* Prior to 0125, this was only the first three digits.
22-
*/
23-
public static final String javaVersionName =
24-
System.getProperty("java.version");
25-
26-
/**
27-
* Version of Java that's in use, whether 1.1 or 1.3 or whatever,
28-
* stored as a float.
29-
* <P>
30-
* Note that because this is stored as a float, the values may
31-
* not be <EM>exactly</EM> 1.3 or 1.4. Instead, make sure you're
32-
* comparing against 1.3f or 1.4f, which will have the same amount
33-
* of error (i.e. 1.40000001). This could just be a double, but
34-
* since Processing only uses floats, it's safer for this to be a float
35-
* because there's no good way to specify a double with the preproc.
36-
*/
37-
public static final float javaVersion =
38-
new Float(javaVersionName.substring(0, 3)).floatValue();
39-
4019
/**
4120
* Current platform in use, one of the
4221
* PConstants WINDOWS, MACOSX, MACOS9, LINUX or OTHER.

0 commit comments

Comments
 (0)