You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/06/27 13:45:55 UTC
[sling-org-apache-sling-connection-timeout-agent] 04/05:
ClassPool.get never returns null, so skip that check
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch feature/osgi-fixes
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-connection-timeout-agent.git
commit 1519e97befd466da649c239d8bf788b87bbb9888
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 27 15:36:34 2019 +0200
ClassPool.get never returns null, so skip that check
---
.../apache/sling/cta/impl/MBeanAwareTimeoutTransformer.java | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/sling/cta/impl/MBeanAwareTimeoutTransformer.java b/src/main/java/org/apache/sling/cta/impl/MBeanAwareTimeoutTransformer.java
index 2bd1899..d30745a 100644
--- a/src/main/java/org/apache/sling/cta/impl/MBeanAwareTimeoutTransformer.java
+++ b/src/main/java/org/apache/sling/cta/impl/MBeanAwareTimeoutTransformer.java
@@ -57,13 +57,9 @@ public abstract class MBeanAwareTimeoutTransformer implements ClassFileTransform
// 2. insert the current definition of the class
classPool.insertClassPath(new ByteArrayClassPath(Descriptor.toJavaName(className), classfileBuffer));
CtClass cc = classPool.get(Descriptor.toJavaName(className));
- if ( cc == null ) {
- Log.get().log("Could not find a class for %s in the default class pool, skipping transformation", className);
- } else {
- classfileBuffer = doTransformClass(cc);
- Log.get().log("Transformation of %s complete", className);
- this.agentInfo.registerTransformedClass(className);
- }
+ classfileBuffer = doTransformClass(cc);
+ Log.get().log("Transformation of %s complete", className);
+ this.agentInfo.registerTransformedClass(className);
}
return classfileBuffer;
} catch (Exception e) {