From 3965398084a09afa1a77d664f52e7fec04c3e300 Mon Sep 17 00:00:00 2001 From: Maccabee Levine Date: Fri, 27 Oct 2023 13:07:10 +0000 Subject: [PATCH] Fix raw type warnings --- .../src/org/vufind/index/CreatorTools.java | 12 ++++++------ .../src/org/vufind/index/FormatCalculator.java | 2 +- import/index_java/src/org/vufind/index/GeoTools.java | 12 ++++++------ .../index_java/src/org/vufind/index/LccnTools.java | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/import/index_java/src/org/vufind/index/CreatorTools.java b/import/index_java/src/org/vufind/index/CreatorTools.java index d04e9152118..f7602782004 100644 --- a/import/index_java/src/org/vufind/index/CreatorTools.java +++ b/import/index_java/src/org/vufind/index/CreatorTools.java @@ -143,7 +143,7 @@ public Set getValidRelators(DataField authorField, } } else { // If we got this far, we need to figure out what type of relation they have - List permittedRoles = normalizeRelatorStringList(Arrays.asList(loadRelatorConfig(relatorConfig))); + List permittedRoles = normalizeRelatorStringList(Arrays.asList(loadRelatorConfig(relatorConfig))); relators.addAll(getValidRelatorsFromSubfields(subfieldE, permittedRoles, indexRawRelators.toLowerCase().equals("true"))); relators.addAll(getValidRelatorsFromSubfields(subfield4, permittedRoles, indexRawRelators.toLowerCase().equals("true"))); if (Arrays.asList(unknownRelatorAllowed).contains(tag)) { @@ -422,11 +422,11 @@ public String getFirstAuthorFilteredByRelator(Record record, String tagList, * @param firstOnly Return first result only? * @return List result */ - public List getRelatorsFilteredByRelator(Record record, String tagList, + public List getRelatorsFilteredByRelator(Record record, String tagList, String acceptWithoutRelator, String relatorConfig, String acceptUnknownRelators, String indexRawRelators, Boolean firstOnly ) { - List result = new LinkedList(); + List result = new LinkedList(); String[] noRelatorAllowed = acceptWithoutRelator.split(":"); String[] unknownRelatorAllowed = acceptUnknownRelators.split(":"); HashMap> parsedTagList = FieldSpecTools.getParsedTagList(tagList); @@ -455,7 +455,7 @@ public List getRelatorsFilteredByRelator(Record record, String tagList, * in the MARC or "false" to index mapped versions. * @return List result */ - public List getRelatorsFilteredByRelator(Record record, String tagList, + public List getRelatorsFilteredByRelator(Record record, String tagList, String acceptWithoutRelator, String relatorConfig, String acceptUnknownRelators, String indexRawRelators ) { @@ -481,7 +481,7 @@ public List getRelatorsFilteredByRelator(Record record, String tagList, * should be indexed even if they are not listed in author-classification.ini. * @return List result */ - public List getRelatorsFilteredByRelator(Record record, String tagList, + public List getRelatorsFilteredByRelator(Record record, String tagList, String acceptWithoutRelator, String relatorConfig, String acceptUnknownRelators ) { @@ -505,7 +505,7 @@ public List getRelatorsFilteredByRelator(Record record, String tagList, * defines which relator terms are acceptable (or a colon-delimited list) * @return List result */ - public List getRelatorsFilteredByRelator(Record record, String tagList, + public List getRelatorsFilteredByRelator(Record record, String tagList, String acceptWithoutRelator, String relatorConfig ) { // default firstOnly to false! diff --git a/import/index_java/src/org/vufind/index/FormatCalculator.java b/import/index_java/src/org/vufind/index/FormatCalculator.java index 17b97d27e9f..286f83c2dfd 100644 --- a/import/index_java/src/org/vufind/index/FormatCalculator.java +++ b/import/index_java/src/org/vufind/index/FormatCalculator.java @@ -220,7 +220,7 @@ protected String getFormatFrom007(char formatCode, String formatString) { * @param List formatCodes007 * @return String */ - protected String getFormatFromBibLevel(Record record, char recordType, char bibLevel, ControlField marc008, boolean couldBeBook, List formatCodes007) { + protected String getFormatFromBibLevel(Record record, char recordType, char bibLevel, ControlField marc008, boolean couldBeBook, List formatCodes007) { switch (bibLevel) { // Component parts case 'a': diff --git a/import/index_java/src/org/vufind/index/GeoTools.java b/import/index_java/src/org/vufind/index/GeoTools.java index 9550774a983..34979cc5aad 100644 --- a/import/index_java/src/org/vufind/index/GeoTools.java +++ b/import/index_java/src/org/vufind/index/GeoTools.java @@ -141,7 +141,7 @@ public List getDisplayCoordinates(Record record) { * @param HashMap coords * @param String error message */ - public static void logErrorMessage(Record record, HashMap coords, String message) { + public static void logErrorMessage(Record record, HashMap coords, String message) { // Initialize error logging variables String msgError = message; String recNum = "Not available"; @@ -213,7 +213,7 @@ public static String getLogPath() { */ protected HashMap getCoordinateValues(VariableField vf) { DataField df = (DataField) vf; - HashMap coords = new HashMap(); + HashMap coords = new HashMap(); for (char code = 'd'; code <= 'g'; code++) { Subfield subfield = df.getSubfield(code); if (subfield != null) { @@ -231,7 +231,7 @@ protected HashMap getCoordinateValues(VariableField vf) { * @param HashMap coords * @return HashMap full_coords */ - protected HashMap fillEmptyPointCoordinates(HashMap coords) { + protected HashMap fillEmptyPointCoordinates(HashMap coords) { HashMap full_coords = coords; if (coords.containsKey('d') && !coords.containsKey('e') && coords.containsKey('f') && !coords.containsKey('g')) { full_coords.put('e', coords.get('d').toString()); @@ -251,7 +251,7 @@ protected HashMap fillEmptyPointCoordinates(HashMap coords) { * @param HashMap coords * @return boolean */ - protected boolean validateCoordinateValues(Record record, HashMap coords) { + protected boolean validateCoordinateValues(Record record, HashMap coords) { if (coords.containsKey('d') && coords.containsKey('e') && coords.containsKey('f') && coords.containsKey('g')) { return true; } @@ -493,8 +493,8 @@ public boolean validateCoordinateDistance(Record record, Double west, Double eas * @param Double west, east, north, south * @return HashMap coords */ - public HashMap buildCoordinateHashMap (Double west, Double east, Double north, Double south) { - HashMap coords = new HashMap(); + public HashMap buildCoordinateHashMap (Double west, Double east, Double north, Double south) { + HashMap coords = new HashMap(); coords.put('d', Double.toString(west)); coords.put('e', Double.toString(east)); coords.put('f', Double.toString(north)); diff --git a/import/index_java/src/org/vufind/index/LccnTools.java b/import/index_java/src/org/vufind/index/LccnTools.java index 99fdc7bb793..952a5aacc00 100644 --- a/import/index_java/src/org/vufind/index/LccnTools.java +++ b/import/index_java/src/org/vufind/index/LccnTools.java @@ -63,9 +63,9 @@ public String getNormalizedLCCN(String lccn) { * @param fieldSpec * @return Set of normalized LCCNs */ - public Set getNormalizedLCCNs(Record record, String fieldSpec) { + public Set getNormalizedLCCNs(Record record, String fieldSpec) { // Initialize return value: - Set result = new LinkedHashSet(); + Set result = new LinkedHashSet(); // Loop through relevant fields and normalize everything: for (String raw : SolrIndexer.instance().getFieldList(record, fieldSpec)) { @@ -84,7 +84,7 @@ public Set getNormalizedLCCNs(Record record, String fieldSpec) { * @param record * @return Set of normalized LCCNs */ - public Set getNormalizedLCCNs(Record record) { + public Set getNormalizedLCCNs(Record record) { // Send in a default fieldSpec if none was provided by the user: return getNormalizedLCCNs(record, "010a"); }