Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2255

Call to .setProperty() method is blocked by GroovyMethodFilter

    XMLWordPrintable

    Details

      Description

      We experienced a very strange problem lately, where we have an injected EntityManager. When calling the .setProperty() method in this instance, it fails when having groovy on the classpath.

      java.lang.AbstractMethodError: org.jboss.weldx.persistence.EntityManager$861077825$Proxy$_$$_WeldClientProxy.setProperty(Ljava/lang/String;Ljava/lang/Object;)V
      

      Correct me if I'm wrong, but I think the GroovyMethodFilter should filter those mentioned methods only on Groovy objects (which is not the case for our EntityManager), so the code should look more like this:

          @Override
          public boolean accept(Method method) {
              if (GROOVY_OBJECT.equals(method.getDeclaringClass().getName())) {
                  for (MethodSignature groovyMethod : METHODS) {
                      if (groovyMethod.matches(method)) {
                          return false;
                      }
                  }
              }
      
              return true;
          }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mkouba Martin Kouba
              Reporter:
              leifbladt Leif Bladt (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: