diff --git a/dist/tprofiler.jar b/dist/tprofiler.jar index 4a819ea..c4a9678 100644 Binary files a/dist/tprofiler.jar and b/dist/tprofiler.jar differ diff --git a/pom.xml b/pom.xml index 511600c..442daf0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,7 @@ org.apache.maven.plugins maven-compiler-plugin + 3.0 1.6 1.6 @@ -26,7 +27,7 @@ maven-assembly-plugin - 2.2-beta-5 + 2.2.2 jar-with-dependencies diff --git a/src/main/java/com/taobao/profile/config/ProfFilter.java b/src/main/java/com/taobao/profile/config/ProfFilter.java index 6aa6930..3470cf4 100644 --- a/src/main/java/com/taobao/profile/config/ProfFilter.java +++ b/src/main/java/com/taobao/profile/config/ProfFilter.java @@ -75,7 +75,7 @@ public static void addExcludeClassLoader(String classLoader) { * @param className * @return */ - public static boolean IsNeedInject(String className) { + public static boolean isNeedInject(String className) { String icaseName = className.toLowerCase().replace('.', '/'); for (String v : includePackage) { if (icaseName.startsWith(v)) { @@ -91,7 +91,7 @@ public static boolean IsNeedInject(String className) { * @param className * @return */ - public static boolean IsNotNeedInject(String className) { + public static boolean isNotNeedInject(String className) { String icaseName = className.toLowerCase().replace('.', '/'); for (String v : excludePackage) { if (icaseName.startsWith(v)) { @@ -107,7 +107,7 @@ public static boolean IsNotNeedInject(String className) { * @param classLoader * @return */ - public static boolean IsNotNeedInjectClassLoader(String classLoader) { + public static boolean isNotNeedInjectClassLoader(String classLoader) { for (String v : excludeClassLoader) { if (classLoader.equals(v)) { return true; diff --git a/src/main/java/com/taobao/profile/instrument/ProfTransformer.java b/src/main/java/com/taobao/profile/instrument/ProfTransformer.java index 0f7b3d0..c575ea3 100644 --- a/src/main/java/com/taobao/profile/instrument/ProfTransformer.java +++ b/src/main/java/com/taobao/profile/instrument/ProfTransformer.java @@ -33,13 +33,13 @@ public class ProfTransformer implements ClassFileTransformer { */ public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { - if (ProfFilter.IsNotNeedInjectClassLoader(loader.getClass().getName())) { + if (ProfFilter.isNotNeedInjectClassLoader(loader.getClass().getName())) { return classfileBuffer; } - if (!ProfFilter.IsNeedInject(className)) { + if (!ProfFilter.isNeedInject(className)) { return classfileBuffer; } - if (ProfFilter.IsNotNeedInject(className)) { + if (ProfFilter.isNotNeedInject(className)) { return classfileBuffer; } if (Manager.instance().isDebugMode()) { diff --git a/src/main/java/com/taobao/profile/thread/TimeControlThread.java b/src/main/java/com/taobao/profile/thread/TimeControlThread.java index 874d336..3840b47 100644 --- a/src/main/java/com/taobao/profile/thread/TimeControlThread.java +++ b/src/main/java/com/taobao/profile/thread/TimeControlThread.java @@ -31,11 +31,11 @@ public class TimeControlThread extends Thread { /** * */ - private InnerControTime startTime; + private InnerControlTime startTime; /** * */ - private InnerControTime endTime; + private InnerControlTime endTime; /** * @param start @@ -50,7 +50,7 @@ public TimeControlThread(ProfConfig config) { * @param time * @return */ - public long waitTime(InnerControTime time) { + public long waitTime(InnerControlTime time) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.HOUR_OF_DAY, time.getHour()); cal.set(Calendar.MINUTE, time.getMinute()); @@ -64,7 +64,7 @@ public long waitTime(InnerControTime time) { * @param time * @return */ - public long nextStartTime(InnerControTime time) { + public long nextStartTime(InnerControlTime time) { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DAY_OF_MONTH, 1); cal.set(Calendar.HOUR_OF_DAY, time.getHour()); @@ -128,7 +128,7 @@ public void run() { * @param time * @return */ - public InnerControTime parse(String time) { + public InnerControlTime parse(String time) { if (time == null) { return null; } else { @@ -139,7 +139,7 @@ public InnerControTime parse(String time) { int hour = Integer.valueOf(_time[0]); int minute = Integer.valueOf(_time[1]); int second = Integer.valueOf(_time[2]); - InnerControTime inner = new InnerControTime(); + InnerControlTime inner = new InnerControlTime(); inner.setHour(hour); inner.setMinute(minute); inner.setSecond(second); @@ -158,7 +158,7 @@ public InnerControTime parse(String time) { * @author shutong.dy * @since 2012-1-12 */ - private class InnerControTime { + private class InnerControlTime { private int hour; private int minute; private int second;