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 129194

Summary: java.io.IOException: Duplicated attributes in a section: OpenIDE-Module-Specification-Version
Product: apisupport Reporter: Michel Graciano <hmichel>
Component: ProjectAssignee: Martin Kozeny <mkozeny>
Status: RESOLVED WONTFIX    
Severity: blocker CC: jglick
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=33583
Issue Type: DEFECT Exception Reporter: 33583

Description Michel Graciano 2008-03-04 22:29:00 UTC
Build: NetBeans IDE Dev (Build 200803021202)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05
OS: Linux, 2.6.22-14-generic, i386
User comments: 
STACKTRACE: (first 10 lines)
java.io.IOException: Duplicated attributes in a section: OpenIDE-Module-Specification-Version
        at org.netbeans.modules.apisupport.project.EditableManifest$Section.<init>(EditableManifest.java:372)
        at org.netbeans.modules.apisupport.project.EditableManifest.<init>(EditableManifest.java:110)
        at org.netbeans.modules.apisupport.project.Util.loadManifest(Util.java:558)
        at
org.netbeans.modules.apisupport.project.ui.customizer.SingleModuleProperties.storeManifestChanges(SingleModuleProperties.java:771)
        at
org.netbeans.modules.apisupport.project.ui.customizer.SingleModuleProperties.storeProperties(SingleModuleProperties.java:687)
        at
org.netbeans.modules.apisupport.project.ui.customizer.CustomizerProviderImpl.storeProperties(CustomizerProviderImpl.java:87)
        at org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer$1.run(BasicCustomizer.java:152)
        at org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer$1.run(BasicCustomizer.java:151)
        at org.openide.util.Mutex.writeAccess(Mutex.java:433)
        at org.openide.util.Mutex$1R.run(Mutex.java:1305)
Comment 1 Jesse Glick 2008-03-04 22:36:21 UTC
So, do you in fact have that attribute duplicated? Any way to reproduce?
Comment 2 Lukas Hasik 2008-03-05 07:44:18 UTC
*** Issue 129200 has been marked as a duplicate of this issue. ***
Comment 3 Michel Graciano 2008-03-05 13:58:25 UTC
To reproduce it just edit the file by hand. IMHO, IMHO, it should show a message instead a exception.
Comment 4 Jesse Glick 2008-03-05 15:57:51 UTC
Edit it to say what? Can you tell me what it is you did?
Comment 5 Michel Graciano 2008-03-05 16:53:57 UTC
Steps to reproduce:
1-Open a manifest.mf file which already have a 'OpenIDE-Module-Specification-Version' entry;
2-Add another one 'OpenIDE-Module-Specification-Version';
3-The exception is thrown.

Regards.
Comment 6 Jesse Glick 2008-03-05 17:08:30 UTC
I see. It's true that we do not go to lengths to fix up malformed metadata files. Generally the GUI customizers assume
they are starting with well-formed data.
Comment 7 rmichalsky 2008-11-24 15:10:11 UTC
Not into 7.0 or next release. Feel free to reopen if more important than it seems.
Comment 8 Michel Graciano 2008-11-24 17:10:14 UTC
IMO, the point here is not if it is really important or not from my point of view, but if this kind of behaviour is
expected from a professional tool or not. I believe that, since we have a way to know that there is a error and we can
inform the user about the problem and a way to solve it, why not do it?
I believe we, developers, never should expect the correct data from users always they could corrupt it. Validations
always must be done in this cases to make the tool as robust as possible.
Probably it could be a enhancement instead a issue, since we know that UI will always generate valid artifacts, but
never believe that user will give valid data.

Regards
Comment 9 rmichalsky 2008-11-25 06:49:18 UTC
I absolutely agree that no application should throw exceptions on corrupted input file and issues closed as LATER are
meant to be reopened in the future, e.g. as part of larger development in that particular area. At present this is
merely a matter of priorities, there is simply not enough people to tackle all problems at once.

Last but not least we are always grateful for patches for such issues, NetBeans are free software after all.
Comment 10 Quality Engineering 2009-11-02 10:57:14 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX
Comment 11 Jesse Glick 2009-11-23 13:57:13 UTC
Closed spuriously, still valid.
Comment 12 Martin Kozeny 2014-01-10 14:22:56 UTC
WONTFIX simirarly as here https://netbeans.org/bugzilla/show_bug.cgi?id=167540.