File tree Expand file tree Collapse file tree
gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -386,14 +386,12 @@ public String toString() {
386386 return toStringHelper ().toString ();
387387 }
388388
389- @ Override
390- public int hashCode () {
389+ protected final int baseHashCode () {
391390 return Objects .hash (tableId );
392391 }
393392
394- @ Override
395- public boolean equals (Object obj ) {
396- return obj instanceof BaseTableInfo && Objects .equals (toPb (), ((BaseTableInfo ) obj ).toPb ());
393+ protected final boolean baseEquals (BaseTableInfo tableInfo ) {
394+ return Objects .equals (toPb (), tableInfo .toPb ());
397395 }
398396
399397 Table toPb () {
Original file line number Diff line number Diff line change @@ -107,13 +107,12 @@ ToStringHelper toStringHelper() {
107107
108108 @ Override
109109 public boolean equals (Object obj ) {
110- return obj instanceof ExternalTableInfo
111- && Objects .equals (toPb (), ((ExternalTableInfo ) obj ).toPb ());
110+ return obj instanceof ExternalTableInfo && baseEquals ((ExternalTableInfo ) obj );
112111 }
113112
114113 @ Override
115114 public int hashCode () {
116- return Objects .hash (super . hashCode (), configuration );
115+ return Objects .hash (baseHashCode (), configuration );
117116 }
118117
119118 @ Override
Original file line number Diff line number Diff line change @@ -215,12 +215,12 @@ ToStringHelper toStringHelper() {
215215
216216 @ Override
217217 public boolean equals (Object obj ) {
218- return obj instanceof TableInfo && Objects . equals ( toPb (), (( TableInfo ) obj ). toPb () );
218+ return obj instanceof TableInfo && baseEquals (( TableInfo ) obj );
219219 }
220220
221221 @ Override
222222 public int hashCode () {
223- return Objects .hash (super . hashCode (), location , streamingBuffer );
223+ return Objects .hash (baseHashCode (), location , streamingBuffer );
224224 }
225225
226226 @ Override
Original file line number Diff line number Diff line change @@ -146,12 +146,12 @@ ToStringHelper toStringHelper() {
146146
147147 @ Override
148148 public boolean equals (Object obj ) {
149- return obj instanceof ViewInfo && Objects . equals ( toPb (), (( ViewInfo ) obj ). toPb () );
149+ return obj instanceof ViewInfo && baseEquals (( ViewInfo ) obj );
150150 }
151151
152152 @ Override
153153 public int hashCode () {
154- return Objects .hash (super . hashCode (), query , userDefinedFunctions );
154+ return Objects .hash (baseHashCode (), query , userDefinedFunctions );
155155 }
156156
157157 @ Override
You can’t perform that action at this time.
0 commit comments