Skip to content

Commit

Permalink
Fix FindBugs warning in PageDescriptor
Browse files Browse the repository at this point in the history
Use Arrays#equals and Arrays#hashCode for image byte array in
PageDescriptor#equals and PageDescriptor#hashCode.

Change-Id: I94150d4ec35641d9f392000d040903eccc6f90fc
  • Loading branch information
ifurnadjiev committed Sep 5, 2016
1 parent 5cfd580 commit 7208d75
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2013 EclipseSource and others.
* Copyright (c) 2013, 2016 EclipseSource and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -99,7 +99,7 @@ public int hashCode() {
int result = 1;
result = prime * result + ( ( actions == null ) ? 0 : actions.hashCode() );
result = prime * result + ( ( id == null ) ? 0 : id.hashCode() );
result = prime * result + ( ( image == null ) ? 0 : image.hashCode() );
result = prime * result + Arrays.hashCode( image );
result = prime * result + ( topLevel ? 1231 : 1237 );
result = prime * result + ( ( pageType == null ) ? 0 : pageType.hashCode() );
result = prime * result + Arrays.hashCode( style );
Expand All @@ -126,10 +126,7 @@ public boolean equals( Object obj ) {
return false;
} else if( !id.equals( other.id ) )
return false;
if( image == null ) {
if( other.image != null )
return false;
} else if( !image.equals( other.image ) )
if( !Arrays.equals( image, other.image ) )
return false;
if( topLevel != other.topLevel )
return false;
Expand Down

0 comments on commit 7208d75

Please sign in to comment.