File tree Expand file tree Collapse file tree 25 files changed +2553
-1812
lines changed
CodenameOne/src/com/codename1 Expand file tree Collapse file tree 25 files changed +2553
-1812
lines changed Original file line number Diff line number Diff line change @@ -775,7 +775,8 @@ def main() -> None:
775775 "EC_UNRELATED_TYPES" ,
776776 "EQ_ALWAYS_FALSE" ,
777777 "SBSC_USE_STRINGBUFFER_CONCATENATION" ,
778- "SIC_INNER_SHOULD_BE_STATIC"
778+ "SIC_INNER_SHOULD_BE_STATIC" ,
779+ "EQ_DOESNT_OVERRIDE_EQUALS"
779780 }
780781 violations = [
781782 f for f in spotbugs .findings
Original file line number Diff line number Diff line change @@ -156,6 +156,50 @@ public void initService(Ads ads) {
156156 setDuplicateSupported (true );
157157 }
158158
159+ /**
160+ * {@inheritDoc}
161+ */
162+ public boolean equals (Object o ) {
163+ if (this == o ) {
164+ return true ;
165+ }
166+ if (o == null || getClass () != o .getClass ()) {
167+ return false ;
168+ }
169+ if (!super .equals (o )) {
170+ return false ;
171+ }
172+
173+ InnerActive that = (InnerActive ) o ;
174+
175+ if (po != that .po ) {
176+ return false ;
177+ }
178+ if (banner != that .banner ) {
179+ return false ;
180+ }
181+ if (os != null ? !os .equals (that .os ) : that .os != null ) {
182+ return false ;
183+ }
184+ if (hid != null ? !hid .equals (that .hid ) : that .hid != null ) {
185+ return false ;
186+ }
187+
188+ return true ;
189+ }
190+
191+ /**
192+ * {@inheritDoc}
193+ */
194+ public int hashCode () {
195+ int result = super .hashCode ();
196+ result = 31 * result + po ;
197+ result = 31 * result + (os != null ? os .hashCode () : 0 );
198+ result = 31 * result + (hid != null ? hid .hashCode () : 0 );
199+ result = 31 * result + (banner ? 1 : 0 );
200+ return result ;
201+ }
202+
159203 /**
160204 * {@inheritDoc}
161205 */
Original file line number Diff line number Diff line change @@ -68,6 +68,38 @@ private CacheMap getCache() {
6868 return cloudImageCache ;
6969 }
7070
71+ /**
72+ * {@inheritDoc}
73+ */
74+ public boolean equals (Object o ) {
75+ if (this == o ) {
76+ return true ;
77+ }
78+ if (o == null || getClass () != o .getClass ()) {
79+ return false ;
80+ }
81+
82+ CloudImageProperty that = (CloudImageProperty ) o ;
83+
84+ if (idProperty != null ? !idProperty .equals (that .idProperty ) : that .idProperty != null ) {
85+ return false ;
86+ }
87+ if (placeholderImage != null ? !placeholderImage .equals (that .placeholderImage ) : that .placeholderImage != null ) {
88+ return false ;
89+ }
90+
91+ return true ;
92+ }
93+
94+ /**
95+ * {@inheritDoc}
96+ */
97+ public int hashCode () {
98+ int result = idProperty != null ? idProperty .hashCode () : 0 ;
99+ result = 31 * result + (placeholderImage != null ? placeholderImage .hashCode () : 0 );
100+ return result ;
101+ }
102+
71103 /**
72104 * {@inheritDoc}
73105 */
Original file line number Diff line number Diff line change @@ -477,6 +477,29 @@ public BackCommand(Form sourceForm) {
477477 public void actionPerformed (ActionEvent ev ) {
478478 sourceForm .showBack ();
479479 }
480+
481+ /**
482+ * {@inheritDoc}
483+ */
484+ public boolean equals (Object o ) {
485+ if (this == o ) {
486+ return true ;
487+ }
488+ if (o == null || getClass () != o .getClass ()) {
489+ return false ;
490+ }
491+ if (!super .equals (o )) {
492+ return false ;
493+ }
494+ return true ;
495+ }
496+
497+ /**
498+ * {@inheritDoc}
499+ */
500+ public int hashCode () {
501+ return super .hashCode ();
502+ }
480503 }
481504
482505 class EventHandler implements ActionListener {
Original file line number Diff line number Diff line change @@ -178,4 +178,24 @@ private void init(Hashtable toCopy) {
178178 created_time = (String ) toCopy .get ("created_time" );
179179 updated_time = (String ) toCopy .get ("updated_time" );
180180 }
181+
182+ /**
183+ * {@inheritDoc}
184+ */
185+ public boolean equals (Object o ) {
186+ if (this == o ) {
187+ return true ;
188+ }
189+ if (o == null || getClass () != o .getClass ()) {
190+ return false ;
191+ }
192+ return super .equals (o );
193+ }
194+
195+ /**
196+ * {@inheritDoc}
197+ */
198+ public int hashCode () {
199+ return super .hashCode ();
200+ }
181201}
Original file line number Diff line number Diff line change @@ -318,4 +318,48 @@ public void longToken(long tok) {
318318 public void booleanToken (boolean tok ) {
319319 }
320320
321+ /**
322+ * {@inheritDoc}
323+ */
324+ public boolean equals (Object o ) {
325+ if (this == o ) {
326+ return true ;
327+ }
328+ if (o == null || getClass () != o .getClass ()) {
329+ return false ;
330+ }
331+ if (!super .equals (o )) {
332+ return false ;
333+ }
334+
335+ FacebookRESTService that = (FacebookRESTService ) o ;
336+
337+ if (responseOffset != that .responseOffset ) {
338+ return false ;
339+ }
340+ if (connectionType != null ? !connectionType .equals (that .connectionType ) : that .connectionType != null ) {
341+ return false ;
342+ }
343+ if (imageKey != null ? !imageKey .equals (that .imageKey ) : that .imageKey != null ) {
344+ return false ;
345+ }
346+ if (root != null ? !root .equals (that .root ) : that .root != null ) {
347+ return false ;
348+ }
349+
350+ return true ;
351+ }
352+
353+ /**
354+ * {@inheritDoc}
355+ */
356+ public int hashCode () {
357+ int result = super .hashCode ();
358+ result = 31 * result + (connectionType != null ? connectionType .hashCode () : 0 );
359+ result = 31 * result + responseOffset ;
360+ result = 31 * result + (imageKey != null ? imageKey .hashCode () : 0 );
361+ result = 31 * result + (root != null ? root .hashCode () : 0 );
362+ return result ;
363+ }
364+
321365}
Original file line number Diff line number Diff line change @@ -151,4 +151,24 @@ private void init(Hashtable toCopy) {
151151 coverLink = (String ) cover .get ("source" );
152152 }
153153 }
154+
155+ /**
156+ * {@inheritDoc}
157+ */
158+ public boolean equals (Object o ) {
159+ if (this == o ) {
160+ return true ;
161+ }
162+ if (o == null || getClass () != o .getClass ()) {
163+ return false ;
164+ }
165+ return super .equals (o );
166+ }
167+
168+ /**
169+ * {@inheritDoc}
170+ */
171+ public int hashCode () {
172+ return super .hashCode ();
173+ }
154174}
Original file line number Diff line number Diff line change @@ -220,4 +220,24 @@ private void init(Hashtable toCopy) {
220220 }
221221
222222 }
223+
224+ /**
225+ * {@inheritDoc}
226+ */
227+ public boolean equals (Object o ) {
228+ if (this == o ) {
229+ return true ;
230+ }
231+ if (o == null || getClass () != o .getClass ()) {
232+ return false ;
233+ }
234+ return super .equals (o );
235+ }
236+
237+ /**
238+ * {@inheritDoc}
239+ */
240+ public int hashCode () {
241+ return super .hashCode ();
242+ }
223243}
Original file line number Diff line number Diff line change @@ -225,4 +225,24 @@ private void init(Hashtable toCopy) {
225225 }
226226 }
227227 }
228+
229+ /**
230+ * {@inheritDoc}
231+ */
232+ public boolean equals (Object o ) {
233+ if (this == o ) {
234+ return true ;
235+ }
236+ if (o == null || getClass () != o .getClass ()) {
237+ return false ;
238+ }
239+ return super .equals (o );
240+ }
241+
242+ /**
243+ * {@inheritDoc}
244+ */
245+ public int hashCode () {
246+ return super .hashCode ();
247+ }
228248}
Original file line number Diff line number Diff line change @@ -245,4 +245,24 @@ private void init(Hashtable toCopy) {
245245 }
246246 }
247247
248+ /**
249+ * {@inheritDoc}
250+ */
251+ public boolean equals (Object o ) {
252+ if (this == o ) {
253+ return true ;
254+ }
255+ if (o == null || getClass () != o .getClass ()) {
256+ return false ;
257+ }
258+ return super .equals (o );
259+ }
260+
261+ /**
262+ * {@inheritDoc}
263+ */
264+ public int hashCode () {
265+ return super .hashCode ();
266+ }
267+
248268}
You can’t perform that action at this time.
0 commit comments