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 241349

Summary: Clicking stack trace in GlassFish Server window may open wrong file
Product: serverplugins Reporter: t_gergely
Component: GlassFishAssignee: Petr Hejl <phejl>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 7.4   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description t_gergely 2014-02-03 15:25:11 UTC
(The same problem as described in bug#159177, but for GlassFish. So different source files.)

When clicking on a blue line in the output window "GlassFish Server 3+", NetBeans may open a wrong file with the same name. Eg. when you use multiple versions of the same library for different projects.

I think, here's the problem:
In LogHyperLinkSupport.java
        @Override
        public void outputLineAction(OutputEvent ev) {
            FileObject sourceFile = GlobalPathRegistry.getDefault().findResource(path); 

The javadoc of findResource states
"In case more than one source root contains the resource, one is chosen arbitrarily."

That's not good. When more than one source root contains the resource, the user should be prompted to choose the right one.