You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static final class TestClass {
private final InetSocketAddress socketAddress;
public TestClass(InetSocketAddress socketAddress) {
this.socketAddress = socketAddress;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TestClass testClass = (TestClass) o;
return socketAddress != null ? socketAddress.equals(testClass.socketAddress) : testClass.socketAddress == null;
}
@Override
public int hashCode() {
return socketAddress != null ? socketAddress.hashCode() : 0;
}
}
@Test
public void testEqualsAndHashCode() {
EqualsVerifier.forClass(TestClass.class).verify();
}
}
What error message or stack trace does EqualsVerifier give?
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by nl.jqno.equalsverifier.internal.reflection.FieldAccessor (file:/.../equalsverifier-3.4.1.jar) to field java.net.InetSocketAddress$InetSocketAddressHolder.hostname
WARNING: Please consider reporting this to the maintainers of nl.jqno.equalsverifier.internal.reflection.FieldAccessor
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
What did you expect?
No such warning.
Which version of EqualsVerifier are you using?
3.4.1
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
What steps will reproduce the problem?
Calling EqualsVerifier.forClass(TestClass.class).verify();
What is the code that triggers this problem?
Any class that contains a java.net.InetSocketAddress as a field.
Provide an example of a complete class (equals method, hashCode method, relevant fields) and a call to EqualsVerifier.
import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.Test;
import java.net.InetSocketAddress;
public class EVTest {
}
What error message or stack trace does EqualsVerifier give?
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by nl.jqno.equalsverifier.internal.reflection.FieldAccessor (file:/.../equalsverifier-3.4.1.jar) to field java.net.InetSocketAddress$InetSocketAddressHolder.hostname
WARNING: Please consider reporting this to the maintainers of nl.jqno.equalsverifier.internal.reflection.FieldAccessor
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
What did you expect?
No such warning.
Which version of EqualsVerifier are you using?
3.4.1
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: