groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 01/02: Trivial refactoring: Avoid calling 'getClass()' on Class instance
Date Fri, 05 Apr 2019 19:24:34 GMT
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 47e681b6a0373cf72e854338068d5d5cff8255b4
Author: Daniel Sun <sunlan@apache.org>
AuthorDate: Sat Apr 6 01:59:08 2019 +0800

    Trivial refactoring: Avoid calling 'getClass()' on Class instance
    
    (cherry picked from commit 4b7001b1f1e80d0f57ecc410996bc9015b595b70)
---
 .../java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java
b/src/main/java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java
index f4e9050..71fd21e 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java
@@ -58,7 +58,7 @@ public class GroovySunClassLoader extends SunClassLoader {
     }
 
     private void loadAbstract() throws IOException {
-        final InputStream asStream = GroovySunClassLoader.class.getClass().getClassLoader().getResourceAsStream(resName("org.codehaus.groovy.runtime.callsite.AbstractCallSite"));
+        final InputStream asStream = GroovySunClassLoader.class.getClassLoader().getResourceAsStream(resName("org.codehaus.groovy.runtime.callsite.AbstractCallSite"));
         ClassReader reader = new ClassReader(asStream);
         final ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
         final ClassVisitor cv = new ClassVisitor(4, cw) {


Mime
View raw message