Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ public boolean equals(Object o) {
return that.canEqual(this) &&
Objects.equals(refValue, that.refValue) &&
Objects.equals(unprocessedProperties, that.unprocessedProperties) &&
Objects.equals(referredSchema, that.referredSchema) &&
Objects.equals(title, that.title) &&
Objects.equals(description, that.description) &&
super.equals(that);
Expand All @@ -156,7 +155,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(super.hashCode(), referredSchema, refValue, unprocessedProperties, title, description);
return Objects.hash(super.hashCode(), refValue, unprocessedProperties, title, description);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void definesPropertyThrowsExc_IfNoReferredSchemaIsSet() {
public void equalsVerifier() {
EqualsVerifier.forClass(ReferenceSchema.class)
.withRedefinedSuperclass()
.withIgnoredFields("schemaLocation", "location")
.withIgnoredFields("schemaLocation", "location", "referredSchema")
//there are specifically some non final fields for loading of recursive schemas
.suppress(Warning.NONFINAL_FIELDS)
.suppress(Warning.STRICT_INHERITANCE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import org.json.JSONTokener;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class EmptyObjectTest {

@Test
Expand All @@ -23,6 +25,9 @@ public void validateEmptyObject() throws IOException {

Schema schema = SchemaLoader.load(jsonSchema);
schema.validate(jsonSubject);

assertEquals(schema, SchemaLoader.load(jsonSchema));
assertEquals(schema.hashCode(), SchemaLoader.load(jsonSchema).hashCode());
}

}