]> source.dussan.org Git - javassist.git/log
javassist.git
7 years agoGive helper private constructor fwiw.
nickl- [Fri, 27 Oct 2017 05:57:45 +0000 (07:57 +0200)]
Give helper private constructor fwiw.

Wont stop you from getting an instance but it makes it more trouble at least.
Also reduce the visibility of the enum method.

7 years agoAdd caller class checking.
nickl- [Fri, 27 Oct 2017 05:55:08 +0000 (07:55 +0200)]
Add caller class checking.

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

7 years agoMethodHandles for JDK7+.
nickl- [Fri, 27 Oct 2017 05:36:38 +0000 (07:36 +0200)]
MethodHandles for JDK7+.

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...

7 years agoRefactored SecActs methods and retain 1.6 source.
nickl- [Fri, 27 Oct 2017 05:19:22 +0000 (07:19 +0200)]
Refactored SecActs methods and retain 1.6 source.

Remembered that 1.6 won't know about MethodHandles so must use reflection methods for them still.

7 years agoAdd sun.misc.Unsafe privileged retrieval to SecActions.
nickl- [Fri, 27 Oct 2017 04:59:33 +0000 (06:59 +0200)]
Add sun.misc.Unsafe privileged retrieval to SecActions.

Also do it anonomously so as not to raise the alarms and upset the powers to be.

7 years agoType check and paramatized rawtypes for SecurityActions.
nickl- [Fri, 27 Oct 2017 04:50:16 +0000 (06:50 +0200)]
Type check and paramatized rawtypes for SecurityActions.

Some whitespace got shunted around a bit too.

7 years agoAdd getMethodHandle to SecurityActions.
nickl- [Fri, 27 Oct 2017 04:43:49 +0000 (06:43 +0200)]
Add getMethodHandle to SecurityActions.

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.

7 years agoMake an effort to secure privileged use.
nickl- [Wed, 25 Oct 2017 18:40:04 +0000 (20:40 +0200)]
Make an effort to secure privileged use.

Oracle (or maybe it was still Sun) warns that we should prevent from exposing access we gain to
privileged functionality like the unsafe etc. Before Oracle decides to restrict us even more lets
make an effort at least.

7 years agoMerge pull request #160 from nickl-/squash-warnings
Shigeru Chiba [Sun, 12 Nov 2017 06:45:25 +0000 (15:45 +0900)]
Merge pull request #160 from nickl-/squash-warnings

Source walk/Spring clean/Parameterize/Enhance/Squash warnings et.al.

7 years agoOrganize imports to disolve ambiguity. 160/head
nickl- [Mon, 30 Oct 2017 19:27:52 +0000 (21:27 +0200)]
Organize imports to disolve ambiguity.

7 years agoSquash compiler warnings in tests.
nickl- [Mon, 30 Oct 2017 18:43:30 +0000 (20:43 +0200)]
Squash compiler warnings in tests.

With the unit tests warnings were squashed by suppressing them with SuppressWarnings annotations, instead of
reparing the issues as was done with the source. Reasons being...
 * The tests might be relying on the types as they were defined.
 * If the tests were written to test against the correct forms they would've/should've stipulated those.
 * Even unused members might be important to tests so we attempt to change as little as possible.

7 years agoSource walk/Spring clean/Parameterize/Enhance et.al.
nickl- [Mon, 30 Oct 2017 18:37:23 +0000 (20:37 +0200)]
Source walk/Spring clean/Parameterize/Enhance et.al.

The following were applied during multiple itterations through the source.
 * Parameterize raw types.
 * Mark unused members.
 * Annotate override and deprecated methods.
 * Convert loops to enhance for loop.
 * Remove redundant else statements.
 * Widening collection type references.
 * Optimize code for improved readability.
 * Squash compiler warnings.
 * Identify smells.

7 years agoFix deperecated junit.framework.Assert.
nickl- [Mon, 30 Oct 2017 06:07:43 +0000 (08:07 +0200)]
Fix deperecated junit.framework.Assert.

Changed to org.junit.Assert.

