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-9589: Remove jackson dependency from SolrJ (Ishan Chattopadhyaya, noble)
|
||||
|
||||
|
||||
================== 6.2.1 ==================
|
||||
|
||||
Bug Fixes
|
||||
|
|
|
@ -41,9 +41,6 @@
|
|||
|
||||
<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}"/>
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
|
|
@ -20,11 +20,11 @@ package org.apache.solr.client.solrj.response;
|
|||
import org.apache.solr.client.solrj.ResponseParser;
|
||||
import org.apache.solr.common.SolrException;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import org.noggit.JSONParser;
|
||||
import org.noggit.ObjectBuilder;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -77,11 +77,12 @@ public abstract class DelegationTokenResponse extends SolrResponseBase {
|
|||
|
||||
@Override
|
||||
public NamedList<Object> processResponse(InputStream body, String encoding) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Map map = null;
|
||||
try {
|
||||
map = mapper.readValue(body, Map.class);
|
||||
} catch (IOException e) {
|
||||
ObjectBuilder builder = new ObjectBuilder(
|
||||
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,
|
||||
"parsing error", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue