Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5686

@Inject should require the bean dependency instead of setting null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.16.0
    • Fix Version/s: 7.0.0-M3, 6.17.0
    • Component/s: wicket-spring
    • Labels:
      None
    • Environment:
      Spring 4.0.6

      Description

      When using @SpringBean, if the bean cannot be injected then Wicket will throw Exception.

      However current behavior if when using @Inject inside component, the field will be left as null. This is inconsistent behavior with what CDI spec and how the "real" Spring does it.

      Wicket should change its behavior so that @Inject is always required. If the dependency is optional the user can use @SpringBean(required=false) as always.

        Attachments

          Activity

            People

            • Assignee:
              mgrigorov Martin Tzvetanov Grigorov
              Reporter:
              AntonKurniawan Anton Kurniawan
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: