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 227077

Summary: Showin invalid return
Product: javascript Reporter: alaksundar
Component: EditorAssignee: Petr Pisl <ppisl>
Status: RESOLVED DUPLICATE    
Severity: normal CC: vriha
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: This js showing invalid return

Description alaksundar 2013-03-06 05:25:01 UTC
Created attachment 132239 [details]
This js showing invalid return

Showin invalid return
Comment 1 Vladimir Riha 2013-03-06 06:43:45 UTC
Reproducible in Dev, seems to be caused by having "return" in if-else outside of function body, like in issue 226948


if (parseFloat(nua.substring(nua.indexOf("Version") + 8, nua.indexOf("Version") + 12)) > 2.99 || nua.indexOf("Chrome")) {
    document.write("<SCRIPT SRC='" + awmMenuPath + awmLibraryPath + "/awmlib2.js'><\/SCRIPT>");
    return;
}



Product Version: NetBeans IDE Dev (Build web-main-10026-on-20130305)
Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b03
System: Linux version 3.2.0-38-generic-pae running on i386; UTF-8; en_US (nb)
Comment 2 Petr Pisl 2013-05-30 15:32:54 UTC
Yes, I would say that this is about the same as issue 226948. The return type is in the global context, isn't? If not, please reopen.

*** This bug has been marked as a duplicate of bug 226948 ***