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
CLI and TaskExecutor #5
Conversation
|
||
private static String buildJson(Object obj) { | ||
Gson gson = new Gson(); | ||
return gson.toJson(obj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just: return new Gson().toJson(obj);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed method and instead use String objectInJson = new Gson().toJson(obj);
Regarding file: |
try { | ||
writeOutputFile(objectInJson, outputFile); | ||
} catch (IOException ex) { | ||
Logger.getLogger(JsonWriter.class.getName()).log(Level.SEVERE, null, ex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad idea to not rethrow exceptions in a generic helper like this. I also don't think it's necessary to log the exception here - let whatever handles the final exception do logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Factored the two methods into one and the method now throws the exception to be handled later.
When I run
|
Review done. Sorry, it took me way too long to get to this. |
The errors with |
Start using the new container based travis for faster build results
This branch seems stale. While we do need a better |
I'll cherrypick some of the changes and then close the pr |
Some of the commits manually added to master. |
In future could improve CLI to allow multiple projects/tasks in one command.