Skip to content

Commit

Permalink
deps update; marked as @threadsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
vardlokkur committed Feb 23, 2014
1 parent 6263bfc commit f1cad0b
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package pl.ais.commons.domain.specification.composite;

import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import java.util.Arrays;

import javax.annotation.concurrent.ThreadSafe;

import pl.ais.commons.domain.specification.Specification;

Expand All @@ -12,6 +13,7 @@
* @author Warlock, AIS.PL
* @since 1.0.1
*/
@ThreadSafe
abstract class AbstractCompositeSpecification<C> implements CompositeSpecification<C> {

/**
Expand All @@ -31,7 +33,7 @@ public boolean equals(final Object object) {
boolean result = (this == object);
if (!result && (null != object) && (getClass() == object.getClass())) {
final AbstractCompositeSpecification other = (AbstractCompositeSpecification) object;
result = ArrayUtils.isEquals(getComponents(), other.getComponents());
result = Arrays.equals(getComponents(), other.getComponents());
}
return result;
}
Expand All @@ -41,7 +43,7 @@ public boolean equals(final Object object) {
*/
@Override
public int hashCode() {
return new HashCodeBuilder().append(getComponents()).toHashCode();
return Arrays.hashCode(getComponents());
}

/**
Expand Down

0 comments on commit f1cad0b

Please sign in to comment.