stataru8 commented on code in PR #564:
URL: https://github.com/apache/felix-dev/pull/564#discussion_r4159266342
##########
utils/src/main/java/org/apache/felix/utils/resource/ResourceImpl.java:
##########
@@ -129,7 +141,16 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(caps, reqs);
+ int h = hash;
Review Comment:
the conditions logic is copied from the String class in Java 9+
##########
utils/src/main/java/org/apache/felix/utils/resource/ResourceImpl.java:
##########
Review Comment:
not worth protecting the hash here, in the Resource interface for this
method:
```
Returns:
An unmodifiable list containing the declared Capabilitys from the specified
namespace. The returned list will be empty if this resource declares no
capabilities in the specified namespace.
```
##########
utils/src/main/java/org/apache/felix/utils/resource/ResourceImpl.java:
##########
Review Comment:
the same applies to `getRequirements`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]