Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6120

Karaf Profiles don't parse on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.2.2
    • 4.2.3
    • karaf

    Description

      During the handling of Profiles within the org.apache.karaf.profile.impl.Profiles, there are a number of cases where the String.replaceAll() is used that should be using the String.replace().

      Unfortunately, in these cases, is uses the FileSystem separator as part of the search or replacement string, but replaceAll treats those parameters as part of a regular expression. In the case on Windows, the separator is \, which is a partial escape for a regular expression. This causes an error during the call to replaceAll (Linux and Mac are fine since their file separators are not special characters in Regular Expressions).

      Since none of the uses of replaceAll() in the Profiles class are actually attempting to do regular expressions, they can simply be replaced with a replace().

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              diamondq Mike Mansell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: