checkstyle corrections

This commit is contained in:
Jeremy Long
2017-03-12 18:03:27 -04:00
parent 675349c06f
commit 371dba948d
24 changed files with 263 additions and 182 deletions

View File

@@ -257,7 +257,7 @@ public class Check extends Update {
*
* @param r the reference to a path, fileset, dirset or filelist.
*/
public void setRefId(Reference r) {
public synchronized void setRefId(Reference r) {
if (path != null) {
throw new BuildException("Nested elements are not allowed when using the refId attribute.");
}
@@ -923,7 +923,7 @@ public class Check extends Update {
log(ex.getMessage(), Project.MSG_ERR);
}
} else {
for (Resource resource : path) {
for (Resource resource : getPath()) {
final FileProvider provider = resource.as(FileProvider.class);
if (provider != null) {
final File file = provider.getFile();
@@ -987,7 +987,7 @@ public class Check extends Update {
* @throws BuildException if the task was not configured correctly.
*/
private void validateConfiguration() throws BuildException {
if (path == null) {
if (getPath() == null) {
throw new BuildException("No project dependencies have been defined to analyze.");
}
if (failBuildOnCVSS < 0 || failBuildOnCVSS > 11) {

View File

@@ -144,7 +144,6 @@ public class Purge extends Task {
*/
protected void populateSettings() throws BuildException {
Settings.initialize();
try (InputStream taskProperties = this.getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE)) {
Settings.mergeProperties(taskProperties);
} catch (IOException ex) {