Skip to content

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

Open
lawrence-lee wants to merge 18 commits into
christopherbryanboyd:masterfrom
lawrence-lee:blade-516
Open

BLADE-516 Add 5 sec timeout to automatic update check#45
lawrence-lee wants to merge 18 commits into
christopherbryanboyd:masterfrom
lawrence-lee:blade-516

Conversation

@lawrence-lee

Copy link
Copy Markdown

No description provided.

@lawrence-lee

Copy link
Copy Markdown
Author

@christopherbryanboyd, can I get your review on this?

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

Copy link
Copy Markdown
Owner

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.

});

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

Copy link
Copy Markdown
Owner

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) {
}

Copy link
Copy Markdown
Owner

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?

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

Copy link
Copy Markdown
Owner

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 {

Copy link
Copy Markdown
Owner

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);
}

Copy link
Copy Markdown
Owner

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?


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

Copy link
Copy Markdown
Owner

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