7 years agoFix deperecated junit.framework.Assert.
nickl- [Mon, 30 Oct 2017 06:03:47 +0000 (08:03 +0200)]
Fix deperecated junit.framework.Assert.

Changed to org.junit.Assert.

7 years agoImplement hashCode for Annotation.
nickl- [Mon, 30 Oct 2017 04:50:20 +0000 (06:50 +0200)]
Implement hashCode for Annotation.

To honour the Object.equals contract.

7 years agoImplement hashCode for Type.
nickl- [Mon, 30 Oct 2017 04:42:35 +0000 (06:42 +0200)]
Implement hashCode for Type.

To honour the Object.equals contract.

7 years agoImplement hashCode for MultiType.
nickl- [Mon, 30 Oct 2017 04:28:52 +0000 (06:28 +0200)]
Implement hashCode for MultiType.

To honour the Object.equals contract.

7 years agoImplement hashCode for MultiArrayType.
nickl- [Mon, 30 Oct 2017 04:22:57 +0000 (06:22 +0200)]
Implement hashCode for MultiArrayType.

To honour the Object.equals contract.

7 years agoFix deperecated junit.framework.Assert.
nickl- [Sun, 29 Oct 2017 22:39:35 +0000 (00:39 +0200)]
Fix deperecated junit.framework.Assert.

Changed to org.junit.Assert.

7 years agoSuppress deprecation Applet.
nickl- [Sat, 28 Oct 2017 04:28:05 +0000 (06:28 +0200)]
Suppress deprecation Applet.

7 years agoSuppress deprecation ClassPool.makePackage
nickl- [Sat, 28 Oct 2017 04:27:02 +0000 (06:27 +0200)]
Suppress deprecation ClassPool.makePackage

7 years agoFix deprecation getPackage to getDefinedPackage
nickl- [Sat, 28 Oct 2017 04:22:42 +0000 (06:22 +0200)]
Fix deprecation getPackage to getDefinedPackage

7 years agoAdded default serialVersionUID.
nickl- [Sat, 28 Oct 2017 04:18:43 +0000 (06:18 +0200)]
Added default serialVersionUID.

7 years agoUpgrade junit from ver 3 to 4. 157/head
nickl- [Wed, 25 Oct 2017 22:33:39 +0000 (00:33 +0200)]
Upgrade junit from ver 3 to 4.

There were minimal changes:
Some tests had their own runners these were discontinued as IDEs/maven run the tests anyway.
Removed the main methods for these.
2 tests were dependent on the running order so added the test sorter.

All tests succeed on junit 4 with legacy support.

7 years agoAdd version to maven-bundle-plugin.
nickl- [Wed, 25 Oct 2017 19:11:20 +0000 (21:11 +0200)]
Add version to maven-bundle-plugin.

In order to squash the mvn build warnings.

7 years agoConfigure source encoding as UTF-8.
nickl- [Wed, 25 Oct 2017 19:10:26 +0000 (21:10 +0200)]
Configure source encoding as UTF-8.

In order to squash the mvn build warnings.

7 years agoMove runtests to build directory.
nickl- [Wed, 25 Oct 2017 19:08:57 +0000 (21:08 +0200)]
Move runtests to build directory.

Move the test output folder 'runtests' to target or build directory so that mvn clean can clean that.

7 years agochanges ClassPool#appendSystemPath(). The new implementation appends ClassClassPath... 3.22-old-style-source
chibash [Thu, 26 Oct 2017 21:51:38 +0000 (06:51 +0900)]
changes ClassPool#appendSystemPath().  The new implementation appends ClassClassPath when the JVM is earlier than 9.

7 years agofixes a bug of getAnnotations(). Some hidden annotations were not ignored.
chibash [Thu, 26 Oct 2017 21:12:33 +0000 (06:12 +0900)]
fixes a bug of getAnnotations().  Some hidden annotations were not ignored.

7 years agoupgrade maven-javadoc-plugin to 3.0.0-M1 to support publishing of 3.22.0-GA rel_3_22_00_ga
Scott Marlow [Tue, 10 Oct 2017 18:12:58 +0000 (14:12 -0400)]
upgrade maven-javadoc-plugin to 3.0.0-M1 to support publishing of 3.22.0-GA

