This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 160714

Summary: NumberFormatException: For input string: ""
Product: connecteddeveloper Reporter: Jaromir Uhrik <juhrik>
Component: BugzillaAssignee: Tomas Stupka <tstupka>
Status: RESOLVED FIXED    
Severity: blocker CC: jstola
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=147926
Issue Type: DEFECT Exception Reporter: 147926
Attachments: stacktrace

Description Jaromir Uhrik 2009-03-20 11:01:38 UTC
Build: NetBeans IDE Dev (Build cdev-407-on-090320)
VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284
OS: Mac OS X, 10.5.6, i386

User Comments:
juhrik: Attached a html file to an issue and got the exception...



Stacktrace: 
java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Long.parseLong(Long.java:424)
        at java.lang.Long.parseLong(Long.java:461)
        at java.text.DigitList.getLong(DigitList.java:167)
        at java.text.DecimalFormat.parse(DecimalFormat.java:1271)
        at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1375)
Comment 1 Jaromir Uhrik 2009-03-20 11:01:43 UTC
Created attachment 78501 [details]
stacktrace
Comment 2 Jaromir Uhrik 2009-03-20 11:10:06 UTC
It was probably caused by clicking on attachment before the progress bar finished.
Comment 3 Tomas Stupka 2009-03-20 17:48:00 UTC
fixed the exception in a88e9855ce98
yet not sure if that's all we have to do...

unfortunately, i'm unable to reproduce

honza, any ideas?
Comment 4 Jan Stola 2009-03-23 16:19:17 UTC
> unfortunately, i'm unable to reproduce
> honza, any ideas?

BugzillaIssue.addAttachment() refreshes the issue several times. This results in several EVENT_ISSUE_DATA_CHANGED 
events. The IssuePanel attempted to refresh itself during these events. Hence, I guess that there could be some race 
condition that allowed IssuePanel to ask for comments at the time when they were partially refreshed (e.g. mylyn 
libraries returning null for comment creation time).

I have modified the IssuePanel (changeset 5f8b60787b5c) to avoid refreshing when the issue (including attachments) 
changes are submitted. Therefore I believe that the mentioned race condition should be avoided by now. Hence, I suggest 
to close this issue as fixed.
Comment 5 Tomas Stupka 2009-03-23 16:28:08 UTC
ok then, fixed
Comment 6 Tomas Stupka 2009-03-23 16:30:38 UTC
*** Issue 160719 has been marked as a duplicate of this issue. ***