Skip to content

Commit

Permalink
Hotfix: Do not use URI in LocationConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Oct 16, 2020
1 parent 0d674b6 commit 9749b6b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class LocationConverter implements CompositeAttributeConverter<PhysicalLo
public Map<String, ?> toGraphProperties(PhysicalLocation value) {
Map<String, Object> 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());
Expand All @@ -57,7 +57,7 @@ public PhysicalLocation toEntityAttribute(Map<String, ?> 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) {
Expand Down

0 comments on commit 9749b6b

Please sign in to comment.