Skip to content
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

BLADE-516 Add 5 sec timeout to automatic update check #45

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

lawrence-lee
Copy link

No description provided.

@lawrence-lee
Copy link
Author

@christopherbryanboyd, can I get your review on this?

}
catch (Exception e) {
e.printStackTrace(bladeCLI.error());
}

Choose a reason for hiding this comment

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

Perhaps we should throw these as RuntimeExceptions and let the top level try/catch handle them?
Essentially they do the same thing, printing the error, so that would unify the behavior.

catch (Exception e) {
e.printStackTrace(bladeCLI.error());
}
});

Stream<File> webPluginStream = webPlugins.stream();

Choose a reason for hiding this comment

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

Perhaps these streams should be wrapped in a try-with-resources block?
Otherwise if an exception is thrown, the stream might not get closed.

}
}
catch (IOException e) {
}

Choose a reason for hiding this comment

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

Do we want to do anything with this exception?

try {
warsDir.mkdirs();
private void _convertToWarProject(File pluginsSdkDir, File warsDir, File pluginDir, boolean removeSource)
throws Exception {

Choose a reason for hiding this comment

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

This is a rather large method, probably not a big deal right now but eventually I think we should consider refactoring this.

}

private static class GAV {

Choose a reason for hiding this comment

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

I don't think it is good Java naming conventions to have a fully upper-case class, perhaps we could rename it GroupArtifactVersion, or something like that?

_artifactId = Optional.ofNullable(artifactId);
_version = Optional.ofNullable(version);
}

Choose a reason for hiding this comment

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

Why are these all Object rather than String?

@@ -144,7 +144,7 @@ public void testLoadCommandsWithCustomExtensionInWorkspace() throws Exception {

File workspaceDir = temporaryFolder.newFolder("build", "test", "workspace");

String[] args = {"--base", workspaceDir.getPath(), "init", "-P", "foo", "-v", "7.2"};
String[] args = {"--base", workspaceDir.getPath(), "init", "-P", "foo", "-v", "7.3"};

Choose a reason for hiding this comment

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

Should we have both 7.2 and 7.3 tests, or is it good enough to just test 7.3?

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.

3 participants