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 - Showin invalid return
Summary: Showin invalid return
Status: RESOLVED DUPLICATE of bug 226948
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 05:25 UTC by alaksundar
Modified: 2013-05-30 15:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This js showing invalid return (49.11 KB, application/octet-stream)
2013-03-06 05:25 UTC, alaksundar
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***