Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumberFormatException while parsing String as Long #79

Open
julioz opened this issue Apr 17, 2017 · 0 comments
Open

NumberFormatException while parsing String as Long #79

julioz opened this issue Apr 17, 2017 · 0 comments

Comments

@julioz
Copy link

julioz commented Apr 17, 2017

Just added the plugin to my project to check how it works. Followed the guidelines suggested by the documentation.

My config:
Using "net.rdrei.android.buildtimetracker:gradle-plugin:0.9.+"

buildtimetracker {
  reporters {
    csv {
      output "build/times.csv"
      append true
      header false
    }

    summary {
      ordered false
      threshold 50
      barstyle "unicode"
    }

    csvSummary {
      csv "build/times.csv"
    }
  }
}

At the first time running ./gradlew clean, the CSV file is correctly generated (with headers turned off). Turning headers on and running it again causes an exception and makes the build fail.

java.lang.NumberFormatException: For input string: "timestamp"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Long.parseLong(Long.java:589)
        at java.lang.Long.valueOf(Long.java:803)
        at java_lang_Long$valueOf$0.call(Unknown Source)
        at net.rdrei.android.buildtimetracker.reporters.CSVSummaryReporter$_printReport_closure2.doCall(CSVSummaryReporter.groovy:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
        at groovy.lang.Closure.call(Closure.java:414)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5226)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collectEntries(DefaultGroovyMethods.java:3489)
@julioz julioz changed the title NumberFormatException on build NumberFormatException while parsing String as Long Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants