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 51732

Summary: [40cat] Encapsulate field refactoring broken
Product: java Reporter: eolander <eolander>
Component: UnsupportedAssignee: Tomas Hurka <thurka>
Status: CLOSED FIXED    
Severity: blocker CC: jchalupa, zikmund
Priority: P1    
Version: 4.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:

Description eolander 2004-11-22 21:15:41 UTC
[ BUILD # : 200411072021 ]
[ JDK VERSION : J
2SE 1.5.0 ]

I ran into this today using the E
ncapsulate Fields refactoring.  I had a boolean i
nstance field xxx, so the refactoring creates a
n isxxx() method for checking it.  That's good
.  But, my statements of the form "if(!xxx)" are c
Comment 1 eolander 2004-11-22 21:18:36 UTC
It looks like my comments got truncated.  Here's the missing bit:
But, my statements of the form "if(!xxx)" are changed to 
"if(isxxx())", which is bad as the not is lost.
Comment 2 Martin Matula 2004-11-22 22:38:07 UTC
Tomas, please look at it.
Comment 3 Tomas Hurka 2004-11-23 10:07:09 UTC
getDiff() for PrefixExpression is broken. 
Comment 4 Tomas Hurka 2004-11-23 13:30:44 UTC
Fixed in trunk.
Checking in org/netbeans/modules/javacore/jmiimpl/javamodel/MetadataElement.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/
MetadataElement.java,v  <--  MetadataElement.java
new revision: 1.41; previous revision: 1.40
done
Comment 5 Tomas Hurka 2004-11-23 13:53:20 UTC
Lowering priority to P2.
Comment 6 Jan Chalupa 2004-11-26 12:19:21 UTC
Fix required for RC2. Please announce to reviewers@netbeans.org and
integrate into 'release40'.
Comment 7 Martin Matula 2004-11-26 19:43:58 UTC
I've sent e-mail to reviewers@netbeans.org on behalf of Tomas. I've
also reviewed the diff and it is OK.
Comment 8 Tomas Hurka 2004-11-29 09:46:53 UTC
Integrated into release40 branch. 
Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/
MetadataElement.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/
MetadataElement.java,v  <--  MetadataElement.java
new revision: 1.37.2.2; previous revision: 1.37.2.1
done
Comment 9 Jiri Prox 2005-07-12 15:06:32 UTC
Verified in 4.2 (200507110943)
Comment 10 Quality Engineering 2007-09-20 09:54:16 UTC
Reorganization of java component