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 162028

Summary: Static analysis overrides resources with similar names
Product: ide Reporter: Petr Blaha <blaha>
Component: Features On DemandAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: blocker CC: dkonecny, mkleint, pjiricka
Priority: P2 Keywords: ERGONOMICS
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: java ee
java web
screenshot

Description Petr Blaha 2009-04-06 11:26:20 UTC
NB build 090406
Java Web - Web Application
Java Web - Web application with existing sources
Java EE - Enterprise application + existing sources
JavaEE - EJB module + existing sources

have incorrect descriptions: new Enterprise application client project
Comment 1 Petr Jiricka 2009-04-06 17:23:31 UTC
This is an ergonomics issue. After I click next in the wizard and the Java EE features are enabled, the next time I run
the wizard, the descriptions show up correctly.
Comment 2 Jaroslav Tulach 2009-04-09 08:49:07 UTC
Created attachment 79801 [details]
java ee
Comment 3 Jaroslav Tulach 2009-04-09 08:49:27 UTC
Created attachment 79802 [details]
java web
Comment 4 Jaroslav Tulach 2009-04-09 08:50:08 UTC
As far as I can tell (see attached pictures) everything is OK in netbeans-trunk-nightly-200904090200.zip
Comment 5 Petr Blaha 2009-04-09 09:17:36 UTC
You can see that 'Enterprise Application client' is used for Enterprise Application (EAR) project. Please, look on
description that was used in NB 6.0. 
Comment 6 Petr Blaha 2009-04-09 09:18:37 UTC
Created attachment 79803 [details]
screenshot
Comment 7 Jaroslav Tulach 2009-04-09 12:01:53 UTC
I see. You are talking about description, not the name.
Comment 8 Jaroslav Tulach 2009-04-09 15:29:09 UTC
ergonomics#ae70f1f7a00b

Fix and guarded against future regressions by new test.
Comment 9 Jaroslav Tulach 2009-04-10 09:19:31 UTC
additional tweak was necessary: ergonomics#05e8fb1707c9
Comment 10 Quality Engineering 2009-04-10 19:43:57 UTC
Integrated into 'main-golden', will be available in build *200904101401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ae70f1f7a00b
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #162028: Few html files cloned by copy based programming ended up overriding each other. Adding special test into static analysis to prevent that in future and renaming the files to have unique names.
Comment 11 David Konecny 2009-04-13 22:16:41 UTC
I disagree with this fix. It is an ugly hack! Why would you ever want to impose a rule that name of file in
templateWizardURL must be unique? And write a test enforcing it? That's just plain wrong IMO and you should fix a source
of the problem and not a consequence, that is your own code somewhere in ergonomics. Both templateWizardURL and template
file are unique. Please revert the change or explain the benefits. Thanks.
Comment 12 David Konecny 2009-04-14 21:50:25 UTC
Yarda, I do not care what priority this issue has. The problem remains even if the issue was P10. Either explain why you
think your fix is correct or acknowledge you are going to do something about it. If none of this is going to happen I
will revert your change (after Beta was released). Thanks.
Comment 13 Jaroslav Tulach 2009-04-15 14:25:56 UTC
Problem reported by Petr Bláha is fixed and the descriptions work correctly know. As such the original P2 issue is 
gone and fixed.

I however acknowledge that the current system makes the build more fragile then it should be. Thus I keep this bug 
open and plan to enhance the static analysis to deal with resources with the same name in better way as soon as I fix 
higher priority bugs that cause problems right now.
Comment 14 David Konecny 2009-04-17 03:06:38 UTC
These changes are causing continual build to fail because nobody apart from you (and unfortunately me) is aware of
requirement to have unique names for resources in module's layer, requirement which you just made up to suit your needs.
Why don't you just fix your relative-refs.xsl stylesheet to use fully qualified name of resource?

Please exclude your test which is checking duplicity from continual build script. Thanks.
Comment 15 David Konecny 2009-04-19 22:38:50 UTC
*** Issue 162292 has been marked as a duplicate of this issue. ***
Comment 16 Jaroslav Tulach 2009-04-20 18:04:44 UTC
ergonomics#21e3a3346cb0
Comment 17 Quality Engineering 2009-04-22 08:42:08 UTC
Integrated into 'main-golden', will be available in build *200904220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/21e3a3346cb0
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #162028: Generating resouces with full resource name to prevent accidental collisions