| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
cloudstack-pull-rats #379 SUCCESS |
Sorry, something went wrong.
|
cloudstack-pull-analysis #312 SUCCESS |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
@jburwell can you review this please? Thanks! |
Sorry, something went wrong.
There was a problem hiding this comment.
Reading through this block, it feels like lines 289-293 should be extracted to a private method:
static parseDevice(final String line) {
final String[] tokens = line.split( " ");
if (tokens != null && tokens.length < 2) {
return "";
}
final String device = tokens[2];
return Strings.isNullOrEmpty(device) : " " ? device;
}
The extraction of this method would not only shorten the deleteExitingLinkLocalLocalRoutetTable method, but clearly express the intent. It also allows a unit test to be written to verify that parsing works as expected for different types of input.
Sorry, something went wrong.
There was a problem hiding this comment.
With respect to this specific code, I would like do this the next time we do a round of refactoring, possibly factor such code to a util class that can be used as a general purpose line parsing static method and add unit tests. For now, at least the code takes care of malformed inputs.
Sorry, something went wrong.
|
While it is a small nit and not expressly within the scope of this PR, could you fix the spelling mistake in the deleteExitingLinkLocalRouteTable name? |
Sorry, something went wrong.
Based on @jburwell's comment on PR apache#718 This closes apache#735 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
renamed the method, s/deleteExitingLinkLocalRouteTable/deleteExistingLinkLocalRouteTable/g |
Sorry, something went wrong.
|
cloudstack-pull-rats #403 SUCCESS |
Sorry, something went wrong.
|
cloudstack-pull-analysis #336 UNSTABLE |
Sorry, something went wrong.
* fix message empty or undefined when switch project * transalte message text Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
| Back | FazBrowse Home | New Git URL |
Based on @jburwell's comment on PR #718