| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1f3058b commit a915713
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -147,7 +147,7 @@ | |||
| 147 | 147 | description="Compile all source files"> | |
| 148 | 148 | </target> | |
| 149 | 149 | ||
| 150 | - <target name="do-compile" depends="resolve-java5-runtime"> | ||
| 150 | + <target name="do-compile" depends="resolve-java7-runtime"> | ||
| 151 | 151 | ||
| 152 | 152 | <echo message="Compiling src directory to classes/base and classes/test with command 'javac'" /> | |
| 153 | 153 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -158,21 +158,24 @@ public static JavaVersion parseClassVersion(java.io.InputStream is) { | |||
| 158 | 158 | } | |
| 159 | 159 | } | |
| 160 | 160 | ||
| 161 | - /** | ||
| 162 | - * Produce the {@code JavaVersion.FullVersion} corresponding to the given version string. Accepts | ||
| 163 | - * input of the form "1.6.0", "1.4.2_10", or "1.5.0_05-ea". The underscore may be replaced by a dot. | ||
| 164 | - * If the text cannot be parsed, a trivial version with major version UNRECOGNIZED is returned. | ||
| 165 | - * The location of the JDK, which may be null, will be stored in the version. | ||
| 166 | - * | ||
| 167 | - * @see <a href="http://java.sun.com/j2se/versioning_naming.html#">The Sun version specification</a> | ||
| 168 | - */ | ||
| 161 | + /** Produce the {@code JavaVersion.FullVersion} corresponding to the given version string. Accepts | ||
| 162 | + * input of the form "1.6.0", "1.4.2_10", or "1.5.0_05-ea". The underscore may be replaced by a dot. | ||
| 163 | + * If the text cannot be parsed, a trivial version with major version UNRECOGNIZED is returned. | ||
| 164 | + * The location of the JDK, which may be null, will be stored in the version. | ||
| 165 | + * | ||
| 166 | + * @see <a href="http://java.sun.com/j2se/versioning_naming.html#">The Sun version specification</a> | ||
| 167 | + */ | ||
| 168 | + // Why are underscores used as word separators in identifiers below? | ||
| 169 | 169 | public static FullVersion parseFullVersion(String java_version, | |
| 170 | 170 | String java_runtime_name, | |
| 171 | 171 | String java_vm_vendor, | |
| 172 | 172 | File location) { | |
| 173 | 173 | VendorType vendor = VendorType.UNKNOWN; | |
| 174 | 174 | String vendorString = null; | |
| 175 | 175 | ||
| 176 | + /** Strip trailing ".jdk" off of java_version strings from post Java 6 Oracle JVMs for Mac OS X. */ | ||
| 177 | + if (java_version.endsWith(".jdk")) java_version = java_version.substring(0, java_version.length() - 4); | ||
| 178 | + | ||
| 176 | 179 | if (vendor == VendorType.UNKNOWN) { | |
| 177 | 180 | if (java_runtime_name.toLowerCase().contains("openjdk")) { | |
| 178 | 181 | vendor = VendorType.OPENJDK; | |
@@ -194,7 +197,7 @@ else if (java_vm_vendor.toLowerCase().contains("sun") || | |||
| 194 | 197 | // if version doesn't start with "1." and has only one dot, prefix with "1." | |
| 195 | 198 | // example: 6.0 --> 1.6.0 | |
| 196 | 199 | if ((!java_version.startsWith("1.")) && (java_version.replaceAll("[^\\.]","").length()==1)) { | |
| 197 | - java_version = "1."+java_version; | ||
| 200 | + java_version = "1." + java_version; | ||
| 198 | 201 | } | |
| 199 | 202 | int dash = java_version.indexOf('-'); | |
| 200 | 203 | if (dash == -1) { number = java_version; typeString = null; } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments