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

Primitive fields annotated with @Resource are not assigned

    XMLWordPrintable

Details

    • Workaround Exists
    • Hide

      Use the nullable wrapper type and rely on autoboxing.

      Show
      Use the nullable wrapper type and rely on autoboxing.

    Description

      Fields which are not null are skipped when performing @Resource injections. However, primitive fields are never null and therefore injections do not occur on those fields.

      Example:

      @Resource(name = "port") int port;

      Attachments

        Activity

          People

            aslak@redhat.com Aslak Knutsen
            dan.j.allen Dan Allen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: