@@ -25,8 +25,8 @@ public class ComputerWithDetails extends Computer {
2525 Map monitorData ;
2626 Integer numExecutors ;
2727 Boolean offline ;
28- Object offlineCause ;
29- String offlineReason ;
28+ OfflineCause offlineCause ;
29+ String offlineCauseReason ;
3030 List oneOffExecutors ;
3131 Boolean temporarilyOffline ;
3232
@@ -91,12 +91,12 @@ public Boolean getOffline() {
9191 return offline ;
9292 }
9393
94- public Object getOfflineCause () {
94+ public OfflineCause getOfflineCause () throws IOException {
9595 return offlineCause ;
9696 }
9797
98- public String getOfflineReason () {
99- return offlineReason ;
98+ public String getOfflineCauseReason () {
99+ return offlineCauseReason ;
100100 }
101101
102102 public List <Map > getOneOffExecutors () {
@@ -108,105 +108,135 @@ public Boolean getTemporarilyOffline() {
108108 }
109109
110110 @ Override
111- public boolean equals (Object obj ) {
112- if (this == obj )
111+ public boolean equals ( Object obj )
112+ {
113+ if ( this == obj )
113114 return true ;
114- if (!super .equals (obj ) )
115+ if ( !super .equals ( obj ) )
115116 return false ;
116- if (getClass () != obj .getClass ())
117+ if ( getClass () != obj .getClass () )
117118 return false ;
118119 ComputerWithDetails other = (ComputerWithDetails ) obj ;
119- if (actions == null ) {
120- if (other .actions != null )
120+ if ( actions == null )
121+ {
122+ if ( other .actions != null )
121123 return false ;
122- } else if (!actions .equals (other .actions ))
124+ }
125+ else if ( !actions .equals ( other .actions ) )
123126 return false ;
124- if (displayName == null ) {
125- if (other .displayName != null )
127+ if ( displayName == null )
128+ {
129+ if ( other .displayName != null )
126130 return false ;
127- } else if (!displayName .equals (other .displayName ))
131+ }
132+ else if ( !displayName .equals ( other .displayName ) )
128133 return false ;
129- if (executors == null ) {
130- if (other .executors != null )
134+ if ( executors == null )
135+ {
136+ if ( other .executors != null )
131137 return false ;
132- } else if (!executors .equals (other .executors ))
138+ }
139+ else if ( !executors .equals ( other .executors ) )
133140 return false ;
134- if (idle == null ) {
135- if (other .idle != null )
141+ if ( idle == null )
142+ {
143+ if ( other .idle != null )
136144 return false ;
137- } else if (!idle .equals (other .idle ))
145+ }
146+ else if ( !idle .equals ( other .idle ) )
138147 return false ;
139- if (jnlp == null ) {
140- if (other .jnlp != null )
148+ if ( jnlp == null )
149+ {
150+ if ( other .jnlp != null )
141151 return false ;
142- } else if (!jnlp .equals (other .jnlp ))
152+ }
153+ else if ( !jnlp .equals ( other .jnlp ) )
143154 return false ;
144- if (launchSupported == null ) {
145- if (other .launchSupported != null )
155+ if ( launchSupported == null )
156+ {
157+ if ( other .launchSupported != null )
146158 return false ;
147- } else if (!launchSupported .equals (other .launchSupported ))
159+ }
160+ else if ( !launchSupported .equals ( other .launchSupported ) )
148161 return false ;
149- if (manualLaunchAllowed == null ) {
150- if (other .manualLaunchAllowed != null )
162+ if ( manualLaunchAllowed == null )
163+ {
164+ if ( other .manualLaunchAllowed != null )
151165 return false ;
152- } else if (!manualLaunchAllowed .equals (other .manualLaunchAllowed ))
166+ }
167+ else if ( !manualLaunchAllowed .equals ( other .manualLaunchAllowed ) )
153168 return false ;
154- if (monitorData == null ) {
155- if (other .monitorData != null )
169+ if ( monitorData == null )
170+ {
171+ if ( other .monitorData != null )
156172 return false ;
157- } else if (!monitorData .equals (other .monitorData ))
173+ }
174+ else if ( !monitorData .equals ( other .monitorData ) )
158175 return false ;
159- if (numExecutors == null ) {
160- if (other .numExecutors != null )
176+ if ( numExecutors == null )
177+ {
178+ if ( other .numExecutors != null )
161179 return false ;
162- } else if (!numExecutors .equals (other .numExecutors ))
180+ }
181+ else if ( !numExecutors .equals ( other .numExecutors ) )
163182 return false ;
164- if (offline == null ) {
165- if (other .offline != null )
183+ if ( offline == null )
184+ {
185+ if ( other .offline != null )
166186 return false ;
167- } else if (!offline .equals (other .offline ))
187+ }
188+ else if ( !offline .equals ( other .offline ) )
168189 return false ;
169- if (offlineCause == null ) {
170- if (other .offlineCause != null )
190+ if ( offlineCause == null )
191+ {
192+ if ( other .offlineCause != null )
171193 return false ;
172- } else if (!offlineCause .equals (other .offlineCause ))
194+ }
195+ else if ( !offlineCause .equals ( other .offlineCause ) )
173196 return false ;
174- if (offlineReason == null ) {
175- if (other .offlineReason != null )
197+ if ( offlineCauseReason == null )
198+ {
199+ if ( other .offlineCauseReason != null )
176200 return false ;
177- } else if (!offlineReason .equals (other .offlineReason ))
201+ }
202+ else if ( !offlineCauseReason .equals ( other .offlineCauseReason ) )
178203 return false ;
179- if (oneOffExecutors == null ) {
180- if (other .oneOffExecutors != null )
204+ if ( oneOffExecutors == null )
205+ {
206+ if ( other .oneOffExecutors != null )
181207 return false ;
182- } else if (!oneOffExecutors .equals (other .oneOffExecutors ))
208+ }
209+ else if ( !oneOffExecutors .equals ( other .oneOffExecutors ) )
183210 return false ;
184- if (temporarilyOffline == null ) {
185- if (other .temporarilyOffline != null )
211+ if ( temporarilyOffline == null )
212+ {
213+ if ( other .temporarilyOffline != null )
186214 return false ;
187- } else if (!temporarilyOffline .equals (other .temporarilyOffline ))
215+ }
216+ else if ( !temporarilyOffline .equals ( other .temporarilyOffline ) )
188217 return false ;
189218 return true ;
190219 }
191220
192221 @ Override
193- public int hashCode () {
222+ public int hashCode ()
223+ {
194224 final int prime = 31 ;
195225 int result = super .hashCode ();
196- result = prime * result + (( actions == null ) ? 0 : actions .hashCode ());
197- result = prime * result + (( displayName == null ) ? 0 : displayName .hashCode ());
198- result = prime * result + (( executors == null ) ? 0 : executors .hashCode ());
199- result = prime * result + (( idle == null ) ? 0 : idle .hashCode ());
200- result = prime * result + (( jnlp == null ) ? 0 : jnlp .hashCode ());
201- result = prime * result + (( launchSupported == null ) ? 0 : launchSupported .hashCode ());
202- result = prime * result + (( manualLaunchAllowed == null ) ? 0 : manualLaunchAllowed .hashCode ());
203- result = prime * result + (( monitorData == null ) ? 0 : monitorData .hashCode ());
204- result = prime * result + (( numExecutors == null ) ? 0 : numExecutors .hashCode ());
205- result = prime * result + (( offline == null ) ? 0 : offline .hashCode ());
206- result = prime * result + (( offlineCause == null ) ? 0 : offlineCause .hashCode ());
207- result = prime * result + (( offlineReason == null ) ? 0 : offlineReason .hashCode ());
208- result = prime * result + (( oneOffExecutors == null ) ? 0 : oneOffExecutors .hashCode ());
209- result = prime * result + (( temporarilyOffline == null ) ? 0 : temporarilyOffline .hashCode ());
226+ result = prime * result + ( ( actions == null ) ? 0 : actions .hashCode () );
227+ result = prime * result + ( ( displayName == null ) ? 0 : displayName .hashCode () );
228+ result = prime * result + ( ( executors == null ) ? 0 : executors .hashCode () );
229+ result = prime * result + ( ( idle == null ) ? 0 : idle .hashCode () );
230+ result = prime * result + ( ( jnlp == null ) ? 0 : jnlp .hashCode () );
231+ result = prime * result + ( ( launchSupported == null ) ? 0 : launchSupported .hashCode () );
232+ result = prime * result + ( ( manualLaunchAllowed == null ) ? 0 : manualLaunchAllowed .hashCode () );
233+ result = prime * result + ( ( monitorData == null ) ? 0 : monitorData .hashCode () );
234+ result = prime * result + ( ( numExecutors == null ) ? 0 : numExecutors .hashCode () );
235+ result = prime * result + ( ( offline == null ) ? 0 : offline .hashCode () );
236+ result = prime * result + ( ( offlineCause == null ) ? 0 : offlineCause .hashCode () );
237+ result = prime * result + ( ( offlineCauseReason == null ) ? 0 : offlineCauseReason .hashCode () );
238+ result = prime * result + ( ( oneOffExecutors == null ) ? 0 : oneOffExecutors .hashCode () );
239+ result = prime * result + ( ( temporarilyOffline == null ) ? 0 : temporarilyOffline .hashCode () );
210240 return result ;
211241 }
212242
0 commit comments