This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Implement java.beans.Expression


Hi,

On Thu, 2004-06-24 at 07:10, Jerry Quinn wrote:
> Mauve test checked in and passes.
> 
> This depends on http://gcc.gnu.org/ml/java-patches/2004-q2/msg00739.html
>
> 2004-06-24  Jerry Quinn  <jlquinn@optonline.net>
> 
> 	* java/beans/Expression.java: New.
> 	* Makefile.am: Add Expression.java.
> 	* Makefile.in: Regenerate.

Very nice. Thanks for working on these classes.
Are you still waiting for approval to check them in?

I quickly tried them by adding them to GNU Classpath.
It gave one Mauve failure though with jamvm
(thanks for writing Mauve tests btw!).

> +   * Static methods can be executed by providing the class as a
> +   * target.
> +   *
> +   * The method name new is reserved to call the constructor 
> +   * new() will construct an object and return it.  Not useful unless
> +   * an expression :-)
> [...]
> +  final Object doExecute() throws Exception
> +  {
> +    Class klazz = target.getClass();
> [...]
> +    if (methodName.equals("new"))
> +      {
> +       Constructor ctors[] = klazz.getConstructors();

That didn't work for me since klazz now points to java.lang.Class which
doesn't have any constructors. My quick and dirty patch to get all mauve
tests working was to change the assignment of klazz to:

    Class klazz = (target instanceof Class)
                  ? (Class) target : target.getClass();

What do you think?

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]