Skip to content

Commit

Permalink
Fix more Codacy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ksclarke committed Mar 8, 2024
1 parent 845b4cc commit 8d8db18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/edu/ucla/library/iiif/fester/CsvParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ private String[] checkApiCompatibility(final String[] aRow, final Path aPath, fi
* @throws CsvParsingException If object type isn't included in the CSV headers, or the object type index is out of
* bounds of the CSV row, or the metadata contains an unknown object type
*/
@SuppressWarnings("PMD.NPathComplexity")
public static ObjectType getObjectType(final String[] aRow, final CsvHeaders aCsvHeaders)
throws CsvParsingException {
if (aCsvHeaders.hasIiifObjectTypeIndex()) {
Expand Down Expand Up @@ -486,9 +487,11 @@ public static ObjectType getObjectType(final String[] aRow, final CsvHeaders aCs
if (ObjectType.PAGE.equals(objectType)) {
return ObjectType.PAGE;
}
if (ObjectType.MISSING.equals(StringUtils.trimTo(objectType, Constants.EMPTY))) {

if (ObjectType.MISSING.equals(StringUtils.trimTo(objectType, EMPTY))) {
return ObjectType.MISSING;
}

// Disallow unknown types
throw new CsvParsingException(MessageCodes.MFS_094, objectType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ private void updatePages(final Message<JsonObject> aMessage) throws JsonProcessi
* @param aSequence A sequence to add pages to
* @param aImageHost An image host for image links
* @param aWorkID A URL encoded work ID
* @return An array of canvases
* @throws IOException If there is trouble adding a page
*/
@SuppressWarnings({ "PMD.CyclomaticComplexity", "PMD.NcssCount" })
Expand Down

0 comments on commit 8d8db18

Please sign in to comment.