Uploaded image for project: ' WildFly Client Configuration'
  1. WildFly Client Configuration
  2. WFCC-33

Processing of wildfly.config.url does not check for empty string

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 1.0.1.Final
    • None

    Description

      If the system property defining wildfly.config.url contains the empty string, we get the following exception when trying to process wildfly-config.xml:

      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      	at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:47)
      	at java.base/java.lang.String.charAt(String.java:693)
      	at org.wildfly.client.config.ClientConfiguration.propertyUrlToUri(ClientConfiguration.java:276)
      	at org.wildfly.client.config.ClientConfiguration.getInstance(ClientConfiguration.java:227)
      	at org.wildfly.httpclient.common.HttpClientXmlParser.parseHttpContext(HttpClientXmlParser.java:40)
      	at org.wildfly.httpclient.common.ConfigurationHttpContextSupplier.lambda$static$0(ConfigurationHttpContextSupplier.java:39)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at org.wildfly.httpclient.common.ConfigurationHttpContextSupplier.<clinit>(ConfigurationHttpContextSupplier.java:37)
      	... 147 more
      

      Although the property wildfly.config.url is not null and has been set, the empty string is clearly not a valid value for the URL. Perhaps issuing a warning and then trying to locate the config file elsewhere would be a better option.

      Attachments

        Issue Links

          Activity

            People

              mshikalw Moulali Shikalwadi
              rachmato@redhat.com Richard Achmatowicz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: