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

java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence when "-" is in Perforce stream name

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None

      Currently getting an error when a stream name has a dash in the name of such as "my-stream":

      java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence

      at java.util.regex.Pattern.error(Pattern.java:1924)
      at java.util.regex.Pattern.escape(Pattern.java:2416)
      at java.util.regex.Pattern.atom(Pattern.java:2164)
      at java.util.regex.Pattern.sequence(Pattern.java:2046)
      at java.util.regex.Pattern.expr(Pattern.java:1964)
      at java.util.regex.Pattern.compile(Pattern.java:1665)
      at java.util.regex.Pattern.<init>(Pattern.java:1337)
      at java.util.regex.Pattern.compile(Pattern.java:1022)
      at hudson.plugins.perforce.PerforceSCMHelper.getTokenPattern(PerforceSCMHelper.java:220)
      at hudson.plugins.perforce.PerforceSCMHelper.doesPathMatchView(PerforceSCMHelper.java:196)
      at hudson.plugins.perforce.PerforceSCMHelper.mapToWorkspace(PerforceSCMHelper.java:182)
      at com.tek42.perforce.parse.Changes.getWorkspacePathForFile(Changes.java:96)
      at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:90)
      at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:72)
      at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:431)
      at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:1073)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:408)

          [JENKINS-30653] java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence when "-" is in Perforce stream name

          Rob Petti added a comment -

          Looks more like it's having problems with character sequences in your workspace view. "-" in the stream name might just be a red-herring, since there's no reason that should cause it to fail.

          Rob Petti added a comment - Looks more like it's having problems with character sequences in your workspace view. "-" in the stream name might just be a red-herring, since there's no reason that should cause it to fail.

          Thanks for looking into this. It seems to have been something with our "Ignored" field in the stream's advanced settings. Once we got rid of anything in the ignored field it worked again.

          Michael Graessle added a comment - Thanks for looking into this. It seems to have been something with our "Ignored" field in the stream's advanced settings. Once we got rid of anything in the ignored field it worked again.

          Oleg Nenashev added a comment -

          @Michael
          Shoud we close the issue as "Not a defect"? BTW a form validation would be neat

          Oleg Nenashev added a comment - @Michael Shoud we close the issue as "Not a defect"? BTW a form validation would be neat

            Unassigned Unassigned
            mgraesslex2 Michael Graessle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: