diff --git a/equalsverifier-17/src/test/java/nl/jqno/equalsverifier/integration/extended_contract/SealedTypesTest.java b/equalsverifier-17/src/test/java/nl/jqno/equalsverifier/integration/extended_contract/SealedTypesTest.java index dfe514072..6d86e3aff 100644 --- a/equalsverifier-17/src/test/java/nl/jqno/equalsverifier/integration/extended_contract/SealedTypesTest.java +++ b/equalsverifier-17/src/test/java/nl/jqno/equalsverifier/integration/extended_contract/SealedTypesTest.java @@ -169,7 +169,8 @@ public SealedTypeContainer( @Override public boolean equals(Object obj) { return ( - obj instanceof SealedTypeContainer other && + obj instanceof + SealedTypeContainer other && Objects.equals(sealedWithFinalChild, other.sealedWithFinalChild) && Objects.equals(sealedWithNonsealedChild, other.sealedWithNonsealedChild) ); diff --git a/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/checkers/fieldchecks/SignificantFieldCheck.java b/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/checkers/fieldchecks/SignificantFieldCheck.java index 00e9df361..3199b058b 100644 --- a/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/checkers/fieldchecks/SignificantFieldCheck.java +++ b/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/checkers/fieldchecks/SignificantFieldCheck.java @@ -172,10 +172,8 @@ private void assertFieldShouldBeIgnored( private boolean shouldAllFieldsBeUsed(FieldAccessor fieldAccessor) { return ( !warningsToSuppress.contains(Warning.ALL_FIELDS_SHOULD_BE_USED) && - !( - warningsToSuppress.contains(Warning.ALL_NONFINAL_FIELDS_SHOULD_BE_USED) && - !fieldAccessor.fieldIsFinal() - ) + !(warningsToSuppress.contains(Warning.ALL_NONFINAL_FIELDS_SHOULD_BE_USED) && + !fieldAccessor.fieldIsFinal()) ); } diff --git a/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/reflection/RecordObjectAccessor.java b/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/reflection/RecordObjectAccessor.java index 06db38261..57c1f8bb0 100644 --- a/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/reflection/RecordObjectAccessor.java +++ b/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/reflection/RecordObjectAccessor.java @@ -172,13 +172,13 @@ private String buildMessage(Throwable e, Class type, List params) { String msg = prefix; if (hasZeros) { msg += - "\n If the record does not accept 0 or false as a value for its constructor parameters," + - " consider suppressing Warning.ZERO_FIELDS."; + "\n If the record does not accept 0 or false as a value for its constructor parameters," + + " consider suppressing Warning.ZERO_FIELDS."; } if (hasSomethingElse) { msg += - "\n If the record does not accept any of the given values for its constructor parameters," + - " consider providing prefab values for the types of those fields."; + "\n If the record does not accept any of the given values for its constructor parameters," + + " consider providing prefab values for the types of those fields."; } return msg; } diff --git a/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/integration/basic_contract/TransitivityTest.java b/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/integration/basic_contract/TransitivityTest.java index 929b49bc0..23510c710 100644 --- a/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/integration/basic_contract/TransitivityTest.java +++ b/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/integration/basic_contract/TransitivityTest.java @@ -268,8 +268,7 @@ public boolean equals(Object obj) { } ThreeFieldsUsingAndOr other = (ThreeFieldsUsingAndOr) obj; return ( - Objects.equals(f, other.f) && - Objects.equals(g, other.g) || + (Objects.equals(f, other.f) && Objects.equals(g, other.g)) || Objects.equals(h, other.h) ); } @@ -300,8 +299,7 @@ public boolean equals(Object obj) { ThreeFieldsUsingOrAnd other = (ThreeFieldsUsingOrAnd) obj; return ( Objects.equals(f, other.f) || - Objects.equals(g, other.g) && - Objects.equals(h, other.h) + (Objects.equals(g, other.g) && Objects.equals(h, other.h)) ); } @@ -372,10 +370,8 @@ public boolean equals(Object obj) { FiveFieldsUsingAndsAndOrs other = (FiveFieldsUsingAndsAndOrs) obj; return ( Objects.equals(f, other.f) || - Objects.equals(g, other.g) && - Objects.equals(h, other.h) || - Objects.equals(i, other.i) && - Objects.equals(j, other.j) + (Objects.equals(g, other.g) && Objects.equals(h, other.h)) || + (Objects.equals(i, other.i) && Objects.equals(j, other.j)) ); } diff --git a/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/internal/prefabvalues/TypeTagParameterizedTest.java b/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/internal/prefabvalues/TypeTagParameterizedTest.java index 94c4a5078..eb5a66e2c 100644 --- a/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/internal/prefabvalues/TypeTagParameterizedTest.java +++ b/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/internal/prefabvalues/TypeTagParameterizedTest.java @@ -27,8 +27,10 @@ public class TypeTagParameterizedTest { private final Map> fieldWithNestedTypeParameters = null; @SuppressWarnings("unused") - private final Map, Map, Map>> fieldWithRidiculousTypeParameters = - null; + private final Map< + List, + Map, Map> + > fieldWithRidiculousTypeParameters = null; @SuppressWarnings({ "unused", "rawtypes" }) private final Map rawMapField = null; diff --git a/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/testhelpers/types/TypeHelper.java b/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/testhelpers/types/TypeHelper.java index a4c8fc6c6..3a69c625e 100644 --- a/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/testhelpers/types/TypeHelper.java +++ b/equalsverifier-core/src/test/java/nl/jqno/equalsverifier/testhelpers/types/TypeHelper.java @@ -66,11 +66,9 @@ public boolean equals(Object obj) { result &= Objects.equals(_Byte, other._Byte); result &= _Char == other._Char; result &= - _Double == null - ? other._Double == null - : Double.compare(_Double, other._Double) == 0; + _Double == null ? other._Double == null : Double.compare(_Double, other._Double) == 0; result &= - _Float == null ? other._Float == null : Float.compare(_Float, other._Float) == 0; + _Float == null ? other._Float == null : Float.compare(_Float, other._Float) == 0; result &= Objects.equals(_Int, other._Int); result &= Objects.equals(_Long, other._Long); result &= Objects.equals(_Short, other._Short);