File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
odfdom/src/main/java/org/odftoolkit/odfdom/type Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 1919package org .odftoolkit .odfdom .type ;
2020
2121import java .util .Map ;
22+ import java .util .Objects ;
2223import java .util .regex .Pattern ;
2324
2425/**
@@ -365,19 +366,10 @@ private static int mapColorValueToInteger(String colorValue) {
365366
366367 @ Override
367368 public boolean equals (Object obj ) {
368- if (obj == null ) {
369+ if (obj == null || getClass () != obj . getClass () ) {
369370 return false ;
370371 }
371- if (getClass () != obj .getClass ()) {
372- return false ;
373- }
374- final Color other = (Color ) obj ;
375- if ((this .mColorAsSixHexRGB == null )
376- ? (other .mColorAsSixHexRGB != null )
377- : !this .mColorAsSixHexRGB .equals (other .mColorAsSixHexRGB )) {
378- return false ;
379- }
380- return true ;
372+ return Objects .equals (this .mColorAsSixHexRGB , ((Color ) obj ).mColorAsSixHexRGB );
381373 }
382374
383375 @ Override
You can’t perform that action at this time.
0 commit comments