This commit is contained in:
caoyixiong 2019-06-28 11:55:28 +08:00
parent 5852ddc973
commit f7566331c8
2 changed files with 3 additions and 2 deletions

View File

@ -46,7 +46,7 @@ public class CollectionUtils {
/**
* 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.

View File

@ -25,6 +25,7 @@ import java.util.List;
import java.util.zip.GZIPInputStream;
import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER;
import static org.apache.commons.lang3.CharEncoding.UTF_8;
/**
* @author nkorange
@ -34,7 +35,7 @@ public class IoUtils {
static public String toString(InputStream input, String encoding) {
try {
return (null == encoding) ? toString(new InputStreamReader(input, "UTF-8"))
return (null == encoding) ? toString(new InputStreamReader(input, UTF_8))
: toString(new InputStreamReader(input, encoding));
} catch (Exception e) {
NAMING_LOGGER.error("NA", "read input failed.", e);