aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* adds Automatic-Module-Name to manifestchibash2018-09-091-0/+1
|
* modifies javassist.util.proxy.DefinePackageHelper to be compatible to Java 11.chibash2018-09-082-91/+105
| | | | It also adds a javadoc comment to CtClass#toClass() to recommend the users to use #toClass(Class) or #toClass(Lookup).
* changes CtClass#toClass() and ClassPool#toClass() etc. to support Java 11,chibash2018-09-0827-451/+532
| | | | in other words, java.lang.invoke.MethodHandles.Lookup.
* does refactoring for javassist.util.proxy.chibash2018-09-073-153/+150
|
* changes the version numberchibash2018-09-053-1/+5
|
* adds test cases for NestHostAttribute and NestMembersAttribute.chibash2018-09-025-4/+39
|
* modifies NestHostAttribute and NestMembersAttribute and adds test codechibash2018-09-028-9/+97
|
* Merge pull request #218 from dmitri-gb/masterShigeru Chiba2018-09-023-0/+92
|\ | | | | Add support for Java 11 NestHost and NestMembers attributes (JEP-181)
| * Add support for Java 11 NestHost and NestMembers attributesDmitri Gabbasov2018-08-233-0/+92
| |
* | adds a comment for the fix to JIRA JASSIST-267chibash2018-09-024-2/+39
| |
* | Merge pull request #210 from NingZhang-Ericsson/JASSIST-267Shigeru Chiba2018-08-312-6/+67
|\ \ | |/ |/| fixed JASSIST-267 (new )
| * Fix JASSIST-267NingZhang-Ericsson2018-07-131-5/+2
| | | | | | | | Clean code according to comments.
| * fixed JASSIST-267NingZhang-Ericsson2018-07-132-6/+70
| |
* | fixes issue #209 (NPE in Exception)chibash2018-07-191-1/+2
| |
* | Merge pull request #207 from andresluuk/patch-2Shigeru Chiba2018-07-191-2/+27
|\ \ | |/ |/| Custom URL stream handler in ByteArrayClassPath
| * Custom URL stream handler in ByteArrayClassPathAndres Luuk2018-07-091-2/+27
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise a normal streamhandler lookup is made and if javassist is used early on server startup protses this can lead to a deadlock on rare cases on WebSpheare. For example. A new StreamHandlerFactory is registered but not jet fully initialized. Now javassist is used at the same time but form another thread and it will be the first one to invoke the new StreamHandlerFactory and now it can deadlock with the other thread: Snipets from my deadlock: 3XMTHREADINFO "main" J9VMThread:0x000000000175EC00, omrthread_t:0x00007F4120008100, java/lang/Thread:0x00000000624290B8, state:B, prio=5 3XMTHREADBLOCK Blocked on: org/osgi/util/tracker/ServiceTracker$Tracked@0x00000000627F0A90 Owned by: "other-thread" (J9VMThread:0x0000000001B26300, java/lang/Thread:0x00000000629F1458) 3XMHEAPALLOC Heap bytes allocated since last GC cycle=0 (0x0) 3XMTHREADINFO3 Java callstack: 4XESTACKTRACE at org/osgi/util/tracker/ServiceTracker.getServiceReferences(ServiceTracker.java:525) 4XESTACKTRACE at org/eclipse/osgi/framework/internal/protocol/StreamHandlerFactory.createInternalURLStreamHandler(StreamHandlerFactory.java:162) 4XESTACKTRACE at org/eclipse/osgi/framework/internal/protocol/StreamHandlerFactory.createURLStreamHandler(StreamHandlerFactory.java:118) 4XESTACKTRACE at java/net/URL.getURLStreamHandler(URL.java:1154) 4XESTACKTRACE at java/net/URL.<init>(URL.java:611(Compiled Code)) 4XESTACKTRACE at java/net/URL.<init>(URL.java:502(Compiled Code)) 4XESTACKTRACE at java/net/URL.<init>(URL.java:451) 4XESTACKTRACE at javassist/ByteArrayClassPath.find(JRebel:92) ... 4XESTACKTRACE at java/lang/ClassLoader.loadClassHelper(ClassLoader.java:924(Compiled Code)) 5XESTACKTRACE (entered lock: org/eclipse/core/launcher/Main$StartupClassLoader@0x0000000062F3AA88, entry count: 1) 3XMTHREADINFO "other-thread" J9VMThread:0x0000000001B26300, omrthread_t:0x00007F4120A5D060, java/lang/Thread:0x00000000629F1458, state:B, prio=5 3XMTHREADBLOCK Blocked on: org/eclipse/core/launcher/Main$StartupClassLoader@0x0000000062F3AA88 Owned by: "main" (J9VMThread:0x000000000175EC00, java/lang/Thread:0x00000000624290B8) 3XMHEAPALLOC Heap bytes allocated since last GC cycle=0 (0x0) 3XMTHREADINFO3 Java callstack: 4XESTACKTRACE at org/osgi/util/tracker/AbstractTracked.size(AbstractTracked.java:356) 4XESTACKTRACE at org/osgi/util/tracker/ServiceTracker.getServiceReferences(ServiceTracker.java:526) 5XESTACKTRACE (entered lock: org/osgi/util/tracker/ServiceTracker$Tracked@0x00000000627F0A90, entry count: 1) 4XESTACKTRACE at org/eclipse/osgi/framework/internal/protocol/StreamHandlerFactory.createInternalURLStreamHandler(StreamHandlerFactory.java:162) 4XESTACKTRACE at org/eclipse/osgi/framework/internal/protocol/StreamHandlerFactory.createURLStreamHandler(StreamHandlerFactory.java:118) 4XESTACKTRACE at java/net/URL.getURLStreamHandler(URL.java:1154) 4XESTACKTRACE at java/net/URL.<init>(URL.java:611(Compiled Code)) 4XESTACKTRACE at java/net/URL.<init>(URL.java:502(Compiled Code)) 4XESTACKTRACE at java/net/URL.<init>(URL.java:451) 4XESTACKTRACE at java/net/URI.toURL(URI.java:1100) 4XESTACKTRACE at com/ibm/jsse2/av.a(av.java:92) 4XESTACKTRACE at com/ibm/jsse2/av.engineInit(av.java:7) 4XESTACKTRACE at javax/net/ssl/TrustManagerFactory.init(TrustManagerFactory.java:25)
* updates for release 3.23.1rel_3_23_1_gachibash2018-07-026-5/+10
|
* Merge pull request #204 from beikov/issues/171Shigeru Chiba2018-06-231-9/+43
|\ | | | | [#171] Allow running on JDK 8 and possibly on JDK 7 as well. Fixes #171
| * [#171] Allow running on JDK 8 and possibly on JDK 7 as well. Fixes #171Christian Beikov2018-06-221-9/+43
|/
* updates for release 3.23.0-GArel_3_23_0_gachibash2018-06-218-12/+12
|
* fixes a minor bug in a test case.chibash2018-05-084-1/+13
|
* Merge pull request #198 from beikov/JASSIST-271Shigeru Chiba2018-05-072-6/+36
|\ | | | | JASSIST-271 Allow running on Java 11 by falling back to ClassLoader.defineClass for Java > 10
| * JASSIST-271 Allow running on Java 11 by falling back to ↵Christian Beikov2018-04-292-6/+36
| | | | | | | | ClassLoader.defineClass for Java > 10
* | Merge pull request #168 from cmelchior/cm/bug/classpath-closeShigeru Chiba2018-05-0715-79/+115
|\ \ | |/ |/| [WIP] Fix leaking file handlers
| * Add missing unit testChristian Melchior2017-11-134-2/+24
| |
| * Fix merge mistakeChristian Melchior2017-11-132-2/+0
| |
| * CleanupChristian Melchior2017-11-123-6/+2
| |
| * Merge branch 'master' into cm/bug/classpath-closeChristian Melchior2017-11-12248-2497/+3951
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # pom.xml # src/main/javassist/ByteArrayClassPath.java # src/main/javassist/ClassClassPath.java # src/main/javassist/ClassPoolTail.java # src/main/javassist/LoaderClassPath.java # src/main/javassist/URLClassPath.java
| * | Remove close method on ClassPath. Add unit tests for new behaviour.Christian Melchior2017-11-1211-69/+79
| | |
| * | Update test READMEChristian Melchior2017-11-121-2/+19
| | |
| * | Ignore IntelliJ filesChristian Melchior2017-11-121-0/+1
| | |
* | | fixes a bug reported in issue #155 (Javassist Incorrect Code when wrapping ↵chibash2017-11-154-1/+39
| | | | | | | | | | | | with try/catch)
* | | adds Modifier#isVarArgs()chibash2017-11-151-0/+6
| | |
* | | adds Modifier#isVarArgs()chibash2017-11-153-0/+14
| | |
* | | changes getDefinedPackage back to getPackage when Java is < 9.chibash2017-11-153-2/+13
| | |
* | | Merge pull request #159 from nickl-/scoped-poolShigeru Chiba2017-11-1514-71/+650
|\ \ \ | | | | | | | | Fixes to javassist.scopepool
| * | | Fixes to javassist.scopepoolnickl-2017-11-1214-71/+650
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applied parameters and squashed all compiler warnings. Changed loops to enhanced for where appropriate. Fixed SoftValueHashMap: Made it a raw type. Overwritten implementation of the `get` method correctly unwrapped the reference but the methods `containsValue` and `entrySet` needed to be fixed. Implemented the remaining outstanding methods from the `java.util.Map` contract `values`, `putAll` and `keySet`. Dropped `AbstractMap` inheritance as we were not inheriting anything anymore. Changed internal map to `ConcurrentHashMap' to be atomic and parallel safe. Found original unit tests from jboss retro which are now updated to reflect the javassist versions of the scoped pool classes. Added tests for the SoftValueHashMap including test which overloads the heap to ensure the cache cleans itself appropriately.
* | | Merge pull request #158 from nickl-/secure-privilegedShigeru Chiba2017-11-155-188/+815
|\ \ \ | | | | | | | | Secure privileged
| * | | Define parameters for returned iterator.nickl-2017-11-121-1/+1
| | | |
| * | | Some functional unit tests proofs.nickl-2017-11-121-0/+281
| | | | | | | | | | | | | | | | | | | | | | | | Proves that you cannot access restricted functionality then goes ahead and mock test all 3 exposures JAVA_9, JAVA_7+ and OTHERS by changing the private static final class referenced default chosen on initialise.
| * | | Some code comments to fill in gaps.nickl-2017-11-121-0/+30
| | | |
| * | | Even now Oracle still not happy.nickl-2017-11-122-12/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Runtime still throws warnings illegal actions even after all that, there's just no logic to it. We can use Unsafe but don't touch setAccessible. O well might as well enjoy Unsafe while we still can. Wrapped the Unsafe and added method cache with varargs method for invoke calls. Can still do a lot with it but it does what it needs to for now.
| * | | Refactor definePackage as well.nickl-2017-11-122-64/+184
| | | | | | | | | | | | | | | | Yes it is deprecated but seems the right thing to do
| * | | Give helper private constructor fwiw.nickl-2017-11-121-1/+2
| | | | | | | | | | | | | | | | | | | | Wont stop you from getting an instance but it makes it more trouble at least. Also reduce the visibility of the enum method.
| * | | Add caller class checking.nickl-2017-11-122-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only thing remotely inforceable is caller class checking. You cannot bypass an exception with setAccesible. Oracle went and removed Reflection.getCallerClass() completely in favour of StackWalker. At least we can share the SecurityManage ClassContext, SecurityActions seems the appropriate venue for our stack trace peek to support the older versions
| * | | MethodHandles for JDK7+.nickl-2017-11-121-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Java 7 and 8 does support method handles so we can cater for them. When doing repeated invokes to the same method, keeping a reference to the Method handle is much faster than reflection. Also the API is cleaner not having to Object[] args etc. Worth the effort...
| * | | Refactored SecActs methods and retain 1.6 source.nickl-2017-11-121-45/+73
| | | | | | | | | | | | | | | | Remembered that 1.6 won't know about MethodHandles so must use reflection methods for them still.
| * | | Add sun.misc.Unsafe privileged retrieval to SecActions.nickl-2017-11-121-0/+29
| | | | | | | | | | | | | | | | Also do it anonomously so as not to raise the alarms and upset the powers to be.
| * | | Type check and paramatized rawtypes for SecurityActions.nickl-2017-11-121-38/+41
| | | | | | | | | | | | | | | | Some whitespace got shunted around a bit too.
| * | | Add getMethodHandle to SecurityActions.nickl-2017-11-121-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main advantage is that we can do the privileged setAccessible during creation and then freely invoke via the authorized method handle. As per the javadocs: Access checks are applied in the factory methods of Lookup, when a method handle is created. his is a key difference from the Core Reflection API, since java.lang.reflect.Method.invoke performs access checking against every caller, on every call. The performance boost is just a bonus.