java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^

Jenkins JIRA | Ryan Reading | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    After adding a test project to my repository, I started getting the below error during the build when updating android project files. java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^ at java.util.regex.Pattern.error(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.util.regex.Pattern.<init>(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.lang.String.split(Unknown Source) at java.lang.String.split(Unknown Source) at hudson.plugins.android_emulator.util.Utils.getRelativePath(Utils.java:616) at hudson.plugins.android_emulator.util.Utils.getRelativePathDistance(Utils.java:665) at hudson.plugins.android_emulator.builder.UpdateProjectBuilder.perform(UpdateProjectBuilder.java:130) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586) at hudson.model.Run.execute(Run.java:1593) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) I tracked down the error which appears to be a misuse of the String.split function in plugins/android_emulator/util/Utils.java:616. // Target directory is somewhere above our directory String[] fromParts = fromPath.substring(1).split(File.separator); final int fromLength = fromParts.length; String[] toParts = toPath.substring(1).split(File.separator); final int toLength = toParts.length; File.separator is a string but String.split is expecting a regex. On windows, File.separator is an invalid regex.

    Jenkins JIRA | 4 years ago | Ryan Reading
    java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^
  2. 0

    After adding a test project to my repository, I started getting the below error during the build when updating android project files. java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^ at java.util.regex.Pattern.error(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.util.regex.Pattern.<init>(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.lang.String.split(Unknown Source) at java.lang.String.split(Unknown Source) at hudson.plugins.android_emulator.util.Utils.getRelativePath(Utils.java:616) at hudson.plugins.android_emulator.util.Utils.getRelativePathDistance(Utils.java:665) at hudson.plugins.android_emulator.builder.UpdateProjectBuilder.perform(UpdateProjectBuilder.java:130) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586) at hudson.model.Run.execute(Run.java:1593) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) I tracked down the error which appears to be a misuse of the String.split function in plugins/android_emulator/util/Utils.java:616. // Target directory is somewhere above our directory String[] fromParts = fromPath.substring(1).split(File.separator); final int fromLength = fromParts.length; String[] toParts = toPath.substring(1).split(File.separator); final int toLength = toParts.length; File.separator is a string but String.split is expecting a regex. On windows, File.separator is an invalid regex.

    Jenkins JIRA | 4 years ago | Ryan Reading
    java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^
  3. 0

    Error when run eclipse command on playframework2.0

    GitHub | 5 years ago | opensource21
    java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    show dockerCommands fails on windows OS

    GitHub | 2 years ago | rsemlal
    java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^
  6. 0

    GitHub comment 75#3382290

    GitHub | 5 years ago | hseeberger
    java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^

  1. Cafecanudo 2 times, last 7 months ago
  2. bpbhat77 1 times, last 8 months ago
  3. Juraji 1 times, last 11 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.regex.PatternSyntaxException

    Unexpected internal error near index 1 \ ^

    at java.util.regex.Pattern.error()
  2. Java RT
    String.split
    1. java.util.regex.Pattern.error(Unknown Source)
    2. java.util.regex.Pattern.compile(Unknown Source)
    3. java.util.regex.Pattern.<init>(Unknown Source)
    4. java.util.regex.Pattern.compile(Unknown Source)
    5. java.lang.String.split(Unknown Source)
    6. java.lang.String.split(Unknown Source)
    6 frames
  3. hudson.plugins.android_emulator
    UpdateProjectBuilder.perform
    1. hudson.plugins.android_emulator.util.Utils.getRelativePath(Utils.java:616)
    2. hudson.plugins.android_emulator.util.Utils.getRelativePathDistance(Utils.java:665)
    3. hudson.plugins.android_emulator.builder.UpdateProjectBuilder.perform(UpdateProjectBuilder.java:130)
    3 frames
  4. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    3. hudson.model.Build$BuildExecution.build(Build.java:199)
    4. hudson.model.Build$BuildExecution.doRun(Build.java:160)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
    6. hudson.model.Run.execute(Run.java:1593)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    8. hudson.model.ResourceController.execute(ResourceController.java:88)
    9. hudson.model.Executor.run(Executor.java:247)
    9 frames