Skip to content

Commit bcbd0bb

Browse files
committed
Update code for xml-2
1 parent b13d0c4 commit bcbd0bb

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/JavaReadWriteJsonExampleUnitTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import static org.junit.Assert.assertThat;
88

99
import java.io.File;
10+
import java.net.URI;
1011
import java.net.URL;
1112
import java.util.List;
1213
import java.util.Map;
@@ -103,7 +104,7 @@ public void wheReadFromFile_thanCorrect() throws Exception {
103104

104105
@Test
105106
public void wheReadFromUrl_thanCorrect() throws Exception {
106-
URL resource = new URL("file:src/test/resources/json_car.json");
107+
URL resource = new URI("file:src/test/resources/json_car.json").toURL();
107108

108109
ObjectMapper objectMapper = new ObjectMapper();
109110
Car fromFile = objectMapper.readValue(resource, Car.class);

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<module>testing-modules</module>
5656
<module>toolkits</module>
5757
<module>xml</module>
58+
<module>xml-2</module>
5859
</modules>
5960

6061
<properties>

xml-2/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<name>xml-2</name>
99

1010
<parent>
11-
<groupId>com.baeldung</groupId>
11+
<groupId>com.ossez</groupId>
1212
<artifactId>parent-modules</artifactId>
13-
<version>1.0.0-SNAPSHOT</version>
13+
<version>0.0.2-SNAPSHOT</version>
1414
</parent>
1515

1616
<dependencies>

0 commit comments

Comments
 (0)