7 years agoremoves JvstTest4#testJIRA150b because it is obsolete. rel_3_22_1_ga
chibash [Tue, 10 Oct 2017 17:18:14 +0000 (02:18 +0900)]
removes JvstTest4#testJIRA150b because it is obsolete.

7 years ago3.22.0-GA release list rel_3_22_0_ga
chibash [Tue, 10 Oct 2017 02:44:54 +0000 (11:44 +0900)]
3.22.0-GA release

7 years agoupdates ConstPool to support Module and Package
chibash [Mon, 11 Sep 2017 16:17:19 +0000 (01:17 +0900)]
updates ConstPool to support Module and Package

7 years agomodifies CtClass#setModifiers() to correctly support inner classes.
chibash [Thu, 1 Jun 2017 13:46:39 +0000 (22:46 +0900)]
modifies CtClass#setModifiers() to correctly support inner classes.

7 years agodelete testHotswap() because java 9 does not seem to allow a java agent to be attache...
chibash [Wed, 31 May 2017 08:44:26 +0000 (17:44 +0900)]
delete testHotswap() because java 9 does not seem to allow a java agent to be attached after the JVM starts

7 years agoto support Java 9-ea+171
chibash [Tue, 30 May 2017 16:52:09 +0000 (01:52 +0900)]
to support Java 9-ea+171

7 years agomodifies the version number rel_3_22_0_cr2
chibash [Sun, 16 Apr 2017 15:28:27 +0000 (00:28 +0900)]
modifies the version number

7 years agoadds javassist.util.HotSwapAgent
chibash [Sun, 16 Apr 2017 14:42:05 +0000 (23:42 +0900)]
adds javassist.util.HotSwapAgent

7 years agoadds javassist.util.proxy.ProxyFactory#onlyPublicMethods. If true, Javassist uses...
chibash [Sat, 15 Apr 2017 14:57:23 +0000 (23:57 +0900)]
adds javassist.util.proxy.ProxyFactory#onlyPublicMethods.  If true, Javassist uses java.lang.invoke.MethodHandles.Lookup to load a class.

7 years agoMerge pull request #130 from andresluuk/patch-1
Shigeru Chiba [Wed, 12 Apr 2017 18:50:48 +0000 (03:50 +0900)]
Merge pull request #130 from andresluuk/patch-1

A fix for older JDK8 versions: https://bugs.openjdk.java.net/browse/JDK-8041920

7 years agomodifies to use sun.misc.Unsafe#defineClass so that Javassist can run with jigsaw
chibash [Wed, 12 Apr 2017 18:45:51 +0000 (03:45 +0900)]
modifies to use sun.misc.Unsafe#defineClass so that Javassist can run with jigsaw

7 years agoUpdate ClassFile.java 130/head
Andres Luuk [Mon, 10 Apr 2017 14:18:07 +0000 (17:18 +0300)]
Update ClassFile.java

A fix for older JDK8 versions: https://bugs.openjdk.java.net/browse/JDK-8041920
This caused random failures a little time after startup. Reported now so that when we upgrade javassist for JDK9 then we would not have to fork this class.

7 years agoupdates the test code to run on Java 9 EA+149.
chibash [Tue, 20 Dec 2016 09:07:11 +0000 (18:07 +0900)]
updates the test code to run on Java 9 EA+149.
Due to the specification change of jigsaw, ClassLoader#defineClass()
cannot be invoked through reflection API.  As a workaround,
  --add-opens java.base/java.lang=ALL-UNNAMED
must be given to the JVM.  The ant target "runtest9" adds this jvm
argument.

7 years agoremoves javassist.ModuleClassPath.
chibash [Fri, 16 Dec 2016 14:22:18 +0000 (23:22 +0900)]
removes javassist.ModuleClassPath.
See #ClassFilesAsResources in JSR 376.  We don't need to hack the module system to read a class file in java.lang.

http://openjdk.java.net/projects/jigsaw/spec/issues/

8 years agoimplements better annotation handling since Javassist may fail to
chibash [Thu, 13 Oct 2016 17:40:06 +0000 (02:40 +0900)]
implements better annotation handling since Javassist may fail to
create a proxy object due to access controls by jigsaw.

