Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8209

Update hudson.Util.VARIABLE to support variable names with a '.' in them

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • core
    • None

      hudson.Util.VARIABLE defines a pattern for variable names, which excludes variables names with a '.' in them. The current definition is:

      private static final Pattern VARIABLE = Pattern.compile("\\$([A-Za-z0-9_]+|

      {[A-Za-z0-9_]+\\}

      |
      $)");

      However, variables with '.' are commonplace. For example, see the standard list of Java environment variables here: http://download.oracle.com/javase/6/docs/api/java/lang/System.html#getProperties%28%29

      Please consider updating the VARIABLE declaration to include names with a '.', such as:

      private static final Pattern VARIABLE = Pattern.compile("\\$([A-Za-z0-9_\\.]+|

      {[A-Za-z0-9_\\.]+\\}

      |
      $)");

      Unfortunately, I have had extraordinary difficulty trying to get the hudson core checked out as Eclipse projects, so that I can test the change. So, I admit that I have not tested the specific change above. Hopefully, it would be easy to verify.

      Thanks!
      – Scott

            sahendrickson sahendrickson
            sahendrickson sahendrickson
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: