/** * Whether the selected -target is known to be incompatible with * the default -source value of the selected JDK's javac. * * <p>Assumes it will never be called unless the selected JDK is * at least Java 1.5.</p> * * @param t the -target value, must not be null */ private boolean mustSetSourceForTarget(String t) { if (assumeJava14()) { return false; } if (t.startsWith("1.")) { t = t.substring(2); } return "1".equals(t) || "2".equals(t) || "3".equals(t) || "4".equals(t) || (("5".equals(t) || "6".equals(t)) && !assumeJava15() && !assumeJava16()) || ("7".equals(t) && !assumeJava17()) || ("8".equals(t) && !assumeJava18()) || ("9".equals(t) && !assumeJava9Plus()); }
/** * A string that describes the default value for -source of the * selected JDK's javac. */ private String getDefaultSource() { if (assumeJava15() || assumeJava16()) { return "1.5 in JDK 1.5 and 1.6"; } if (assumeJava17()) { return "1.7 in JDK 1.7"; } if (assumeJava18()) { return "1.8 in JDK 1.8"; } if (assumeJava9Plus()) { return "9 in JDK 9"; } return ""; }
|| assumeJava17()) { attributes.log( "Support for javac -h has been added in Java8, ignoring it");