Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Jan 3, 2025
1 parent 39c8342 commit ef49da9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ protected List<SolrInputDocument> loadCsvDocs(

@SuppressWarnings("unchecked")
protected List<SolrInputDocument> loadJsonLines(
ContentStreamBase.ByteArrayStream stream, final int maxDocsToLoad)
throws IOException {
ContentStreamBase.ByteArrayStream stream, final int maxDocsToLoad) throws IOException {
List<Map<String, Object>> docs = new ArrayList<>();
try (Reader r = stream.getReader()) {
BufferedReader br = new BufferedReader(r);
Expand All @@ -182,8 +181,7 @@ protected List<SolrInputDocument> loadJsonLines(

@SuppressWarnings("unchecked")
protected List<SolrInputDocument> loadJsonDocs(
ContentStreamBase.ByteArrayStream stream, final int maxDocsToLoad)
throws IOException {
ContentStreamBase.ByteArrayStream stream, final int maxDocsToLoad) throws IOException {
Object json;
try (Reader r = stream.getReader()) {
json = ObjectBuilder.getVal(new JSONParser(r));
Expand Down Expand Up @@ -231,8 +229,7 @@ protected List<SolrInputDocument> loadJsonDocs(
}

protected List<SolrInputDocument> loadXmlDocs(
ContentStreamBase.ByteArrayStream stream, final int maxDocsToLoad)
throws IOException {
ContentStreamBase.ByteArrayStream stream, final int maxDocsToLoad) throws IOException {
String xmlString = new String(readAllBytes(stream), StandardCharsets.UTF_8).trim();
List<SolrInputDocument> docs;
if (xmlString.contains("<add>") && xmlString.contains("<doc>")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ public Map<String, List<Object>> transposeDocs(List<SolrInputDocument> docs) {
return mapByField;
}

protected String guessFieldType(
final List<Object> sampleValues,
boolean isMV,
Locale locale) {
protected String guessFieldType(final List<Object> sampleValues, boolean isMV, Locale locale) {
String type = null;

// flatten values to a single stream for easier analysis; also remove nulls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.solr.handler.designer;

import static org.apache.solr.common.params.CommonParams.JSON_MIME;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ public void publish(SolrQueryRequest req, SolrQueryResponse rsp)
final String configSet = getRequiredParam(CONFIG_SET_PARAM, req);
final String mutableId = checkMutable(configSet, req);

// verify the configSet we're going to apply changes to hasn't been changed since being loaded for
// verify the configSet we're going to apply changes to hasn't been changed since being loaded
// for
// editing by the schema designer
SchemaDesignerSettings settings = settingsDAO.getSettings(mutableId);
final Optional<Integer> publishedVersion = settings.getPublishedVersion();
Expand Down

0 comments on commit ef49da9

Please sign in to comment.