|
15 | 15 | */ |
16 | 16 | package com.redhat.exhort.providers; |
17 | 17 |
|
| 18 | +import java.nio.file.Path; |
| 19 | +import java.util.HashMap; |
| 20 | +import java.util.Map; |
| 21 | +import java.util.TreeMap; |
| 22 | + |
18 | 23 | import com.fasterxml.jackson.databind.JsonNode; |
19 | 24 | import com.fasterxml.jackson.databind.node.ArrayNode; |
20 | 25 | import com.github.packageurl.PackageURL; |
21 | 26 | import com.redhat.exhort.providers.javascript.model.Manifest; |
22 | 27 | import com.redhat.exhort.sbom.Sbom; |
23 | | -import java.nio.file.Path; |
24 | | -import java.util.HashMap; |
25 | | -import java.util.Map; |
26 | | -import java.util.TreeMap; |
27 | 28 |
|
28 | 29 | /** Concrete implementation of the Yarn Classic processor, supporting Yarn 1.x */ |
29 | 30 | public final class YarnClassicProcessor extends YarnProcessor { |
@@ -138,7 +139,7 @@ private static class NodeMetaData { |
138 | 139 | this.nodeName = node.get("name").asText(); |
139 | 140 | var versionIdx = nodeName.lastIndexOf("@"); |
140 | 141 | this.name = nodeName.substring(0, versionIdx); |
141 | | - this.version = nodeName.substring(versionIdx); |
| 142 | + this.version = nodeName.substring(versionIdx + 1); |
142 | 143 | this.purl = JavaScriptProvider.toPurl(name, version); |
143 | 144 | var shadowNode = node.get("shadow"); |
144 | 145 | this.shadow = shadowNode != null && shadowNode.asBoolean(); |
|
0 commit comments