Browse Source

Merge pull request #349 in CORE/base-third from ~ZHOUPING/base-third:research/10.0 to research/10.0

* commit 'f99248435361d7ed676f395601c2ad8767202e14':
  KERNEL-1298 build failed
research/10.0
zhouping 5 years ago
parent
commit
29779771b2
  1. 22
      fine-hibernate/src/com/fr/third/org/hibernate/property/access/spi/UnsafeGetterFieldImpl.java

22
fine-hibernate/src/com/fr/third/org/hibernate/property/access/spi/UnsafeGetterFieldImpl.java

@ -8,9 +8,9 @@ package com.fr.third.org.hibernate.property.access.spi;
import com.fr.third.org.hibernate.engine.spi.SessionImplementor;
import com.fr.third.org.hibernate.property.access.internal.AbstractFieldSerialForm;
import sun.misc.Unsafe;
import sun.reflect.FieldAccessor;
import sun.reflect.ReflectionFactory;
//import sun.misc.Unsafe;
//import sun.reflect.FieldAccessor;
//import sun.reflect.ReflectionFactory;
import java.io.ObjectStreamException;
import java.io.Serializable;
@ -31,11 +31,11 @@ public class UnsafeGetterFieldImpl implements Getter {
private final Class containerClass;
private final String propertyName;
private final Field field;
private final FieldAccessor accessor;
// private final FieldAccessor accessor;
static ReflectionFactory reflectionFactory =
AccessController.doPrivileged(
new sun.reflect.ReflectionFactory.GetReflectionFactoryAction());
// static ReflectionFactory reflectionFactory =
// AccessController.doPrivileged(
// new sun.reflect.ReflectionFactory.GetReflectionFactoryAction());
@ -44,14 +44,14 @@ public class UnsafeGetterFieldImpl implements Getter {
this.containerClass = containerClass;
this.propertyName = propertyName;
this.field = field;
accessor = reflectionFactory.newFieldAccessor(field, false);
// accessor = reflectionFactory.newFieldAccessor(field, false);
}
@Override
public Object get(Object owner) {
if(accessor != null){
return accessor.get(owner);
}
// if(accessor != null){
// return accessor.get(owner);
// }
try {
return field.get( owner );
}

Loading…
Cancel
Save