Issue Type: Bug Bug
Affects Versions: current
Assignee: Nicolas De Loof
Components: git, git-client
Created: 25/Feb/14 1:34 PM
Description:

Version 1.6.3 .
Using Force polling using workspace

Date parsing fails when trying to access date field in groovy:

Code used:

def thr = Thread.currentThread();
def currentBuild = thr?.executable;
def changes = currentBuild.getChangeSet();
changes.getItems().each {
	ChangeLogSet.Entry lastChange = (ChangeLogSet.Entry)it;
    lastChange.getTimestamp();
}

Exception:

ERROR: Processing failed due to a bug in the code. Please report this to [email protected]
java.lang.NumberFormatException: For input string: "1970-01-17T05:02:10+0200 +0200"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Long.parseLong(Long.java:441)
	at java.lang.Long.parseLong(Long.java:483)
	at hudson.plugins.git.GitChangeSet.getTimestamp(GitChangeSet.java:194)
	at hudson.plugins.git.GitChangeSet$getTimestamp.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
	at Script1$_run_closure1.doCall(Script1.groovy:23)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
	at groovy.lang.Closure.call(Closure.java:415)
	at groovy.lang.Closure.call(Closure.java:428)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1379)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1351)
	at org.codehaus.groovy.runtime.dgm$170.invoke(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at Script1.run(Script1.groovy:20)
	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:650)
	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:636)
	at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:82)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:899)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:666)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565)
	at hudson.model.Run.execute(Run.java:1670)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:231)
Project: Jenkins
Priority: Major Major
Reporter: Moosh Ben
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