fixed duplicate filter bindings

This commit is contained in:
Sebastian Sdorra
2017-01-15 19:33:22 +01:00
parent 1591ab43b3
commit cbc6dad0fe
2 changed files with 53 additions and 1 deletions

View File

@@ -28,12 +28,15 @@
*/
package sonia.scm.filter;
import java.util.Objects;
import sonia.scm.plugin.WebElementDescriptor;
/**
*
* @author Sebastian Sdorra
* @param <T>
* @since 2.0.0
*/
public final class TypedWebElementDescriptor<T>
{
@@ -57,4 +60,26 @@ public final class TypedWebElementDescriptor<T>
return descriptor;
}
@Override
public int hashCode() {
return Objects.hash(clazz, descriptor);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final TypedWebElementDescriptor other = (TypedWebElementDescriptor) obj;
return Objects.equals(clazz, other.clazz)
&& Objects.equals(descriptor, other.descriptor);
}
}