Browse Source

KERNEL-1298 build failed

research/10.0
zhouping 5 years ago
parent
commit
4da46de607
  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.engine.spi.SessionImplementor;
import com.fr.third.org.hibernate.property.access.internal.AbstractFieldSerialForm; import com.fr.third.org.hibernate.property.access.internal.AbstractFieldSerialForm;
import sun.misc.Unsafe; //import sun.misc.Unsafe;
import sun.reflect.FieldAccessor; //import sun.reflect.FieldAccessor;
import sun.reflect.ReflectionFactory; //import sun.reflect.ReflectionFactory;
import java.io.ObjectStreamException; import java.io.ObjectStreamException;
import java.io.Serializable; import java.io.Serializable;
@ -31,11 +31,11 @@ public class UnsafeGetterFieldImpl implements Getter {
private final Class containerClass; private final Class containerClass;
private final String propertyName; private final String propertyName;
private final Field field; private final Field field;
private final FieldAccessor accessor; // private final FieldAccessor accessor;
static ReflectionFactory reflectionFactory = // static ReflectionFactory reflectionFactory =
AccessController.doPrivileged( // AccessController.doPrivileged(
new sun.reflect.ReflectionFactory.GetReflectionFactoryAction()); // new sun.reflect.ReflectionFactory.GetReflectionFactoryAction());
@ -44,14 +44,14 @@ public class UnsafeGetterFieldImpl implements Getter {
this.containerClass = containerClass; this.containerClass = containerClass;
this.propertyName = propertyName; this.propertyName = propertyName;
this.field = field; this.field = field;
accessor = reflectionFactory.newFieldAccessor(field, false); // accessor = reflectionFactory.newFieldAccessor(field, false);
} }
@Override @Override
public Object get(Object owner) { public Object get(Object owner) {
if(accessor != null){ // if(accessor != null){
return accessor.get(owner); // return accessor.get(owner);
} // }
try { try {
return field.get( owner ); return field.get( owner );
} }

Loading…
Cancel
Save