Minor edits to FixJpgJpgThumbnails.java

Use primitive types instead of Java generics when we don't need to
do anything special, and break from the loop once our condition is
set.
This commit is contained in:
Alan Orth 2020-08-07 22:18:32 +03:00
parent 34acc351a5
commit 7190b751e1
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,7 @@ import java.sql.SQLException;
/**
* @author Andrea Schweer schweer@waikato.ac.nz for the LCoNZ Institutional Research Repositories
* @author Alan Orth for the International Livestock Research Institute
* @version 5.3
* @version 5.4
* @since 5.1
*/
public class FixJpgJpgThumbnails {
@ -76,10 +76,11 @@ public class FixJpgJpgThumbnails {
// Some bitstreams like Infographics are large JPGs and put in the ORIGINAL bundle on purpose so we shouldn't
// swap them.
Metadatum[] itemTypes = item.getMetadataByMetadataString("dc.type");
Boolean itemHasInfographic = false;
boolean itemHasInfographic = false;
for (Metadatum itemType: itemTypes) {
if (itemType.value.equals("Infographic")) {
itemHasInfographic = true;
break;
}
}
@ -97,7 +98,7 @@ public class FixJpgJpgThumbnails {
for (Bitstream originalBitstream : originalBundleBitstreams) {
String originalName = originalBitstream.getName();
Long originalBitstreamBytes = originalBitstream.getSize();
long originalBitstreamBytes = originalBitstream.getSize();
/*
- check if the original file name is the same as the thumbnail name minus the extra ".jpg"