arturobernalg commented on a change in pull request #307:
URL:
https://github.com/apache/httpcomponents-client/pull/307#discussion_r650513539
##########
File path:
httpclient5/src/test/java/org/apache/hc/client5/http/auth/TestCredentials.java
##########
@@ -84,9 +84,9 @@ public void testUsernamePasswordCredentialsHashCode() {
final UsernamePasswordCredentials creds3 = new
UsernamePasswordCredentials(
"name", "otherpwd".toCharArray());
- Assert.assertTrue(creds1.hashCode() == creds1.hashCode());
+ Assert.assertEquals(creds1.hashCode(), creds1.hashCode());
Assert.assertTrue(creds1.hashCode() != creds2.hashCode());
Review comment:
I think it's more clear. There is a specific assertions for compare the
two object
##########
File path:
httpclient5/src/test/java/org/apache/hc/client5/http/auth/TestCredentials.java
##########
@@ -84,9 +84,9 @@ public void testUsernamePasswordCredentialsHashCode() {
final UsernamePasswordCredentials creds3 = new
UsernamePasswordCredentials(
"name", "otherpwd".toCharArray());
- Assert.assertTrue(creds1.hashCode() == creds1.hashCode());
+ Assert.assertEquals(creds1.hashCode(), creds1.hashCode());
Assert.assertTrue(creds1.hashCode() != creds2.hashCode());
Review comment:
Ok, reverted.
TY
##########
File path:
httpclient5/src/test/java/org/apache/hc/client5/http/auth/TestCredentials.java
##########
@@ -124,15 +124,15 @@ public void testNTCredentialsHashCode() {
final NTCredentials creds9 = new NTCredentials(
"name","pwd".toCharArray(), "somehost", null);
- Assert.assertTrue(creds1.hashCode() == creds1.hashCode());
+ Assert.assertEquals(creds1.hashCode(), creds1.hashCode());
Assert.assertTrue(creds1.hashCode() != creds2.hashCode());
Review comment:
Ok, reverted.
TY
##########
File path:
httpclient5/src/test/java/org/apache/hc/client5/http/auth/TestCredentials.java
##########
@@ -84,9 +84,9 @@ public void testUsernamePasswordCredentialsHashCode() {
final UsernamePasswordCredentials creds3 = new
UsernamePasswordCredentials(
"name", "otherpwd".toCharArray());
- Assert.assertTrue(creds1.hashCode() == creds1.hashCode());
+ Assert.assertEquals(creds1.hashCode(), creds1.hashCode());
Assert.assertTrue(creds1.hashCode() != creds2.hashCode());
Review comment:
Sorry. My mistake. I leave it as it was
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]