Skip to content

Min supported Java version check added #1820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Min supported Java version check added #1820

wants to merge 1 commit into from

Conversation

enchev
Copy link
Contributor

@enchev enchev commented Jun 9, 2016

Related to #1729

@@ -159,6 +159,13 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {

public validateJavacVersion(installedJavaVersion: string, options?: { showWarningsAsErrors: boolean }): IFuture<boolean> {
return ((): boolean => {
// Check for min supported Java version
let minJavaVersion = "1.8";
if (parseInt(installedJavaVersion.substr(0, 3).replace(".", "")) < parseInt(minJavaVersion.replace(".", ""))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could fail on several places, installedJavaVersion could be null or undefined.
parseInt could return NaN

@enchev
Copy link
Contributor Author

enchev commented Jun 9, 2016

MIN_JAVA_VERSION! I totally missed this!

@enchev enchev closed this Jun 9, 2016
@enchev enchev deleted the java-version branch June 9, 2016 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants