mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-25 18:41:44 +01:00
checkstyle/pmd/findbugs corrections
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 The OWASP Foundatio. All Rights Reserved.
|
* Copyright (c) 2015 The OWASP Foundation. All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
package org.owasp.dependencycheck.analyzer;
|
package org.owasp.dependencycheck.analyzer;
|
||||||
|
|
||||||
|
|||||||
@@ -62,12 +62,15 @@ public class NodePackageAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
*/
|
*/
|
||||||
private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
|
private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The file name to scan.
|
||||||
|
*/
|
||||||
public static final String PACKAGE_JSON = "package.json";
|
public static final String PACKAGE_JSON = "package.json";
|
||||||
/**
|
/**
|
||||||
* Filter that detects files named "package.json".
|
* Filter that detects files named "package.json".
|
||||||
*/
|
*/
|
||||||
private static final FileFilter PACKAGE_JSON_FILTER
|
private static final FileFilter PACKAGE_JSON_FILTER = FileFilterBuilder.newInstance()
|
||||||
= FileFilterBuilder.newInstance().addFilenames(PACKAGE_JSON).build();
|
.addFilenames(PACKAGE_JSON).build();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the FileFilter
|
* Returns the FileFilter
|
||||||
@@ -150,6 +153,13 @@ public class NodePackageAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds information to an evidence collection from the node json configuration.
|
||||||
|
*
|
||||||
|
* @param json information from node.js
|
||||||
|
* @param collection a set of evidence about a dependency
|
||||||
|
* @param key the key to obtain the data from the json information
|
||||||
|
*/
|
||||||
private void addToEvidence(JsonObject json, EvidenceCollection collection, String key) {
|
private void addToEvidence(JsonObject json, EvidenceCollection collection, String key) {
|
||||||
if (json.containsKey(key)) {
|
if (json.containsKey(key)) {
|
||||||
final JsonValue value = json.get(key);
|
final JsonValue value = json.get(key);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 The OWASP Foundatio. All Rights Reserved.
|
* Copyright (c) 2015 The OWASP Foundation. All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
package org.owasp.dependencycheck.data.composer;
|
package org.owasp.dependencycheck.data.composer;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 The OWASP Foundatio. All Rights Reserved.
|
* Copyright (c) 2015 The OWASP Foundation. All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
package org.owasp.dependencycheck.data.composer;
|
package org.owasp.dependencycheck.data.composer;
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ package org.owasp.dependencycheck.data.lucene;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|
||||||
import org.apache.lucene.analysis.TokenFilter;
|
import org.apache.lucene.analysis.TokenFilter;
|
||||||
import org.apache.lucene.analysis.TokenStream;
|
import org.apache.lucene.analysis.TokenStream;
|
||||||
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
||||||
|
|||||||
Reference in New Issue
Block a user