diff --git a/core/src/main/java/com/taobao/arthas/core/advisor/ArthasMethod.java b/core/src/main/java/com/taobao/arthas/core/advisor/ArthasMethod.java index 6f3a74bc5..6d102a64b 100644 --- a/core/src/main/java/com/taobao/arthas/core/advisor/ArthasMethod.java +++ b/core/src/main/java/com/taobao/arthas/core/advisor/ArthasMethod.java @@ -92,7 +92,6 @@ public class ArthasMethod { if ("".equals(this.methodName)) { this.constructor = clazz.getDeclaredConstructor(argsClasses); - ; } else { this.method = clazz.getDeclaredMethod(methodName, argsClasses); } diff --git a/core/src/main/java/com/taobao/arthas/core/env/MutablePropertySources.java b/core/src/main/java/com/taobao/arthas/core/env/MutablePropertySources.java index 909a70ee5..3a71b7dc1 100644 --- a/core/src/main/java/com/taobao/arthas/core/env/MutablePropertySources.java +++ b/core/src/main/java/com/taobao/arthas/core/env/MutablePropertySources.java @@ -195,9 +195,7 @@ public class MutablePropertySources implements PropertySources { * Remove the given property source if it is present. */ protected void removeIfPresent(PropertySource propertySource) { - if (this.propertySourceList.contains(propertySource)) { - this.propertySourceList.remove(propertySource); - } + this.propertySourceList.remove(propertySource); } /** diff --git a/core/src/main/java/com/taobao/arthas/core/util/LogUtil.java b/core/src/main/java/com/taobao/arthas/core/util/LogUtil.java index c9fd27ee9..f1e3c33cb 100644 --- a/core/src/main/java/com/taobao/arthas/core/util/LogUtil.java +++ b/core/src/main/java/com/taobao/arthas/core/util/LogUtil.java @@ -68,7 +68,6 @@ public class LogUtil { loggerContext.reset(); String fileName = env.getProperty(FILE_NAME_PROPERTY); - ; if (fileName != null) { loggerContext.putProperty(ARTHAS_LOG_FILE, fileName); } diff --git a/core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java b/core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java index 7fcbe4ad7..6a6d57b61 100644 --- a/core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java +++ b/core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java @@ -453,7 +453,7 @@ public abstract class ObjectUtils { sb.append(", "); } - sb.append(String.valueOf(array[i])); + sb.append(array[i]); } sb.append("}"); diff --git a/core/src/main/java/com/taobao/arthas/core/view/Ansi.java b/core/src/main/java/com/taobao/arthas/core/view/Ansi.java index 481b7d999..35c1d1ae9 100644 --- a/core/src/main/java/com/taobao/arthas/core/view/Ansi.java +++ b/core/src/main/java/com/taobao/arthas/core/view/Ansi.java @@ -59,8 +59,6 @@ public class Ansi { } } - ; - public static enum Attribute { RESET(0, "RESET"), INTENSITY_BOLD(1, "INTENSITY_BOLD"), @@ -100,8 +98,6 @@ public class Ansi { } - ; - public static enum Erase { FORWARD(0, "FORWARD"), BACKWARD(1, "BACKWARD"), @@ -125,8 +121,6 @@ public class Ansi { } } - ; - public static final String DISABLE = Ansi.class.getName() + ".disable"; private static Callable detector = new Callable() { diff --git a/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java b/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java index 1f3d82d75..83f3dc81e 100644 --- a/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java +++ b/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java @@ -123,7 +123,7 @@ public class TunnelSocketFrameHandler extends SimpleChannelInboundHandler agentId = parameters.getOrDefault("id", Collections.emptyList()); if (agentId.isEmpty()) { - logger.error("arthas agent id can not be null, parameters: ", parameters); + logger.error("arthas agent id can not be null, parameters: {}", parameters); throw new IllegalArgumentException("arthas agent id can not be null"); }