Commit 9bc6b5fb by Jason Song

fix coverity bugs

parent 16ff5fd9
......@@ -46,4 +46,8 @@ public class ApolloEurekaClientConfig extends EurekaClientConfigBean {
return super.getEurekaServerServiceUrls(myZone);
}
@Override
public boolean equals(Object o) {
return super.equals(o);
}
}
......@@ -6,6 +6,8 @@ import com.ctrip.framework.apollo.biz.entity.Namespace;
import com.ctrip.framework.apollo.core.utils.ByteUtil;
import com.ctrip.framework.apollo.core.utils.MachineUtil;
import org.apache.commons.lang.time.FastDateFormat;
import java.security.SecureRandom;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
......@@ -17,7 +19,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* @author Jason Song(song_s@ctrip.com)
*/
public class ReleaseKeyGenerator {
private static final DateFormat TIMESTAMP_FORMAT = new SimpleDateFormat("yyyyMMddHHmmss");
private static final FastDateFormat TIMESTAMP_FORMAT = FastDateFormat.getInstance("yyyyMMddHHmmss");
private static final AtomicInteger releaseCounter = new AtomicInteger(new SecureRandom().nextInt());
private static final Joiner KEY_JOINER = Joiner.on("-");
......
import com.google.common.base.Charsets;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigChangeListener;
import com.ctrip.framework.apollo.ConfigFile;
......@@ -80,7 +82,7 @@ public class ApolloConfigDemo {
"Apollo Config Demo. Please input key to get the value.");
while (true) {
System.out.print("> ");
String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
String input = new BufferedReader(new InputStreamReader(System.in, Charsets.UTF_8)).readLine();
if (input == null || input.length() == 0) {
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment