Issue Type: Bug Bug
Affects Versions: current
Assignee: Christopher Orr
Components: android-emulator
Created: 28/Jul/13 10:05 PM
Description:

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.

Environment: Windows XP
Project: Jenkins
Labels: plugin windows exception
Priority: Major Major
Reporter: Ryan Reading
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to