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

ConfigResolver asList breaks if no value is found

    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

        1. deltaspike.patch
          2 kB
          Alexander Falb

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: