private boolean checkAttributeChanged(String existing,String current){
  if (existing == null && current == null) {
    return false;
  }
  if ((existing == null) ^ (current == null)) {
    return true;
  }
  return (!existing.equalsIgnoreCase(current));
}

private boolean checkAttributeChanged ( String existing , String current ) { if ( existing == null && current == null ) { return false ; } if ( ( existing == null ) ^ ( current == null ) ) { return true ; } return ( ! existing . equalsIgnoreCase ( current ) ) ; }
check that a single pair of attributes changed .
