@@ -224,7 +224,6 @@ private void login() throws IOException {
224
224
logger .info ("DA Cookies: " + getDACookie ());
225
225
}
226
226
227
-
228
227
/**
229
228
* Returns next page Document using offset.
230
229
*/
@@ -246,7 +245,6 @@ public Document getNextPage(Document doc) throws IOException {
246
245
}
247
246
248
247
return Http .url (urlWithParams (this .offset )).referrer (referer ).userAgent (userAgent ).cookies (getDACookie ()).get ();
249
-
250
248
}
251
249
252
250
/**
@@ -258,7 +256,6 @@ public Document getNextPage(Document doc) throws IOException {
258
256
*/
259
257
@ Override
260
258
protected List <String > getURLsFromPage (Document page ) {
261
-
262
259
List <String > result = new ArrayList <String >();
263
260
264
261
Element div ;
@@ -293,6 +290,11 @@ protected void downloadURL(URL url, int index) {
293
290
logger .info ("Downloading URL Number " + this .downloadCount );
294
291
logger .info ("Deviant Art URL: " + url .toExternalForm ());
295
292
try {
293
+ // Suppress this warning because it is part of code that was temporarily
294
+ // commented out to disable the behavior.
295
+ // We know there's a lot about this ripper that needs to be fixed so
296
+ // we're not too worried about warnings in this file.
297
+ @ SuppressWarnings ("unused" )
296
298
Response re = Http .url (urlWithParams (this .offset )).cookies (getDACookie ()).referrer (referer )
297
299
.userAgent (userAgent ).response ();
298
300
//updateCookie(re.cookies());
@@ -319,7 +321,6 @@ public String normalizeUrl(String url) {
319
321
*/
320
322
@ Override
321
323
public String getGID (URL url ) throws MalformedURLException {
322
-
323
324
String s = url .toExternalForm ();
324
325
String artist = "unknown" ;
325
326
String what = "unknown" ;
@@ -366,7 +367,6 @@ public String getGID(URL url) throws MalformedURLException {
366
367
logger .info ("Album Name: " + artist + "_" + what + "_" + albumname );
367
368
368
369
return artist + "_" + what + "_" + albumname ;
369
-
370
370
}
371
371
372
372
/**
@@ -413,7 +413,6 @@ private Map<String, String> getDACookie() {
413
413
* @param m new Cookies
414
414
*/
415
415
private void updateCookie (Map <String , String > m ) {
416
-
417
416
if (m == null ) {
418
417
return ;
419
418
}
@@ -439,7 +438,6 @@ private void updateCookie(Map<String, String> m) {
439
438
} catch (IOException e ) {
440
439
e .printStackTrace ();
441
440
}
442
-
443
441
}
444
442
445
443
/**
@@ -470,8 +468,13 @@ private String serialize(Serializable o) throws IOException {
470
468
private Map <String , String > deserialize (String s ) throws IOException , ClassNotFoundException {
471
469
byte [] data = Base64 .getDecoder ().decode (s );
472
470
ObjectInputStream ois = new ObjectInputStream (new ByteArrayInputStream (data ));
473
- HashMap <String , String > o = (HashMap <String , String >) ois .readObject (); // Unchecked cast here but should never
474
- // be something else
471
+
472
+ // Suppress this warning because it's part of the legacy implementation.
473
+ // We know there's a lot about this ripper that needs to be fixed so
474
+ // we're not too worried about warnings in this file.
475
+ // Unchecked cast here but should never be something else.
476
+ @ SuppressWarnings ("unchecked" )
477
+ HashMap <String , String > o = (HashMap <String , String >) ois .readObject ();
475
478
ois .close ();
476
479
return o ;
477
480
}
0 commit comments