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 49936 - [tests] CompositionViolationException from encapsulate fields tests
Summary: [tests] CompositionViolationException from encapsulate fields tests
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2004-10-05 10:57 UTC by ehucka
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Manualy reproduced exception (1.39 KB, text/plain)
2004-10-05 10:58 UTC, ehucka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2004-10-05 10:57:52 UTC
The exception is thrown from automated tests but
it is fully reproducible manually too.

Steps to reproduce by aut. tests:

1. mount project default from
nbcvs:/refactoring/test/qa-functional/data/projects
2. Encapsulate field refID of class
org.netbeans.tests.examples.packa.Bean, change it
to private
3. Encapsulate field bb of class
org.netbeans.tests.examples.packb.BeansD
setter "setBeanA" getter "getBeanA", change field
to protected
4. Encapsulate field protectedProperty of class
org.netbeans.tests.examples.packb.BeanA
setter "setProtectedProperty" getter
"getProtectedProperty"
Comment 1 ehucka 2004-10-05 10:58:54 UTC
Created attachment 18043 [details]
Manualy reproduced exception
Comment 2 Martin Matula 2004-10-05 14:11:43 UTC
parentClass cannot be shared by two method invocations in createSetGet
method - i.e. needs to be duplicated. Assigning to Tomas.
Comment 3 ehucka 2004-10-21 15:22:51 UTC
100% reproducible by automated tests - increasing to P2
Comment 4 Pavel Flaska 2004-10-22 14:56:17 UTC
Fixed.

Checking in
src/org/netbeans/modules/refactoring/EncapsulateFieldElement.java;
/cvs/refactoring/src/org/netbeans/modules/refactoring/EncapsulateFieldElement.java,v
 <--  EncapsulateFieldElement.java
new revision: 1.6; previous revision: 1.5
done
Comment 5 ehucka 2004-11-05 09:57:16 UTC
verified
Comment 6 Tomas Hurka 2004-11-15 13:54:59 UTC
Correct fix applied to trunk.
Checking in src/org/netbeans/modules/refactoring/EncapsulateFieldElement.java;
/cvs/refactoring/src/org/netbeans/modules/refactoring/EncapsulateFieldElement.java,v  
<--  EncapsulateFieldElement.java
new revision: 1.7; previous revision: 1.6
done
Checking in org/netbeans/modules/refactoring/EncapsulateFieldElement.java;
/cvs/refactoring/src/org/netbeans/modules/refactoring/EncapsulateFieldElement.java,v  
<--  EncapsulateFieldElement.java
new revision: 1.8; previous revision: 1.7
done