format
This commit is contained in:
parent
5852ddc973
commit
f7566331c8
@ -46,7 +46,7 @@ public class CollectionUtils {
|
|||||||
/**
|
/**
|
||||||
* Constant to avoid repeated object creation
|
* Constant to avoid repeated object creation
|
||||||
*/
|
*/
|
||||||
private static Integer INTEGER_ONE = 1;
|
private static final Integer INTEGER_ONE = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>CollectionUtils</code> should not normally be instantiated.
|
* <code>CollectionUtils</code> should not normally be instantiated.
|
||||||
|
@ -25,6 +25,7 @@ import java.util.List;
|
|||||||
import java.util.zip.GZIPInputStream;
|
import java.util.zip.GZIPInputStream;
|
||||||
|
|
||||||
import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER;
|
import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER;
|
||||||
|
import static org.apache.commons.lang3.CharEncoding.UTF_8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author nkorange
|
* @author nkorange
|
||||||
@ -34,7 +35,7 @@ public class IoUtils {
|
|||||||
static public String toString(InputStream input, String encoding) {
|
static public String toString(InputStream input, String encoding) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return (null == encoding) ? toString(new InputStreamReader(input, "UTF-8"))
|
return (null == encoding) ? toString(new InputStreamReader(input, UTF_8))
|
||||||
: toString(new InputStreamReader(input, encoding));
|
: toString(new InputStreamReader(input, encoding));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
NAMING_LOGGER.error("NA", "read input failed.", e);
|
NAMING_LOGGER.error("NA", "read input failed.", e);
|
||||||
|
Loading…
Reference in New Issue
Block a user