|
|
@@ -8,7 +8,7 @@ import java.lang.reflect.Field;
|
|
8
|
8
|
*/
|
|
9
|
9
|
public abstract class EntitySupport<T extends Entity, ID> implements Entity<T, ID> {
|
|
10
|
10
|
|
|
11
|
|
- private static Field identityField;
|
|
|
11
|
+ private static volatile Field identityField;
|
|
12
|
12
|
|
|
13
|
13
|
@Override
|
|
14
|
14
|
public final boolean sameIdentityAs(final T other) {
|
|
|
@@ -24,7 +24,7 @@ public abstract class EntitySupport<T extends Entity, ID> implements Entity<T, I
|
|
24
|
24
|
try {
|
|
25
|
25
|
return (ID) identityField.get(this);
|
|
26
|
26
|
} catch (IllegalAccessException e) {
|
|
27
|
|
- throw new RuntimeException(e);
|
|
|
27
|
+ throw new AssertionError(e);
|
|
28
|
28
|
}
|
|
29
|
29
|
}
|
|
30
|
30
|
|