8 years agoupdates Readme.html.
chibash [Tue, 4 Oct 2016 23:47:11 +0000 (08:47 +0900)]
updates Readme.html.

8 years agorelease 3.22.0-CR1 rel_3_22_0_cr1
chibash [Tue, 4 Oct 2016 16:02:21 +0000 (01:02 +0900)]
release 3.22.0-CR1

8 years agoMerge branch 'test/java9-jigsaw'
chibash [Tue, 4 Oct 2016 15:51:28 +0000 (00:51 +0900)]
Merge branch 'test/java9-jigsaw'

8 years agomodifies javadoc typos.
chibash [Tue, 4 Oct 2016 10:42:53 +0000 (19:42 +0900)]
modifies javadoc typos.

8 years agofixes typos in javadoc comments rel_3_21_0_ga
chibash [Mon, 3 Oct 2016 15:44:29 +0000 (00:44 +0900)]
fixes typos in javadoc comments

8 years agoupdates files for release 3.21.0-GA
chibash [Sun, 2 Oct 2016 16:10:04 +0000 (01:10 +0900)]
updates files for release 3.21.0-GA

8 years agoMerge branch 'master' into test/java9-jigsaw test/java9-jigsaw
chibash [Thu, 29 Sep 2016 11:43:05 +0000 (20:43 +0900)]
Merge branch 'master' into test/java9-jigsaw

8 years agoimproves the backward compatibility of LoaderClassPath. rel_3_21_0-java9-ea2
chibash [Tue, 27 Sep 2016 15:51:15 +0000 (00:51 +0900)]
improves the backward compatibility of LoaderClassPath.
LoaderClassPath is modified to show the same behavior in both Java 8 and 9.

8 years agoenables removal of attributes 108/head
chibash [Sun, 18 Sep 2016 14:49:43 +0000 (23:49 +0900)]
enables removal of attributes

8 years agoMerge pull request #100 from oreissig/remove-annotation
Shigeru Chiba [Sun, 18 Sep 2016 13:45:41 +0000 (22:45 +0900)]
Merge pull request #100 from oreissig/remove-annotation

removal of annotations

8 years agoMerge pull request #98 from PeterFeicht/master
Shigeru Chiba [Sat, 17 Sep 2016 17:41:12 +0000 (02:41 +0900)]
Merge pull request #98 from PeterFeicht/master

Fix NullPointerException in ControlFlow constructor

8 years agoallows adding a default method to an interface type.
chibash [Sat, 17 Sep 2016 17:32:31 +0000 (02:32 +0900)]
allows adding a default method to an interface type.

8 years agoimplement removal of annotations 100/head
oreissig [Sat, 20 Aug 2016 12:46:14 +0000 (14:46 +0200)]
implement removal of annotations

8 years agoFix NullPointerException in ControlFlow constructor. 98/head
Peter Feichtinger [Thu, 11 Aug 2016 10:52:29 +0000 (12:52 +0200)]
Fix NullPointerException in ControlFlow constructor.

An NPE would be thrown by the constructor when called with a method
without code.
Also clarify the documentation of a few methods.

8 years agofixes a bug in ClassClassPath. It was reported in Issue #97.
chibash [Wed, 3 Aug 2016 16:45:57 +0000 (01:45 +0900)]
fixes a bug in ClassClassPath.  It was reported in Issue #97.

8 years agoadds javassist.jar because the unit tests fail without it.
chibash [Tue, 2 Aug 2016 03:18:08 +0000 (12:18 +0900)]
adds javassist.jar because the unit tests fail without it.

8 years agoupdates pom.xml for building on Java 9.
chibash [Tue, 2 Aug 2016 03:11:14 +0000 (12:11 +0900)]
updates pom.xml for building on Java 9.

8 years agofixes calls to a deprecated method in Java 9. rel_3_21_0-java9-ea
chibash [Mon, 1 Aug 2016 16:36:45 +0000 (01:36 +0900)]
fixes calls to a deprecated method in Java 9.

