Skip to content

Commit

Permalink
fix function naming and spelling error. update 'maven-compiler-plugin…
Browse files Browse the repository at this point in the history
…' version. Fixed alibaba#12
  • Loading branch information
jlusdy committed Mar 4, 2013
1 parent e7f75c8 commit 4a7cd4f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
Binary file modified dist/tprofiler.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
Expand All @@ -26,7 +27,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<version>2.2.2</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/taobao/profile/config/ProfFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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)) {
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/taobao/profile/thread/TimeControlThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public class TimeControlThread extends Thread {
/**
*
*/
private InnerControTime startTime;
private InnerControlTime startTime;
/**
*
*/
private InnerControTime endTime;
private InnerControlTime endTime;

/**
* @param start
Expand All @@ -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());
Expand All @@ -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());
Expand Down Expand Up @@ -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 {
Expand All @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 4a7cd4f

Please sign in to comment.