Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-120

BeanProvider: add convenience methods without the 'optional' flag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.1-incubating
    • 0.2-incubating
    • Core
    • None

    Description

      The BeanProvider methods
      #getContextualReference(String name, boolean optional) and
      #getContextualReference(Type t, boolean optional, Annotation... qualifiers)
      will in 90% of the cases get called with optional=false to throw an IllegalStateException if no bean could be found.

      Thus we shall introduce 2 convenient methods without the boolean parameter which will fail if none of the requested beans exist.

      We don't need to do this for methods like getContextualReferences (plural) as those methods are not used that frequently.

      Attachments

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: