Skip to content

Commit 82fa079

Browse files
GH-20 JsonAPI, additional testing, additional Jacoco configuration
1 parent ec0388f commit 82fa079

File tree

23 files changed

+1245
-46
lines changed

23 files changed

+1245
-46
lines changed

.idea/compiler.xml

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elementfactory/src/main/java/io/github/xmljim/json/elementfactory/JsonArrayImpl.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public boolean equals(Object o) {
129129
if (!(o instanceof JsonArrayImpl jsonArray)) {
130130
return false;
131131
}
132-
132+
133133
return Objects.equals(valueList, jsonArray.valueList);
134134
}
135135

@@ -183,6 +183,11 @@ public String prettyPrint(int indent) {
183183
return builder.toString();
184184
}
185185

186+
@Override
187+
public int hashCode() {
188+
return Objects.hash(this.valueList);
189+
}
190+
186191
public String toString() {
187192
return toJsonString();
188193
}

elementfactory/src/main/java/io/github/xmljim/json/elementfactory/JsonObjectImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public boolean equals(Object o) {
117117

118118
@Override
119119
public int hashCode() {
120-
return Objects.hash(data, parent());
120+
return Objects.hash(data);
121121
}
122122

123123
@Override

json-api/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,22 @@
4545
</dependency>
4646
</dependencies>
4747

48+
<build>
49+
<plugins>
50+
<plugin>
51+
<groupId>org.jacoco</groupId>
52+
<artifactId>jacoco-maven-plugin</artifactId>
53+
<executions>
54+
<execution>
55+
<id>report</id>
56+
<phase>verify</phase>
57+
<goals>
58+
<goal>report</goal>
59+
</goals>
60+
</execution>
61+
</executions>
62+
</plugin>
63+
</plugins>
64+
</build>
65+
4866
</project>

0 commit comments

Comments
 (0)