8 years agomodifies a test case. Now all the test cases run successfully with Java 9 EA.
chibash [Sun, 31 Jul 2016 16:40:51 +0000 (01:40 +0900)]
modifies a test case.  Now all the test cases run successfully with Java 9 EA.

8 years agoMerge pull request #96 from jboss-javassist/master
Shigeru Chiba [Sun, 31 Jul 2016 03:24:55 +0000 (12:24 +0900)]
Merge pull request #96 from jboss-javassist/master

bug fixes from master

8 years agomodifies addInvokestatic() in Bytecode to support a static method declared in an... 96/head
chibash [Sun, 31 Jul 2016 03:20:22 +0000 (12:20 +0900)]
modifies addInvokestatic() in Bytecode to support a static method declared in an interface type.

8 years agomodifies runtest in build.xml
chibash [Sun, 31 Jul 2016 03:18:59 +0000 (12:18 +0900)]
modifies runtest in build.xml

8 years agoMerge branch 'test/java9-jigsaw' of github.com:jboss-javassist/javassist into test...
chibash [Sun, 31 Jul 2016 02:09:13 +0000 (11:09 +0900)]
Merge branch 'test/java9-jigsaw' of github.com:jboss-javassist/javassist into test/java9-jigsaw

8 years agoadds ModuleClassPath.java
chibash [Sun, 31 Jul 2016 02:03:51 +0000 (11:03 +0900)]
adds ModuleClassPath.java

8 years agoMerge branch 'master' of github.com:jboss-javassist/javassist into test/java9-jigsaw
chibash [Sat, 30 Jul 2016 14:06:05 +0000 (23:06 +0900)]
Merge branch 'master' of github.com:jboss-javassist/javassist into test/java9-jigsaw

8 years agoMerge pull request #95 from jboss-javassist/master
Shigeru Chiba [Sat, 30 Jul 2016 14:04:07 +0000 (23:04 +0900)]
Merge pull request #95 from jboss-javassist/master

merges bug fixes

8 years agoremoves redundant whitespaces 95/head
chibash [Sat, 30 Jul 2016 12:28:39 +0000 (21:28 +0900)]
removes redundant whitespaces

8 years agofixes a bug of ProxyFactory. It could not deal with default methods declared in...
chibash [Sat, 30 Jul 2016 09:47:59 +0000 (18:47 +0900)]
fixes a bug of ProxyFactory.  It could not deal with default methods declared in an interface. https://github.com/jboss-javassist/javassist/issues/45

8 years agofixes a bug of ProxyFactory. It could not deal with default methods declared in...
chibash [Sat, 30 Jul 2016 09:47:59 +0000 (18:47 +0900)]
fixes a bug of ProxyFactory.  It could not deal with default methods declared in an interface.

8 years agoupdates the version number.
chibash [Sat, 30 Jul 2016 07:24:30 +0000 (16:24 +0900)]
updates the version number.

8 years agofixes a bug of stackmap generation. The bug was reported here: https://github.com...
chibash [Sat, 30 Jul 2016 07:22:59 +0000 (16:22 +0900)]
fixes a bug of stackmap generation. The bug was reported here: https://github.com/jboss-javassist/javassist/issues/83

8 years agoMerge pull request #88 from jboss-javassist/master
Shigeru Chiba [Thu, 14 Jul 2016 14:49:43 +0000 (23:49 +0900)]
Merge pull request #88 from jboss-javassist/master

fixes many compatibility problems with older Java (i.e. 1.4)

8 years agofixes many compatibility problems with older Java (i.e. 1.4) 88/head
chibash [Thu, 14 Jul 2016 14:36:15 +0000 (23:36 +0900)]
fixes many compatibility problems with older Java (i.e. 1.4)

8 years agomodifies ClassPool so that it can read most class files.
chibash [Thu, 14 Jul 2016 10:53:29 +0000 (19:53 +0900)]
modifies ClassPool so that it can read most class files.

8 years agoadds ClassFile.JAVA_9
chibash [Thu, 14 Jul 2016 03:56:05 +0000 (12:56 +0900)]
adds ClassFile.JAVA_9

