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 59895 - The javadoc comments aren't deleted when changing property mode
Summary: The javadoc comments aren't deleted when changing property mode
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
: 69880 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-13 12:21 UTC by Jiri Prox
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

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 Jiri Prox 2005-06-13 12:21:54 UTC
NB 4.1 (200505031930)

The javadoc comment of setter/getter isn't deleted when changing the mode of the
property from read only to write only and vice versa.

steps:
1) create read only propery
2) change its mode to write only
3) confirm the deleting of getter

-> the javadoc comment for getter isn't deleted
Comment 1 Max Sauer 2005-12-05 13:42:40 UTC
*** Issue 69880 has been marked as a duplicate of this issue. ***
Comment 2 Jan Pokorsky 2005-12-06 13:53:46 UTC
The bug seems to be in javacore. The beans module simply add the setter and
remove the getter via JMI inside one transaction.
Comment 3 Pavel Flaska 2005-12-08 10:48:37 UTC
Reporoducible manually. 
I used Honza comment to write test, but it works correctly.
Comment 4 Jan Pokorsky 2005-12-08 12:47:22 UTC
Pavle, the involved code of the beans module can be found in
org.netbeans.modules.beans.PropertyPattern.setMode. You can see
generateSetterMethod() and deleteGetterMethod() there. The only issue I see
there is DialogDisplayer.notify inside the transaction.
Comment 5 Pavel Flaska 2005-12-08 12:53:48 UTC
Now I'm able to reproduce it by test also.

Checking in cfg-unit.xml;
/cvs/java/javacore/test/cfg-unit.xml,v  <--  cfg-unit.xml
new revision: 1.47; previous revision: 1.46
done
RCS file:
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/MethodTest1/MethodTest1/testAddRemoveInOneTrans.pass,v
done
Checking in
unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/MethodTest1/MethodTest1/testAddRemoveInOneTrans.pass;
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/MethodTest1/MethodTest1/testAddRemoveInOneTrans.pass,v
 <--  testAddRemoveInOneTrans.pass
initial revision: 1.1
done
Checking in
unit/src/org/netbeans/jmi/javamodel/codegen/MethodTest1/MethodTest1.java;
/cvs/java/javacore/test/unit/src/org/netbeans/jmi/javamodel/codegen/MethodTest1/MethodTest1.java,v
 <--  MethodTest1.java
new revision: 1.6; previous revision: 1.5
done
Comment 6 Pavel Flaska 2005-12-08 14:09:21 UTC
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.67; previous revision: 1.66
done
Checking in test/cfg-unit.xml;
/cvs/java/javacore/test/cfg-unit.xml,v  <--  cfg-unit.xml
new revision: 1.48; previous revision: 1.47
done
Checking in
test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/MethodTest1/MethodTest1/testAddRemoveInOneTrans.pass;
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/MethodTest1/MethodTest1/testAddRemoveInOneTrans.pass,v
 <--  testAddRemoveInOneTrans.pass
new revision: 1.2; previous revision: 1.1
done
Comment 7 Jiri Prox 2005-12-12 11:24:47 UTC
verified
Comment 8 Quality Engineering 2007-09-20 11:55:04 UTC
Reorganization of java component