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

fix java.lang.NumberFormatException: empty String #589

Merged
merged 1 commit into from
Aug 13, 2019

Conversation

vfadc
Copy link
Contributor

@vfadc vfadc commented Aug 13, 2019

On my default local "%.3f".format() return string like 1,23 instead of 1.23.
So, the clean() extention removes the comma and it causes the acc var to get "infinity", which becomes "" after clean() and cause NumberFormatException

If I run the unit tests locally it fails:

expected: 6.148
but was : 6,148
    at ftl.reports.xml.JUnitXmlTest.merge android(JUnitXmlTest.kt:51)

https://stackoverflow.com/questions/43963633/java-double-to-string-format

@CLAassistant
Copy link

CLAassistant commented Aug 13, 2019

CLA assistant check
All committers have signed the CLA.

@bootstraponline
Copy link
Contributor

Interesting. I didn't realize the formatting was locale specific. That explains why I wasn't able to reproduce the problem. Thanks for the pull request!

The CLA bot wants you to update the commit to match your GitHub email.

@vfadc vfadc force-pushed the fix_NumberFormatException branch from 8b8dc34 to 1340a83 Compare August 13, 2019 15:20
@codecov-io
Copy link

codecov-io commented Aug 13, 2019

Codecov Report

Merging #589 into master will increase coverage by 0.13%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #589      +/-   ##
============================================
+ Coverage     76.66%   76.79%   +0.13%     
  Complexity      609      609              
============================================
  Files            81       81              
  Lines          2254     2254              
  Branches        319      319              
============================================
+ Hits           1728     1731       +3     
+ Misses          312      310       -2     
+ Partials        214      213       -1

@bootstraponline
Copy link
Contributor

bootstraponline commented Aug 13, 2019

I think you have to squash the commits then force push so the PR contains a total of one commit. Then the commit with the invalid author info will be gone from the history. Sorry it's kind of a pain.

Squashed commits:
[1340a83] fix java.lang.NumberFormatException: empty String
@vfadc vfadc force-pushed the fix_NumberFormatException branch from 61b7619 to a7894e9 Compare August 13, 2019 16:30
@bootstraponline bootstraponline merged commit 44b4869 into Flank:master Aug 13, 2019
@bootstraponline
Copy link
Contributor

Merged! Thanks for tracking down the bug and fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants