Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3456

Can not call method with generic type parameter with null value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 8.1.0.Final
    • Fix Version/s: 9.0.0.Alpha1
    • Component/s: JSF
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Minimal example to reproduce the issue:

      Failing expression:

       #{simpleOrderHandler.getLastUpdate(null)} 

       
          import java.util.Date;  
            
          public interface SimpleDataTableHandler<T> {  
           public Date getLastUpdate(T item);  
          }  
            
          import java.util.Date;  
          import javax.enterprise.inject.Model;  
            
          @Model  
          public class SimpleOrderHandler implements SimpleDataTableHandler<SimpleOrder> {  
            
              @Override  
              public Date getLastUpdate(SimpleOrder item) {  
                  return new Date();  
              }  
            
          }  
      

      Show
      Minimal example to reproduce the issue: Failing expression: #{simpleOrderHandler.getLastUpdate(null)}   import java.util.Date; public interface SimpleDataTableHandler<T> { public Date getLastUpdate(T item); } import java.util.Date; import javax.enterprise.inject.Model; @Model public class SimpleOrderHandler implements SimpleDataTableHandler<SimpleOrder> { @Override public Date getLastUpdate(SimpleOrder item) { return new Date(); } }

      Description

      If you call a method with a generic type parameter from EL with null as parameter value you get

      javax.el.MethodNotFoundException
       
      Unable to find unambiguous method: SimpleOrderHandler$Proxy$_$$_WeldClientProxy.getLastUpdate(null)
       
      at
      javax.el.Util.findWrapper(Util.java:322)
      javax.el.Util.findMethod(Util.java:203)
      javax.el.ELUtil.findMethod(ELUtil.java:288)
      javax.el.BeanELResolver.invoke(BeanELResolver.java:527)
      javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
      com.sun.el.parser.AstValue.getValue(AstValue.java:136)
      com.sun.el.parser.AstValue.getValue(AstValue.java:204)
      com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
      org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
      com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  fjuma Farah Juma
                  Reporter:
                  nogotiated Marcel Neuwohner
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: