if( ! nf.getSignature().equals( of.getSignature() ) ) {
System.out.println( "Field signature changed for " + oldName + "( old: " + of.getSignature() + ", new: " + nf.getSignature() + ")" );
retval = false;
}
// Constant value (may be 'null')
ConstantValue oldConst = of.getConstantValue();
ConstantValue newConst = nf.getConstantValue();
if( oldConst != newConst ) {
if( null == oldConst ) {
System.out.println( "Changed constant field to modifiable field " + oldName );
retval = false;
}
else if( null == newConst ) {
System.out.println( "Changed modifiable field to constant field " + oldName );
retval = false;
}
else if( ! oldConst.toString().equals( newConst.toString() ) ) {
System.out.println( "Changed " + oldConst.toString() + " to " + newConst.toString() );
retval = false;
}
}
// Attributes
Attribute newAttributes[] = nf.getAttributes();