use of org.apache.commons.lang3.JavaVersion in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardFacet method getRuntimeJavaVersion.
/**
* Returns the {@link JavaVersion} of the Java runtime, as defined in the {@code
* appengine-web.xml}.
*
* <p>If no runtime is specified in the {@code appengine-web.xml} or if the specified runtime is
* not valid, {@link JavaVersion#JAVA_1_7} is returned.
*/
public JavaVersion getRuntimeJavaVersion() {
AppEngineStandardWebApp appEngineStandardWebApp = getAppEngineStandardWebXml();
if (appEngineStandardWebApp != null) {
String runtimeString = appEngineStandardWebApp.getRuntime().getStringValue();
JavaVersion runtimeVersion = RUNTIMES_MAP.get(runtimeString);
if (runtimeVersion != null) {
return runtimeVersion;
}
}
// The default runtime is Java 7.
return JavaVersion.JAVA_1_7;
}
Aggregations