Merge branch 'master' of emeroad/pinpoint

from pull-request 33

* refs/heads/master:
  [#26] fix findbug, klockwork issue
This commit is contained in:
Woonduk Kang
2014-09-26 16:55:39 +09:00
3 changed files with 10 additions and 7 deletions
@@ -68,7 +68,7 @@ public class RangeOneByteSimpleHash implements RowKeyDistributorByHashPrefix.Has
@Override
public void init(String storedParams) {
this.mod = Integer.valueOf(storedParams);
this.mod = Integer.parseInt(storedParams);
}
}
@@ -41,10 +41,13 @@ public class AgentInformationFactory {
}
private void validateId(String id, String idName, int maxlen) {
if (id == null) {
throw new NullPointerException("id must not be null");
}
// 에러 체크 로직을 bootclass 앞단으로 이동시켜야 함.
// 아니면 여기서 체크해서 실패시 agent동작을 하지 않도록 하던가 하는 추가 동작을 해야함.
byte[] bytes = BytesUtils.toBytes(id);
if (bytes.length > maxlen) {
final byte[] bytes = BytesUtils.toBytes(id);
if (bytes.length > maxlen) {
logger.warn("{} is too long(1~24). value={}", idName, id);
}
}
@@ -56,15 +56,15 @@ public class FromToResponseFilter1 implements Filter {
String[] conditions = condition.split(",");
if (conditions.length == 2) { // from,to
findError = false;
fromResponseTime = Long.valueOf(conditions[0]);
toResponseTime = Long.valueOf(conditions[1]);
fromResponseTime = Long.parseLong(conditions[0]);
toResponseTime = Long.parseLong(conditions[1]);
} else if (conditions.length == 3) { // error,from,to
findError = ERROR.equals(conditions[0]);
if (!findError) {
throw new IllegalArgumentException("invalid conditions:" + condition);
}
fromResponseTime = Long.valueOf(conditions[1]);
toResponseTime = Long.valueOf(conditions[2]);
fromResponseTime = Long.parseLong(conditions[1]);
toResponseTime = Long.parseLong(conditions[2]);
} else if (conditions.length == 1) { // error only
findError = ERROR.equals(conditions[0]);
if (!findError) {