Waikato / moa

MOA is an open source framework for Big Data stream mining. It includes a collection of machine learning algorithms (classification, regression, clustering, outlier detection, concept drift detection and recommender systems) and tools for evaluation.
http://moa.cms.waikato.ac.nz/
GNU General Public License v3.0
610 stars 353 forks source link

System.getProperty("java.version") format in Java 9. #118

Closed 5hubh4m closed 6 years ago

5hubh4m commented 6 years ago

In Java 9, the System.getProperty("java.version") is simply the string "9". Therefore the call version.charAt(2) throws exception.

$ java -version java version "9" Java(TM) SE Runtime Environment (build 9+181) Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

$ java -cp moa.jar -javaagent:(pwd)/sizeofag-1.0.0.jar moa.gui.GUI java.lang.StringIndexOutOfBoundsException: String index out of range: 2 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:44) at java.base/java.lang.String.charAt(String.java:704) at moa.DoTask.isJavaVersionOK(DoTask.java:60) at moa.gui.GUI.main(GUI.java:78)

On macOS 10.13 with brew cask install java.

abifet commented 6 years ago

Thanks! We solved this issue in this commit:

https://github.com/Waikato/moa/commit/7265bb566face3d015d11246de1a97d572481283