Changeset 7282
- Timestamp:
- 01/10/22 12:22:29 (3 years ago)
- Location:
- SRUServer/trunk/src/main/java/eu/clarin/sru/server
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUQueryParserRegistry.java
r7269 r7282 76 76 */ 77 77 public static class Builder { 78 private final List<SRUQueryParser<?>> parsers = 79 new ArrayList<SRUQueryParser<?>>(); 78 private final List<SRUQueryParser<?>> parsers = new ArrayList<>(); 80 79 81 80 … … 96 95 97 96 /** 98 * Constructor. Automatical y registers registers SRU/CQL standard query97 * Constructor. Automatically registers registers SRU/CQL standard query 99 98 * parsers (queryType <em>cql</em> and <em>searchTerms</em>). 100 99 */ -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURequestImpl.java
r7269 r7282 617 617 */ 618 618 final Map<String, String> queryParameters = 619 new HashMap< String, String>();619 new HashMap<>(); 620 620 List<String> missingParameter = null; 621 621 for (String name : queryParser.getQueryParameterNames()) { … … 627 627 } else { 628 628 if (missingParameter == null) { 629 missingParameter = new ArrayList< String>();629 missingParameter = new ArrayList<>(); 630 630 } 631 631 missingParameter.add(name); … … 1009 1009 if (name.startsWith(PARAM_EXTENSION_PREFIX)) { 1010 1010 if (result == null) { 1011 result = new ArrayList< String>();1011 result = new ArrayList<>(); 1012 1012 } 1013 1013 result.add(name); … … 1052 1052 private void addDiagnostic(SRUDiagnostic diagnostic) { 1053 1053 if (diagnostics == null) { 1054 diagnostics = new ArrayList< SRUDiagnostic>();1054 diagnostics = new ArrayList<>(); 1055 1055 } 1056 1056 diagnostics.add(diagnostic); 1057 1057 } 1058 1059 1058 1059 1060 1060 private List<String> getParameterNames() { 1061 List<String> list = new ArrayList< String>();1061 List<String> list = new ArrayList<>(); 1062 1062 for (Enumeration<?> i = request.getParameterNames(); 1063 1063 i.hasMoreElements();) { -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUServerConfig.java
r7269 r7282 1236 1236 NodeList result = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); 1237 1237 if (result.getLength() > 0) { 1238 sets = new ArrayList< IndexInfo.Set>(result.getLength());1238 sets = new ArrayList<>(result.getLength()); 1239 1239 for (int i = 0; i < result.getLength(); i++) { 1240 1240 Element e = (Element) result.item(i); … … 1258 1258 result = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); 1259 1259 if (result.getLength() > 0) { 1260 indexes = new ArrayList< IndexInfo.Index>(result.getLength());1260 indexes = new ArrayList<>(result.getLength()); 1261 1261 for (int i = 0; i < result.getLength(); i++) { 1262 1262 Element e = (Element) result.item(i); … … 1269 1269 NodeList result2 = e.getElementsByTagName("map"); 1270 1270 if ((result2 != null) && (result2.getLength() > 0)) { 1271 maps = new ArrayList< IndexInfo.Index.Map>(1271 maps = new ArrayList<>( 1272 1272 result2.getLength()); 1273 1273 boolean foundPrimary = false; … … 1332 1332 NodeList result = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); 1333 1333 if (result.getLength() > 0) { 1334 schemaInfos = new ArrayList< SchemaInfo>(result.getLength());1334 schemaInfos = new ArrayList<>(result.getLength()); 1335 1335 for (int i = 0; i < result.getLength(); i++) { 1336 1336 Element e = (Element) result.item(i); … … 1377 1377 List<LocalizedString> list = null; 1378 1378 if (nodes.getLength() > 0) { 1379 list = new ArrayList< LocalizedString>(nodes.getLength());1379 list = new ArrayList<>(nodes.getLength()); 1380 1380 boolean foundPrimary = false; 1381 1381 for (int i = 0; i < nodes.getLength(); i++) { -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUXMLStreamWriter.java
r7269 r7282 129 129 this.indent = indent; 130 130 this.state = IndentingState.SEEN_NOTHING; 131 this.stateStack = new ArrayDeque< IndentingState>(16);131 this.stateStack = new ArrayDeque<>(16); 132 132 } 133 133 }
Note: See TracChangeset
for help on using the changeset viewer.