protected Integer compareNullObjects ( Object object1 , Object object2 ) { if ( ( object1 == null ) && ( object2 == null ) ) { return 0 ; } if ( object1 == null ) { return 1 ; } if ( object2 == null ) { return - 1 ; } return null ; }
Checks for null objects and returns the proper result depedning on which object is null