• R/O
  • SSH
  • HTTPS

cottoncandy: 提交


Commit MetaInfo

修订版30 (tree)
时间2015-03-26 22:12:16
作者cottoncandy

Log Message

(empty log message)

更改概述

差异

--- ccjunit/branches/v1.0.0/src/main/java/jp/sourceforge/cottoncandy/ccjunit/internal/agent/DefaultTransformer.java (revision 29)
+++ ccjunit/branches/v1.0.0/src/main/java/jp/sourceforge/cottoncandy/ccjunit/internal/agent/DefaultTransformer.java (revision 30)
@@ -17,7 +17,7 @@
1717
1818 /**
1919 * Default transformer.
20- *
20+ *
2121 * @author CottonCandy
2222 * @since 1.0
2323 */
@@ -24,10 +24,11 @@
2424 public class DefaultTransformer implements ClassFileTransformer {
2525
2626 @Override
27- public byte[] transform(final ClassLoader loader, final String className, final Class<?> classBeingRedefined,
28- final ProtectionDomain protectionDomain, final byte[] classfileBuffer) throws IllegalClassFormatException {
27+ public byte[] transform(final ClassLoader loader, final String className,
28+ final Class<?> classBeingRedefined, final ProtectionDomain protectionDomain,
29+ final byte[] classfileBuffer) throws IllegalClassFormatException {
2930
30- if (loader == null) return classfileBuffer;
31+ if (loader == null || loader.getParent() == null) return classfileBuffer;
3132 if (className.startsWith("javassist")) return classfileBuffer;
3233 if (className.startsWith("jp/sourceforge/cottoncandy")) return classfileBuffer;
3334
--- ccjunit/branches/v1.0.0/src/main/java/jp/sourceforge/cottoncandy/ccjunit/behavior/Behavior.java (revision 29)
+++ ccjunit/branches/v1.0.0/src/main/java/jp/sourceforge/cottoncandy/ccjunit/behavior/Behavior.java (revision 30)
@@ -8,7 +8,7 @@
88
99 /**
1010 * Behavior.
11- *
11+ *
1212 * @author CottonCandy
1313 * @since 1.0
1414 */
@@ -26,7 +26,7 @@
2626
2727 /**
2828 * Constructs behavior.
29- *
29+ *
3030 * @param target The target method.
3131 * @param scope The scope of this behavior.
3232 */
@@ -38,7 +38,7 @@
3838
3939 /**
4040 * Sets method handler.
41- *
41+ *
4242 * @param <T> The behavior handler type.
4343 * @param handler The method handler. can't be null.
4444 * @return The specified handler on parameter.
@@ -50,7 +50,7 @@
5050
5151 /**
5252 * Method handler install with specific callers.
53- *
53+ *
5454 * @param <T> The behavior handler type.
5555 * @param handler The method handler. can't be null.
5656 * @param enableCallers The method handler enabled in specified callers.
@@ -57,15 +57,16 @@
5757 * @param disableCallers The method handler disabled in specified callers.
5858 * @return The specified handler on parameter.
5959 */
60- public <T extends BehaviorHandler> T setHandler(final T handler, final Set<Class<?>> enableCallers,
61- final Set<Class<?>> disableCallers) {
60+ public <T extends BehaviorHandler> T setHandler(final T handler,
61+ final Set<Class<?>> enableCallers, final Set<Class<?>> disableCallers) {
6262
6363 if (handler == null) throw new NullPointerException();
6464 Set<Class<?>> es = enableCallers == null ? Collections.<Class<?>>emptySet() : enableCallers;
65- Set<Class<?>> ds = disableCallers == null ? Collections.<Class<?>>emptySet() : disableCallers;
65+ Set<Class<?>> ds = disableCallers == null ? Collections.<Class<?>>emptySet()
66+ : disableCallers;
6667
6768 /*
68- * Check overlapping of callers.
69+ * Checks overlapping of callers.
6970 */
7071 List<Class<?>> overlappingCallers = new ArrayList<Class<?>>(es);
7172 overlappingCallers.retainAll(ds);
@@ -88,7 +89,7 @@
8889
8990 /**
9091 * Returns the target method.
91- *
92+ *
9293 * @return The target method.
9394 */
9495 Method getMethod() {
@@ -98,7 +99,7 @@
9899
99100 /**
100101 * Returns the scope of this behavior.
101- *
102+ *
102103 * @return The scope of this behavior.
103104 */
104105 BehaviorScope getScope() {
@@ -108,7 +109,7 @@
108109
109110 /**
110111 * Returns the method handler.
111- *
112+ *
112113 * @return The method handler.
113114 */
114115 BehaviorHandler getHandler() {
@@ -118,7 +119,7 @@
118119
119120 /**
120121 * Returns true if contains the enabled-filter or the disabled-filter.
121- *
122+ *
122123 * @return true if contains the enabled-filter or the disabled-filter,
123124 * otherwise returns false.
124125 */
@@ -129,7 +130,7 @@
129130
130131 /**
131132 * Returns the enabled callers.
132- *
133+ *
133134 * @return The enabled callers
134135 */
135136 Set<Class<?>> getEnabledCallers() {
@@ -139,7 +140,7 @@
139140
140141 /**
141142 * Returns the disabled callers.
142- *
143+ *
143144 * @return The disabled callers.
144145 */
145146 Set<Class<?>> getDisabledCallers() {
--- ccjunit/branches/v1.0.0/pom.xml (revision 29)
+++ ccjunit/branches/v1.0.0/pom.xml (revision 30)
@@ -19,7 +19,7 @@
1919 <dependency>
2020 <groupId>org.javassist</groupId>
2121 <artifactId>javassist</artifactId>
22- <version>3.18.1-GA</version>
22+ <version>3.18.2-GA</version>
2323 <scope>runtime</scope>
2424 </dependency>
2525 </dependencies>
Show on old repository browser