Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000340 [Resin] minor always 08-09-05 00:00 11-30-05 14:42
Reporter user338 View Status public  
Assigned To
Priority high Resolution fixed  
Status closed   Product Version 2.1.x
Summary 0000340: MethodExpr.evalObject bug. fixed in 3, please backport.
Description RSN-384
class implementation visibility causes IllegalAccessException in MethodExpr.evalObject

fix:
in MethodExpr.evalObject
call method.setAccessible(true);
prior to calling
return method.invoke(aObj, objs);

This has been fixed in 3. Please backport.

Note: Using Resin 2.1.x with JDO is nearly impossible as JDO queries returning collections are required to return unmodifiable collections. Using the query results will often cause the following error (or similar).

--------begin test case---------

import com.caucho.el.Expr;
import com.caucho.el.MapVariableResolver;
import com.caucho.jsp.el.JspELParser;

import java.util.HashMap;
import java.util.Collections;
import java.util.HashSet;

public class Test1 {

  public static void main(String[] args) {
    
    try {
      Expr expr = new JspELParser("${c.size()}").parse();
      HashMap map = new HashMap();
      //the implementation of UnmodifiableSet is not public.
      map.put("c", Collections.unmodifiableSet(new HashSet()));
      
      Object o = expr.evalObject(new MapVariableResolver(map));
      System.out.println(o);
      
    } catch (Throwable e) {
      e.printStackTrace(); // todo - fix
    }
  }
}

--------end test case---------
Additional Information any
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
08-09-05 00:00 user338 New Issue
11-30-05 00:00 administrator Fixed in Version  => 2.1.x
11-30-05 14:42 ferg Status resolved => closed


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker