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 231697 - Function returns own non-existing property
Summary: Function returns own non-existing property
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-24 08:30 UTC by Vladimir Riha
Modified: 2013-08-01 02:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-06-24 08:30:00 UTC
Please try:

function str2array (s) {
    var spaces = /\s+/, a1 = [""];
    if (typeof s == "string" || s instanceof String) {
        if (s.indexOf(" ") < 0) {
            a1[0] = s;
            return a1;
        } else {
            return s.split(spaces);
        }
    }
    return s;
};


=> return type in Navigator is Array|str2array.s


Product Version: NetBeans IDE Dev (Build 20130623-ea62245fed2c)
Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.2.0-45-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2013-06-24 13:25:54 UTC
This is similar to issue 231699 if you understand "str2array.s" to mean "s in context of str2array". I would explain that is "property s of str2array" but again, it could be just me.
Comment 2 Petr Pisl 2013-07-30 20:22:28 UTC
Fixed in web-main.
Comment 3 Quality Engineering 2013-08-01 02:36:00 UTC
Integrated into 'main-silver', will be available in build *201307312300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/45ce2f342763
User: Petr Pisl <ppisl@netbeans.org>
Log: #231697 - Function returns own non-existing property