Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-2047

Use of Java 8 lambdas by injected class causes injection to fail silently

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.1.11.Final
    • Base Implementation
    • None

      Have seen this bug elsewhere marked as resolved but it clearly isn't.

      To reproduce simply create a Junit 4 Arquiliian test in which EntityManager and UserTransaction fields are annontated for injection.

      Devise an @Test method contriving the use of (say) Runnable. Call a method in another class using the Runnable as a parameter

      Code using an anonymous inner class idiom; everything works fine.

      Code it as a lambda expression and, bizarrely, only the EntityManager is not injected (utx is OK!). No hint of anything awry in the log, no exception thrown, field is simply left null.

            dipakpawar231 Dipak Pawar (Inactive)
            cthorburn8 Colin Thorburn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: