Skip to content

Commit

Permalink
devonfw#103: last small changes
Browse files Browse the repository at this point in the history
- removed this.paths.add(path) in method SystemPath.addPath()
- linked new issue to TODO
- added some java doc
  • Loading branch information
MattesMrzik committed Jan 26, 2024
1 parent cbe086d commit 20fecc3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ public Path retrievePath(String tool) {
*/
public void addPath(String tool, Path path) {

this.paths.add(path);
this.tool2pathMap.put(tool, path);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private static void debugInfo(Vulnerability vulnerability, VersionRange versionR
protected static BigDecimal getBigDecimalSeverity(Vulnerability vulnerability) {

if (vulnerability.getCvssV2() == null && vulnerability.getCvssV3() == null) {
// TODO if this ever happens, add a case that handles this
// TODO if this ever happens, add a case that handles this. See https://github.com/devonfw/IDEasy/issues/190
throw new RuntimeException("Vulnerability without severity found: " + vulnerability.getName() + "\\n"
+ " Please contact https://github.com/devonfw/IDEasy and make a request to get this feature implemented.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public UrlAnalyzer(UpdateManager updateManager) {
this.updateManager = updateManager;
}

/**
* Analyzes the given {@link Dependency} and adds {@link Evidence} to it. Namely, CPE vendor, product, edition and
* version.
*
* @param dependency the dependency to analyze.
* @param engine not actually used here, but needs to match the signature of the super class.
*/
@Override
protected void analyzeDependency(Dependency dependency, Engine engine) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
*/
public class UrlFileFilter implements FileFilter {

/**
* This method only accepts files with name {@link UrlStatusFile#STATUS_JSON}.
*
* @param pathname the {@link java.io.File} to check.
*/
@Override
public boolean accept(java.io.File pathname) {

Expand Down

0 comments on commit 20fecc3

Please sign in to comment.