HADOOP-11378. Fix new findbugs warnings in hadoop-kms. Contributed by Li Lu.
This commit is contained in:
parent
6df457a3d7
commit
1340617535
@ -550,6 +550,8 @@ Release 2.7.0 - UNRELEASED
|
|||||||
|
|
||||||
HADOOP-11379. Fix new findbugs warnings in hadoop-auth*. (Li Lu via wheat9)
|
HADOOP-11379. Fix new findbugs warnings in hadoop-auth*. (Li Lu via wheat9)
|
||||||
|
|
||||||
|
HADOOP-11378. Fix new findbugs warnings in hadoop-kms. (Li Lu via wheat9)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -62,7 +63,8 @@ public void writeTo(Object obj, Class<?> aClass, Type type,
|
|||||||
Annotation[] annotations, MediaType mediaType,
|
Annotation[] annotations, MediaType mediaType,
|
||||||
MultivaluedMap<String, Object> stringObjectMultivaluedMap,
|
MultivaluedMap<String, Object> stringObjectMultivaluedMap,
|
||||||
OutputStream outputStream) throws IOException, WebApplicationException {
|
OutputStream outputStream) throws IOException, WebApplicationException {
|
||||||
Writer writer = new OutputStreamWriter(outputStream);
|
Writer writer = new OutputStreamWriter(outputStream, Charset
|
||||||
|
.forName("UTF-8"));
|
||||||
ObjectMapper jsonMapper = new ObjectMapper();
|
ObjectMapper jsonMapper = new ObjectMapper();
|
||||||
jsonMapper.writerWithDefaultPrettyPrinter().writeValue(writer, obj);
|
jsonMapper.writerWithDefaultPrettyPrinter().writeValue(writer, obj);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user