JPOXLogger.ENHANCER.error(message);
throw new NullPointerException(message);
}
ClassGen cg = BCELUtils.getClassByFieldByName(field.getName(constantPoolGen), fieldJavaClass);
BCELFieldPropertyMetaData fieldConfig = null;
BCELClassMetaData jdoConfigClass = ((BCELClassMetaData) cmd);
// the accessing class is not this
if (!cg.getClassName().equals(newClass.getClassName()))
{
jdoConfigClass = (BCELClassMetaData) cmd.getPackageMetaData().getFileMetaData().getMetaDataManager().getMetaDataForClass(
cg.getClassName(), clr);
}
if( jdoConfigClass != null )
{
AbstractMemberMetaData apmd = jdoConfigClass.findField(f);
if (apmd == null)
{
//check if a property(getter,setter) exists with this field name
if( jdoConfigClass.findProperty(f)==null )
{
//no fields netiher properties in the class, so something is wrong
String message = LOCALISER.msg("Enhancer.FieldConfigIsNullError", className + "." + f.getName());
JPOXLogger.ENHANCER.fatal(message);
throw new RuntimeException(message);
}
}
if( apmd != null && apmd.getPersistenceModifier() != FieldPersistenceModifier.NONE )
{
// do nothing
}
if (!isFieldAccessInPersistenceCapableClass(ih, m.getConstantPool()))
{
// do nothing
}
else if (fieldConfig != null && fieldConfig.getJdoFieldFlag() == 0)
{
// do nothing
}
else if (f.isStatic() || f.isFinal())
{