mirror of https://github.com/apache/lucene.git
SOLR-9589: Remove jackson dependency from SolrJ
This commit is contained in:
parent
5fbf135b80
commit
221a6870b8
|
@ -243,6 +243,9 @@ Other Changes
|
||||||
|
|
||||||
* SOLR-8140: Remove mentions of unimplemented admin-extra from the new Admin UI (Alexandre Rafalovitch)
|
* SOLR-8140: Remove mentions of unimplemented admin-extra from the new Admin UI (Alexandre Rafalovitch)
|
||||||
|
|
||||||
|
* SOLR-9589: Remove jackson dependency from SolrJ (Ishan Chattopadhyaya, noble)
|
||||||
|
|
||||||
|
|
||||||
================== 6.2.1 ==================
|
================== 6.2.1 ==================
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
|
|
||||||
<dependency org="org.slf4j" name="slf4j-log4j12" rev="${/org.slf4j/slf4j-log4j12}" conf="test"/>
|
<dependency org="org.slf4j" name="slf4j-log4j12" rev="${/org.slf4j/slf4j-log4j12}" conf="test"/>
|
||||||
|
|
||||||
<dependency org="com.fasterxml.jackson.core" name="jackson-annotations" rev="${/com.fasterxml.jackson.core/jackson-annotations}" conf="compile"/>
|
|
||||||
<dependency org="com.fasterxml.jackson.core" name="jackson-core" rev="${/com.fasterxml.jackson.core/jackson-core}" conf="compile"/>
|
|
||||||
<dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="${/com.fasterxml.jackson.core/jackson-databind}" conf="compile"/>
|
|
||||||
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
|
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</ivy-module>
|
</ivy-module>
|
||||||
|
|
|
@ -20,11 +20,11 @@ package org.apache.solr.client.solrj.response;
|
||||||
import org.apache.solr.client.solrj.ResponseParser;
|
import org.apache.solr.client.solrj.ResponseParser;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
import org.apache.solr.common.util.NamedList;
|
import org.apache.solr.common.util.NamedList;
|
||||||
|
import org.noggit.JSONParser;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import org.noggit.ObjectBuilder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -77,11 +77,12 @@ public abstract class DelegationTokenResponse extends SolrResponseBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NamedList<Object> processResponse(InputStream body, String encoding) {
|
public NamedList<Object> processResponse(InputStream body, String encoding) {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
|
||||||
Map map = null;
|
Map map = null;
|
||||||
try {
|
try {
|
||||||
map = mapper.readValue(body, Map.class);
|
ObjectBuilder builder = new ObjectBuilder(
|
||||||
} catch (IOException e) {
|
new JSONParser(new InputStreamReader(body, encoding == null? "UTF-8": encoding)));
|
||||||
|
map = (Map)builder.getObject();
|
||||||
|
} catch (IOException | JSONParser.ParseException e) {
|
||||||
throw new SolrException (SolrException.ErrorCode.SERVER_ERROR,
|
throw new SolrException (SolrException.ErrorCode.SERVER_ERROR,
|
||||||
"parsing error", e);
|
"parsing error", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue