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 249814 - Fix uses replaces "i" function call with class name starting with "I"
Summary: Fix uses replaces "i" function call with class name starting with "I"
Status: RESOLVED DUPLICATE of bug 249140
Alias: None
Product: php
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-14 16:25 UTC by justpusher
Modified: 2016-07-16 22:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Source file to reproduce the bug. (116 bytes, application/x-php)
2015-01-14 16:25 UTC, justpusher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description justpusher 2015-01-14 16:25:05 UTC
Created attachment 151509 [details]
Source file to reproduce the bug.

I have a function named "i", and a class InternalApi.

When I select "Fix uses", Netbeans replaces all "i" function calls to "InternalApi" without asking anything. 
i() => InternalApi()

How to reproduce: see "index.php" attachment, add this file to a new project, and select "Fix uses". 

The bug seems to appear with all class names starting with "I" and ending with "Api"

Product Version = NetBeans IDE Dev (Build 201501140001)
Operating System = Linux version 3.13.0-32-generic running on i386
Java; VM; Vendor = 1.8.0_25
Runtime = Java HotSpot(TM) Client VM 25.25-b02
Comment 1 Tomas Mysik 2016-06-10 09:00:03 UTC
I cannot reproduce your problem in the current dev build. Could you please verify it?

Simply reopen this issue, thanks.

Product Version: NetBeans IDE Dev (Build 20160610-49331e2a0591)
Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b14
System: Linux version 4.2.0-38-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 2 justpusher 2016-06-18 21:21:56 UTC
Just reproduced the problem in the freshest dev Netbeans under Windows. 

Product Version: NetBeans IDE Dev (Build 201606180002)
Java: 1.8.0_60; Java HotSpot(TM) Client VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

It's important to add the file to the project. 
The problem does not appear on files-not-in-project.
Comment 3 Tomas Mysik 2016-06-20 05:04:29 UTC
Strange, I still cannot reproduce your issue using the attached file. Where exactly do you have your cursor/caret? What exactly you do then? Just run CTRL + SHIFT + i?

Thanks.
Comment 4 Tomas Mysik 2016-06-20 06:40:37 UTC
BTW this issue seems to me to be a possible duplicate of issue #249140 which I can reproduce. Once it is fixed, please feel free to verify it (and possibly reopen this issue if I am wrong).

Thanks for your cooperation.

*** This bug has been marked as a duplicate of bug 249140 ***
Comment 5 justpusher 2016-07-16 22:32:38 UTC
The issue seems to be resolved. Thank you.