Permalink
Browse files

http://stackoverflow.com/q/30614722/157882

  • Loading branch information...
1 parent 8debd20 commit 38d03300cc194ba0a66272c5a6d462f0f3b0b55d @BalusC BalusC committed Jun 3, 2015
Showing with 19 additions and 0 deletions.
  1. +19 −0 src/main/java/org/omnifaces/resourcehandler/RemappedResource.java
@@ -74,6 +74,25 @@ public Resource getWrapped() {
}
@Override
+ public boolean equals(Object object) {
+ if (object == this) {
+ return true;
+ }
+
+ if (object == null || getClass() != object.getClass()) {
+ return false;
+ }
+
+ RemappedResource other = (RemappedResource) object;
+ return wrapped.equals(other.wrapped) && requestPath.equals(other.requestPath);
+ }
+
+ @Override
+ public int hashCode() {
+ return wrapped.hashCode() + requestPath.hashCode();
+ }
+
+ @Override
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException {
wrapped = (Resource) input.readObject();
requestPath = (String) input.readObject();

0 comments on commit 38d0330

Please sign in to comment.