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 59135 - [41cat] refactoring failed on local variable
Summary: [41cat] refactoring failed on local variable
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2005-05-20 22:07 UTC by schwarcz
Modified: 2007-04-03 18:02 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 schwarcz 2005-05-20 22:07:39 UTC
[ JDK VERSION : 1.5.0_02 ]

Although compilation cpk,[;etes without errors, attempts to rename my local variable q2 fail with the following error:

"The original element being refactored is not available.  It was deleted or signficantly changed.  Usages can not be collected."

The IDE log contains no exceptions.

Source in question is 

public int getTodaySize() throws CobblerException {
        String q2 =   "select sum(sf.size) from SourceFile sf where audited = true and sf.project = :project and changedate like :today";
        Session session = Setup.getSessionFactory().openSession();
        Integer lines = (Integer) session.createQuery(q2)
            .setLong("project", getId())
            .setString("today", "2005-05-19")
            .uniqueResult();
        session.close();
        return lines == null ? 0 : lines.intValue();
    }
Comment 1 Milan Kubec 2005-08-09 13:32:11 UTC
I've seen this on very recent build too, but don't know how to reproduce.
Comment 2 schwarcz 2005-08-10 14:54:44 UTC
In 4.1 renaming a local variable through refactoring consistently fails with the
error message "The name has not been modified.  No Changes will be performed."

If this action is not support then: 1) the error message should say so; and 2)
It should be done as an enhacnement.
Comment 3 Jan Becicka 2005-08-22 09:00:05 UTC
Fixed in 4.2