"Both details null. Can't have changed!");
"These circumstances should never happen."); }    else if (new_d.getPermissions()==null) { return true;
    public static boolean onlyLockChanged( SessionImplementor session,    		EntityPersister persister, IObject entity, Object[] state, String[] names )    {    	    	Object[] current = persister.getPropertyValues(entity, EntityMode.POJO);    	int[] dirty = persister.findDirty( state, current, entity, session);		if ( dirty != null ) 		{			if ( dirty.length > 1 ) return false;			if ( ! DETAILS.equals( names[dirty[0]] )) return false;			Details new_d = getDetails(current, names);			Details old_d = getDetails(state, names);						// have to handle nulls because of ticket:307			if (old_d == null || new_d == null) 			{				if (new_d == null && old_d == null) 				{					throw new InternalException(							"Both details null. Can't have changed!");				}								else if (new_d == null) 				{					// don't worry about it. 					return true;				} 								else 				{ // then new_d != null. What's up?					if (new_d.getPermissions() != null && 							new_d.getPermissions().isSet(Flag.SOFT)) 						return true;						return false;				}			}			else {				if ( ! onlyPermissionsChanged(new_d, old_d)) return false;				Permissions new_p = new Permissions( new_d.getPermissions() );				Permissions old_p = new Permissions( old_d.getPermissions() );				old_p.set( Flag.LOCKED );				return new_p.identical( old_p );			}					}		return false;		    }