8 years agomodifies test code.
chibash [Sun, 12 Jun 2016 00:52:40 +0000 (09:52 +0900)]
modifies test code.

8 years agomodifies test code
chibash [Sun, 12 Jun 2016 00:47:15 +0000 (09:47 +0900)]
modifies test code

8 years agoupdates javassist.jar
chibash [Sun, 12 Jun 2016 00:46:43 +0000 (09:46 +0900)]
updates javassist.jar

8 years agoupdates javadoc
chibash [Thu, 9 Jun 2016 10:19:20 +0000 (19:19 +0900)]
updates javadoc

8 years agomodifies javadoc.
chibash [Tue, 17 May 2016 16:18:20 +0000 (01:18 +0900)]
modifies javadoc.

8 years agofixes a bug JIRA JASSIST-262
chibash [Wed, 27 Apr 2016 14:07:26 +0000 (23:07 +0900)]
fixes a bug JIRA JASSIST-262

8 years agofixes JIRA JASSIST-250
chibash [Tue, 23 Feb 2016 16:57:05 +0000 (01:57 +0900)]
fixes JIRA JASSIST-250

8 years agomodifies the implementation of that invokes an interface default method
chibash [Tue, 23 Feb 2016 10:22:13 +0000 (19:22 +0900)]
modifies the implementation of  that invokes an interface default method

8 years agofixes a bug of test5.JvstTest5.testInvalidCastWithDollar
chibash [Tue, 23 Feb 2016 09:54:20 +0000 (18:54 +0900)]
fixes a bug of test5.JvstTest5.testInvalidCastWithDollar

8 years agoupdates javassist.util.proxy to support a default interface method in Java 8
chibash [Sun, 21 Feb 2016 17:05:06 +0000 (02:05 +0900)]
updates javassist.util.proxy to support a default interface method in Java 8

8 years agofixes a deadlock in getDeclaredMethods (Issue #69)
chibash [Fri, 12 Feb 2016 01:02:47 +0000 (10:02 +0900)]
fixes a deadlock in getDeclaredMethods (Issue #69)

8 years agofixes JASSIST-256, adding an annotation to a class doesn't work on reflection
chibash [Thu, 11 Feb 2016 16:56:34 +0000 (01:56 +0900)]
fixes JASSIST-256, adding an annotation to a class doesn't work on reflection

8 years agofixes a concurrency bug in ProxyFactory (JASSIST-259)
chibash [Thu, 11 Feb 2016 15:10:20 +0000 (00:10 +0900)]
fixes a concurrency bug in ProxyFactory (JASSIST-259)

8 years agorebuilds javassist.jar by Java 6 compiler
chibash [Tue, 12 Jan 2016 14:47:06 +0000 (23:47 +0900)]
rebuilds javassist.jar by Java 6 compiler

8 years agoupdates Readme.html to record the fix of JASSIST-245 64/head
chibash [Mon, 7 Dec 2015 15:28:29 +0000 (00:28 +0900)]
updates Readme.html to record the fix of JASSIST-245

8 years agoMerge pull request #54 from wuwen5/compiler-Argument
Shigeru Chiba [Mon, 7 Dec 2015 15:20:42 +0000 (00:20 +0900)]
Merge pull request #54 from wuwen5/compiler-Argument

fixes JAVASSIST-245
<source> and <target> is 1.6, but <compilerArgument> "-parameters" in1.8

8 years agofixes JASSIST-255 Primitive array return values cause invalid cast to Object
chibash [Mon, 7 Dec 2015 15:10:58 +0000 (00:10 +0900)]
fixes JASSIST-255 Primitive array return values cause invalid cast to Object

8 years agoupdates the tutorial
chibash [Thu, 3 Dec 2015 03:23:33 +0000 (12:23 +0900)]
updates the tutorial

9 years agoupdates javadoc comments. 3.20
chibash [Wed, 7 Oct 2015 07:35:52 +0000 (16:35 +0900)]
updates javadoc comments.

9 years agomodifies a test case for JIRA JASSIST-248.
chibash [Fri, 25 Sep 2015 06:32:41 +0000 (15:32 +0900)]
modifies a test case for JIRA JASSIST-248.