From 9749b6b31bde62a4d5f62bbf80775fce8d7d0547 Mon Sep 17 00:00:00 2001 From: Christian Banse Date: Fri, 16 Oct 2020 18:24:45 +0200 Subject: [PATCH] Hotfix: Do not use URI in LocationConverter --- .../de/fraunhofer/aisec/cpg/helpers/LocationConverter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {