@@ -72,26 +72,24 @@ public boolean isWarning() {
7272 }
7373
7474 @ Override
75- public boolean equals (Object o ) {
75+ public boolean equals (final Object o ) {
7676 if (this == o ) return true ;
7777 if (o == null || getClass () != o .getClass ()) return false ;
7878
79- ProjectValidationResult that = (ProjectValidationResult ) o ;
79+ final ProjectValidationResult that = (ProjectValidationResult ) o ;
8080
81- if (! category .equals (that .category )) return false ;
82- if (! level .equals (that .level )) return false ;
83- if (! message .equals (that .message )) return false ;
81+ if (category != null ? ! category .equals (that .category ) : that . category != null ) return false ;
82+ if (level != null ? ! level .equals (that .level ) : that . level != null ) return false ;
83+ if (message != null ? ! message .equals (that .message ) : that . message != null ) return false ;
8484 if (params != null ? !params .equals (that .params ) : that .params != null ) return false ;
85- if (validation != null ? !validation .equals (that .validation ) : that .validation != null ) return false ;
86-
87- return true ;
85+ return validation != null ? validation .equals (that .validation ) : that .validation == null ;
8886 }
8987
9088 @ Override
9189 public int hashCode () {
92- int result = category .hashCode ();
93- result = 31 * result + level .hashCode ();
94- result = 31 * result + message .hashCode ();
90+ int result = category != null ? category .hashCode () : 0 ;
91+ result = 31 * result + ( level != null ? level .hashCode () : 0 );
92+ result = 31 * result + ( message != null ? message .hashCode () : 0 );
9593 result = 31 * result + (params != null ? params .hashCode () : 0 );
9694 result = 31 * result + (validation != null ? validation .hashCode () : 0 );
9795 return result ;
0 commit comments