Skip to content

Commit

Permalink
Use static method instead of deprecated json parser constructor
Browse files Browse the repository at this point in the history
(Applying suggestions from code review)

Co-authored-by: Sören Domrös <[email protected]>
  • Loading branch information
skieffer and soerendomroes authored Aug 26, 2024
1 parent 6d152c9 commit 1cdd859
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ class EdgeCoordsTest {
val mode = p.get(0)
val expectedString = p.get(1)

val parser = new JsonParser()
val jsonGraph = parser.parse(graph).asJsonObject
val jsonGraph = JsonParser.parseString(graph).asJsonObject

jsonGraph.get("properties").asJsonObject.addProperty(
"org.eclipse.elk.json.edgeCoords", mode
Expand All @@ -166,7 +165,7 @@ class EdgeCoordsTest {
val computedSec = edge2.get("sections").asJsonArray
.get(0).asJsonObject

val expectedSec = parser.parse(expectedString).asJsonObject
val expectedSec = JsonParser.parseString(expectedString).asJsonObject

assertEquals(expectedSec, computedSec)
}
Expand Down

0 comments on commit 1cdd859

Please sign in to comment.