[jboss-user] [Javassist] - Re: License ambiguity to hopefully clear up.

2012-11-22 Thread Shigeru Chiba
Shigeru Chiba [https://community.jboss.org/people/chiba] created the discussion

"Re: License ambiguity to hopefully clear up."

To view the discussion, visit: https://community.jboss.org/message/778014#778014

--
That's a kind of historical confusion.  Javassist is currently distributed 
under triple licenses MPL, Apache v2,
 and/or LGPL.

Javassist was originally being distributed under MPL and then, when it was 
merged into JBoss, LGPL was
added.  The interpretation between Marc (the founder of JBoss) and me was that, 
if someone redistributes
Javassist as a part of JBoss AS from JBoss, it is subject to LGPL.  If 
Javassist is separately (or as a part
of third-party products) distributed, the distributor can choose either MPL, 
LGPL, or (now you can also choose)
Apache v2.  (S)he can also choose any combination of the three such as 
MPL+Apache and MPL+LGPL.
According to the definition, JBoss (now redhat) choosed LGPL-only for 
distributing Javassist as a part of
JBoss AS etc.

Javassist is now also availalbe from Maven central.  It would be much more 
preferable to your lawyers.

Another comment to your lawyers is that, when we added Apache v2 to the 
available license, all the
contributors agreed to that.  (Unfortunately, the number of the contributors is 
small enough to easily make
the agreement.)  So all of them agreed (by email basis) to the triple licensing.

Mike, is this clear?
--

Reply to this message by going to Community
[https://community.jboss.org/message/778014#778014]

Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2062]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist] - Re: Can JavaAssist change a static final field?

2012-11-22 Thread Shigeru Chiba
Shigeru Chiba [https://community.jboss.org/people/chiba] created the discussion

"Re: Can JavaAssist change a static final field?"

To view the discussion, visit: https://community.jboss.org/message/778013#778013

--
According to my memory, changing the value of a static field is not 
straightforward because
javac may inline the value of static constant field at occurrences of that 
field even in different
class files.  In that case, after compilation, Javassist cannot see where the 
original value is
embedded in class files and have to be modified.
--

Reply to this message by going to Community
[https://community.jboss.org/message/778013#778013]

Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2062]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: Using Javassist inside Mojo

2009-06-04 Thread chiba
OK, the problem is that the context class loader obtained by:

Thread.currentThread().getContextClassLoader()

could not find org.testng...BeforeMethod.  So you must add testng-5.8-jdk15.jar 
to the class path of the context class loader.

Otherwise, you can add that jar file to the class path of the class loader 
obtained by:

classPool.getClass().getClassLoader()

Javassist also tries this class loader to load the annotation class.

If either option does not work in your case, let me know.   Let's think about 
an extension to the Javassist API.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235399#4235399

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235399
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: Using Javassist inside Mojo

2009-06-04 Thread chiba
Have you checked the ClassPool object can access BeforeMethod?
Please try:


method.getDeclaringClass().getClassPool().get("org.testng...BeforeMethod")

If this returns null, the ClassPool does not know how to obtain the class file. 
 Maybe the appended class path is wrong.  Otherwise, something I don't know is 
happening.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235223#4235223

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235223
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: serialVersionUID issue

2008-12-05 Thread chiba
Thank you, I modified SerialVersionUID according to your post.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194662#4194662

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194662
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: Making delegators thread-safe

2008-09-18 Thread chiba
I fixed this bug in a slightly different way (by using a synchronized block).  
So could you download the latest source
and make sure it works?

If it's OK, this fix will be included in Javassist 3.9.0.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4177507#4177507

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4177507
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: NullPointerException in RuntimeSupport.DefaultMethodHand

2008-09-18 Thread chiba
I fixed this bug.  Could you download the source from the repository and make 
sure it works?

Thank you

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4177506#4177506

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4177506
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

2008-03-06 Thread chiba
anonymous wrote : I see you not uploading latest versions to maven repozitory. 
Do you want to delegate this task to me?

Thank you.  But I think someone else should be responsible
for this.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134597#4134597

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134597
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

2008-03-04 Thread chiba
So what about reusing an existing CtClass
that represents java.lang.Object?

By default, any ClassPool contains java.lang.Object.
My idea is to get that CtClass object from the pool
and modify it to be what you need.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133997#4133997

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133997
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

2008-03-04 Thread chiba
Ah.. it is not allowed in J2SE to create another version
of java.lang.Object.

For your purpose, what about:

CtClass klass = classPool.get("java.lang.Object");

You can modify klass as you want.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133988#4133988

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133988
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

2008-03-04 Thread chiba
You can change the super class just after you create
a new CtClass object.  Some factory methods like
ClassPool#makeClass() takes a super class as a
parameter.  Don't these ways satisfy your needs?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133967#4133967

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133967
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: Duplicate a method

2008-02-21 Thread chiba
Your way is dangerous.  Suppose the following method:

int foo(int i) {
  int j = 3;
  return j + i;
}

At the bytecode level, the variable i would be register 1 and j would be 
register 2.

If you add a parameter k, you must change the bytecode
of the method body so that the variable j will be register
3 because k will be register 2.

Current Javassist does not provide direct support for
adding a new parameter. :-<




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131064#4131064

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131064
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: Javassist getMethods() returns protected methods?

2007-05-04 Thread chiba
Thanks, but it a spec...  There was some reason but I don't
remember it.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043398#4043398

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043398
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: javassist can't work with jdk1.6

2007-05-04 Thread chiba
I fixed this problem and the new source is now available
from the CVS HEAD.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043397#4043397

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043397
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: Anomalous VerifyError (related to inner classes?)

2007-02-13 Thread chiba
Hi,

The bytecode of access$0 in GridDataSopurce seems broken.
If access$0 is generated by Javassist, can you find the source
code given to Javassist for generating this method?

I don't think access$0 is not a method implicitly generated
by Javassist.

Thanks


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015672#4015672

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015672
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: AccessControlException on generated classes due to missi

2006-08-06 Thread chiba
Basically, Javassist provides a byte stream of a modified class file. How it is 
loaded is the responsiblity of the clients such as HiveMind. Although Javassist 
provides a covenient function for loading it by a simple class loader, the 
clients should use their own class loaders if they need some 
application-specific requirements. 

Do you know how HiveMind load classes generated by Javassist? 

Thanks! 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963431#3963431

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963431
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Re: RuntimeException: cannot set to static

2006-08-06 Thread chiba
I changed setModifier().   Now it accepts "static" modifier if the class is 
already a nested static class.

Thanks!


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963430#3963430

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963430
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user