mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-08-28 09:26:54 +00:00
Remove obsolete Java < 1.6 version check
The parsing throws StringIndexOutOfBoundsException when the version does not contain '.' such as version "17". This check could never actually trigger as the class cannot even be loaded on 1.7 or earlier, so there's no reason to keep it. Fixes #439
This commit is contained in:
@@ -192,17 +192,7 @@ public class Heritrix {
|
||||
System.out.println(System.getProperty("java.vendor")
|
||||
+ ' ' + System.getProperty("java.runtime.name")
|
||||
+ ' ' + System.getProperty("java.runtime.version"));
|
||||
|
||||
// ensure using java 1.6+ before hitting a later cryptic error
|
||||
String version = System.getProperty("java.version");
|
||||
float floatVersion = Float.valueOf(version.substring(0,version.indexOf('.',2)));
|
||||
if(floatVersion<1.6) {
|
||||
System.err.println("Heritrix (as of version 3) requires Java 1.6 or higher.");
|
||||
System.err.println("You attempted to launch with: "+version);
|
||||
System.err.println("Please try again with a later Java.");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
|
||||
// Set some system properties early.
|
||||
// Can't use class names here without loading them.
|
||||
String ignoredSchemes = "org.archive.net.UURIFactory.ignored-schemes";
|
||||
|
||||
Reference in New Issue
Block a user