diff --git a/src/main/java/de/fraunhofer/aisec/cpg/helpers/LocationConverter.java b/src/main/java/de/fraunhofer/aisec/cpg/helpers/LocationConverter.java index fcc3992f61..9a05df66b6 100644 --- a/src/main/java/de/fraunhofer/aisec/cpg/helpers/LocationConverter.java +++ b/src/main/java/de/fraunhofer/aisec/cpg/helpers/LocationConverter.java @@ -41,7 +41,7 @@ public class LocationConverter implements CompositeAttributeConverter toGraphProperties(PhysicalLocation value) { Map properties = new HashMap<>(); if (value != null) { - properties.put("artifact", value.getArtifactLocation().getUri()); + properties.put("artifact", value.getArtifactLocation().getUri().toString()); properties.put("startLine", value.getRegion().getStartLine()); properties.put("endLine", value.getRegion().getEndLine()); properties.put("startColumn", value.getRegion().getStartColumn()); @@ -57,7 +57,7 @@ public PhysicalLocation toEntityAttribute(Map value) { int endLine = toIntExact((Integer) value.get("endLine")); int startColumn = toIntExact((Integer) value.get("startColumn")); int endColumn = toIntExact((Integer) value.get("endColumn")); - URI uri = (URI) value.get("artifact"); + URI uri = URI.create((String) value.get("artifact")); return new PhysicalLocation(uri, new Region(startLine, startColumn, endLine, endColumn)); } catch (NullPointerException e) {