Skip to content

Commit

Permalink
Merge pull request #118 from HubSpot/fix-file-err
Browse files Browse the repository at this point in the history
Fix file path error in tests
  • Loading branch information
bequinn-hubspot authored Dec 18, 2023
2 parents da96292 + 3450608 commit b3f7a81
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ public Map<String, Map<String, CRDInfo>> getCRDDetailsPerNameAndVersion() {
}

void add(String crdName, String version, URI fileURI) {
String filePath = fileURI.getScheme().equals("mem") ? fileURI.toString() : new File(fileURI).getAbsolutePath();
crdNameToVersionToCRDInfoMap.computeIfAbsent(crdName, k -> new HashMap<>())
.put(version, new CRDInfo(crdName, version, new File(fileURI).getAbsolutePath(), ClassDependenciesVisitor.getDependentClassesFromCRDName(crdName)));
.put(version, new CRDInfo(crdName, version, filePath, ClassDependenciesVisitor.getDependentClassesFromCRDName(crdName)));
}

public int numberOfGeneratedCRDs() {
Expand Down

0 comments on commit b3f7a81

Please sign in to comment.