Skip to content

Commit

Permalink
Merge pull request #210 from DevFactory/release/collections.emptyList…
Browse files Browse the repository at this point in the history
…-should-be-used-fix1

Fixing squid:S1596 - Collections.emptyList(), emptyMap() and emptySet() should be used instead of Collections.EMPTY_LIST, EMPTY_MAP and EMPTY_SET
  • Loading branch information
ctrueden committed Feb 25, 2016
2 parents e816d1c + a8f8e0f commit 3f8c317
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ protected final String getRuntime(final AOL aol) throws MojoExecutionException {

protected final List getTests() {
if (this.tests == null) {
this.tests = Collections.EMPTY_LIST;
this.tests = Collections.emptyList();
}
return this.tests;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/maven_nar/AbstractNarMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected final NarLayout getLayout() throws MojoExecutionException {

protected final List<Library> getLibraries() {
if (this.libraries == null) {
this.libraries = Collections.EMPTY_LIST;
this.libraries = Collections.emptyList();
}
return this.libraries;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/github/maven_nar/NarCompileMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ protected ScopeFilter getArtifactScopeFilter() {

private List getSourcesFor(final Compiler compiler) throws MojoFailureException, MojoExecutionException {
if (compiler == null) {
return Collections.EMPTY_LIST;
return Collections.emptyList();
}

try {
Expand All @@ -431,7 +431,7 @@ private List getSourcesFor(final Compiler compiler) throws MojoFailureException,
}
return files;
} catch (final IOException e) {
return Collections.EMPTY_LIST;
return Collections.emptyList();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ private PBXObjectRef addDependency(final Map objects, final PBXObjectRef project
final PBXObjectRef referenceProxy = createPBXReferenceProxy(proxy, dependency);
objects.put(referenceProxy.getID(), referenceProxy.getProperties());

final PBXObjectRef buildFile = createPBXBuildFile(referenceProxy, Collections.EMPTY_MAP);
final PBXObjectRef buildFile = createPBXBuildFile(referenceProxy, Collections.emptyMap());
objects.put(buildFile.getID(), buildFile.getProperties());

final List productsChildren = new ArrayList();
Expand Down

0 comments on commit 3f8c317

Please sign in to comment.