mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Backport to JDK 6
Replaced all uses of ju.Objects.hashCode and ju.Objects.equals with a copy of their implementations inlined into the code. Also changed source/target for compiler plugin. To test, I compiled my own avaje launchagent against 6, and changed to use that in the pom, compiled/tested the whole project using JDK 7, then ran mvn surefire:test using JDK 6 - running surefire:test ensures that mvn doesn't try to recompile everything against 6, since that's not possible because of some of the delegate classes having delegate methods to JDK 7 jdbc classes.
This commit is contained in:
@@ -3,7 +3,6 @@ package com.avaje.ebeaninternal.server.expression;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import com.avaje.ebean.event.BeanQueryRequest;
|
||||
@@ -115,7 +114,7 @@ class AllEqualsExpression implements SpiExpression {
|
||||
|
||||
int hc = 31;
|
||||
for (Object value : propMap.values()) {
|
||||
hc = hc * 31 + Objects.hashCode(value);
|
||||
hc = hc * 31 + (value == null ? 0 : value.hashCode());
|
||||
}
|
||||
|
||||
return hc;
|
||||
|
||||
Reference in New Issue
Block a user