File tree Expand file tree Collapse file tree
gcloud-java-core/src/main/java/com/google/cloud Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717package com .google .cloud ;
1818
19- import static com .google .common .base .MoreObjects .firstNonNull ;
2019import static com .google .common .base .Preconditions .checkArgument ;
2120
2221import com .google .common .base .MoreObjects ;
@@ -185,26 +184,10 @@ final boolean baseEquals(WaitForOption option) {
185184 return Objects .equals (option .optionType , option .optionType );
186185 }
187186
188- @ Override
189- public boolean equals (Object obj ) {
190- if (obj == this ) {
191- return true ;
192- }
193- if (obj == null || !(obj .getClass ().equals (WaitForOption .class ))) {
194- return false ;
195- }
196- return baseEquals ((WaitForOption ) obj );
197- }
198-
199187 final int baseHashCode () {
200188 return Objects .hash (optionType );
201189 }
202190
203- @ Override
204- public int hashCode () {
205- return baseHashCode ();
206- }
207-
208191 @ SuppressWarnings ("unchecked" )
209192 private static <T extends WaitForOption > T getOrDefaultInternal (OptionType optionType ,
210193 T defaultValue , WaitForOption ... options ) {
@@ -215,7 +198,7 @@ private static <T extends WaitForOption> T getOrDefaultInternal(OptionType optio
215198 foundOption = (T ) option ;
216199 }
217200 }
218- return firstNonNull ( foundOption , defaultValue ) ;
201+ return foundOption != null ? foundOption : defaultValue ;
219202 }
220203
221204 /**
You can’t perform that action at this time.
0 commit comments