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

ConfigResolver asList breaks if no value is found

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.0
    • 1.8.1
    • Configuration
    • None

    Description

      When calling

      ConfigResolver.resolve("notexisting").as(Integer.class).asList().getValue();
      

      a NullPointerException is thrown:

      java.lang.NullPointerException
          at org.apache.deltaspike.core.api.config.ConfigResolver$PropertyBuilder.splitAndConvertListValue(ConfigResolver.java:1020)
          at org.apache.deltaspike.core.api.config.ConfigResolver$PropertyBuilder.getValue(ConfigResolver.java:988)
      

      I created and attached a patch (including a few unit tests) to fix this issue.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            struberg Mark Struberg
            elexx Alexander Falb
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment