Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.4.Final, 2.1.0.Beta2
    • Fix Version/s: 2.1.1.Final, 2.2.0.Alpha1
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      @ApplicationScoped
      public class CdiTest {

      public static void main(String[] args)

      { Weld weld = new Weld(); WeldContainer container = weld.initialize(); CdiTest test = container.instance().select(CdiTest.class).get(); test.test(); }

      public void test() {

      }

      @Produces
      private ABeanToBeMocked aMockedBean = new ABeanToBeMocked(2);

      @Inject
      private ABeanToBeInjected aBeanToBeInjected;

      public static class AProducer {

      @Inject
      private ABeanToBeMocked aMockedBean;

      @Produces
      public ABean namedBean()

      { return new ABean(2); }

      }

      public static class ABeanToBeMocked {
      ABeanToBeMocked(int foo) {

      }
      }

      public static class ABeanToBeInjected

      { @Inject ABean namedBean; }

      public static class ABean {
      ABean(int foo) {

      }
      }
      }

      Show
      @ApplicationScoped public class CdiTest { public static void main(String[] args) { Weld weld = new Weld(); WeldContainer container = weld.initialize(); CdiTest test = container.instance().select(CdiTest.class).get(); test.test(); } public void test() { } @Produces private ABeanToBeMocked aMockedBean = new ABeanToBeMocked(2); @Inject private ABeanToBeInjected aBeanToBeInjected; public static class AProducer { @Inject private ABeanToBeMocked aMockedBean; @Produces public ABean namedBean() { return new ABean(2); } } public static class ABeanToBeMocked { ABeanToBeMocked(int foo) { } } public static class ABeanToBeInjected { @Inject ABean namedBean; } public static class ABean { ABean(int foo) { } } }

      Description

      When using Weld-SE a StackOverflowException is generated from running the following code.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mkouba mkouba
                Reporter:
                bryncooke Bryn Cooke
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: