-
Notifications
You must be signed in to change notification settings - Fork 53
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
Miscellaneous cleanup #458
Conversation
@@ -488,7 +488,7 @@ public static void cloneFromScm( | |||
* <li><code>git checkout FETCH_HEAD</code> | |||
* </ul> | |||
* | |||
* @param gitURL The git native URL, see the <a | |||
* @param gitUrl The git native URL, see the <a |
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.
This was not matching the case of the actual parameter.
} | ||
return moreInfo; |
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.
One-line code deduplication.
} catch (ReflectiveOperationException e) { | ||
throw new RuntimeException("Error when loading " + c.getName(), e); |
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.
This should never happen, and if it does it is a serious error that would invalidate our confidence in the test run, so throw it up and halt execution.
File pom = new File(rootDir.getAbsolutePath() + "/" + pomFileName); | ||
Document doc; | ||
try { | ||
doc = new SAXReader().read(pom); | ||
} catch (DocumentException x) { | ||
throw new IOException(x); | ||
throw new PomTransformationException("Failed to parse pom.xml", x); |
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.
Making this class consistent with the error handling philosophy elsewhere of failing fast and avoiding abuse of IOException
.
Another bunch of miscellaneous cleanup hunks that I've been collecting in a branch for a few weeks now. I tested these in BOM with
PLUGINS=text-finder bash local-test.sh
.