You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Dmitry A. Durnev (JIRA)" <ji...@apache.org> on 2006/04/07 09:40:24 UTC
[jira] Created: (HARMONY-321) VetoableChangeSupport: the reverting
event is not fired if the change is vetoed
VetoableChangeSupport: the reverting event is not fired if the change is vetoed
-------------------------------------------------------------------------------
Key: HARMONY-321
URL: http://issues.apache.org/jira/browse/HARMONY-321
Project: Harmony
Type: Bug
Components: Classlib
Environment: j9 + Harmony classlib
Reporter: Dmitry A. Durnev
Priority: Minor
The spec on VetoableChangeSupport.fireVetoableChange(String, Object, Object)
reads:
"If anyone vetos the change, then fire a new event reverting everyone to the old
value and then rethrow the PropertyVetoException."
This "new event" is never fired. See test below. Expected and RI output is:
1
0
But actual output on Harmony is:
0
1
Test:
---------------------------------------------
import java.beans.*;
public class VetoableChangeSupportTest {
VetoableChangeSupport vcs = new VetoableChangeSupport(this);
PropertyChangeEvent event;
String vetoedPropName = "prop";
VetoableChangeListener vlistener = new VetoableChangeListener() {
public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException {
event = e;
String propName = e.getPropertyName();
if (propName.equals(vetoedPropName) && e.getNewValue().equals(new Integer(1))) {
throw new PropertyVetoException(propName + " change is vetoed!", e);
}
}
};
public static void main(String[] args) {
new VetoableChangeSupportTest().runTest();
}
void runTest(){
vcs.addVetoableChangeListener(vlistener);
try {
vcs.fireVetoableChange(vetoedPropName, 0, 1);
}
catch (PropertyVetoException pve) {
}
System.out.println(event.getOldValue());
System.out.println(event.getNewValue());
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-321) VetoableChangeSupport: the
reverting event is not fired if the change is vetoed
Posted by "Dmitry A. Durnev (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-321?page=comments#action_12377741 ]
Dmitry A. Durnev commented on HARMONY-321:
------------------------------------------
The issue is resolved. Verified against rev. 399591.
> VetoableChangeSupport: the reverting event is not fired if the change is vetoed
> -------------------------------------------------------------------------------
>
> Key: HARMONY-321
> URL: http://issues.apache.org/jira/browse/HARMONY-321
> Project: Harmony
> Type: Bug
> Components: Classlib
> Environment: j9 + Harmony classlib
> Reporter: Dmitry A. Durnev
> Assignee: Mikhail Loenko
> Priority: Minor
> Attachments: Harmony-321.txt
>
> The spec on VetoableChangeSupport.fireVetoableChange(String, Object, Object)
> reads:
> "If anyone vetos the change, then fire a new event reverting everyone to the old
> value and then rethrow the PropertyVetoException."
> This "new event" is never fired. See test below. Expected and RI output is:
> 1
> 0
> But actual output on Harmony is:
> 0
> 1
> Test:
> ---------------------------------------------
> import java.beans.*;
> public class VetoableChangeSupportTest {
> VetoableChangeSupport vcs = new VetoableChangeSupport(this);
> PropertyChangeEvent event;
> String vetoedPropName = "prop";
> VetoableChangeListener vlistener = new VetoableChangeListener() {
> public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException {
> event = e;
> String propName = e.getPropertyName();
> if (propName.equals(vetoedPropName) && e.getNewValue().equals(new Integer(1))) {
> throw new PropertyVetoException(propName + " change is vetoed!", e);
> }
> }
>
> };
> public static void main(String[] args) {
> new VetoableChangeSupportTest().runTest();
> }
>
> void runTest(){
> vcs.addVetoableChangeListener(vlistener);
> try {
> vcs.fireVetoableChange(vetoedPropName, 0, 1);
> }
> catch (PropertyVetoException pve) {
>
> }
> System.out.println(event.getOldValue());
> System.out.println(event.getNewValue());
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-321) VetoableChangeSupport: the reverting
event is not fired if the change is vetoed
Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-321?page=all ]
Mikhail Loenko reassigned HARMONY-321:
--------------------------------------
Assign To: Mikhail Loenko
> VetoableChangeSupport: the reverting event is not fired if the change is vetoed
> -------------------------------------------------------------------------------
>
> Key: HARMONY-321
> URL: http://issues.apache.org/jira/browse/HARMONY-321
> Project: Harmony
> Type: Bug
> Components: Classlib
> Environment: j9 + Harmony classlib
> Reporter: Dmitry A. Durnev
> Assignee: Mikhail Loenko
> Priority: Minor
>
> The spec on VetoableChangeSupport.fireVetoableChange(String, Object, Object)
> reads:
> "If anyone vetos the change, then fire a new event reverting everyone to the old
> value and then rethrow the PropertyVetoException."
> This "new event" is never fired. See test below. Expected and RI output is:
> 1
> 0
> But actual output on Harmony is:
> 0
> 1
> Test:
> ---------------------------------------------
> import java.beans.*;
> public class VetoableChangeSupportTest {
> VetoableChangeSupport vcs = new VetoableChangeSupport(this);
> PropertyChangeEvent event;
> String vetoedPropName = "prop";
> VetoableChangeListener vlistener = new VetoableChangeListener() {
> public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException {
> event = e;
> String propName = e.getPropertyName();
> if (propName.equals(vetoedPropName) && e.getNewValue().equals(new Integer(1))) {
> throw new PropertyVetoException(propName + " change is vetoed!", e);
> }
> }
>
> };
> public static void main(String[] args) {
> new VetoableChangeSupportTest().runTest();
> }
>
> void runTest(){
> vcs.addVetoableChangeListener(vlistener);
> try {
> vcs.fireVetoableChange(vetoedPropName, 0, 1);
> }
> catch (PropertyVetoException pve) {
>
> }
> System.out.println(event.getOldValue());
> System.out.println(event.getNewValue());
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-321) VetoableChangeSupport: the reverting
event is not fired if the change is vetoed
Posted by "Dmitry A. Durnev (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-321?page=all ]
Dmitry A. Durnev updated HARMONY-321:
-------------------------------------
Attachment: Harmony-321.txt
Attached patch should fix the issue.(Includes light refactoring of VetoableChangeSupport.doFirePropertyChange() private method)
> VetoableChangeSupport: the reverting event is not fired if the change is vetoed
> -------------------------------------------------------------------------------
>
> Key: HARMONY-321
> URL: http://issues.apache.org/jira/browse/HARMONY-321
> Project: Harmony
> Type: Bug
> Components: Classlib
> Environment: j9 + Harmony classlib
> Reporter: Dmitry A. Durnev
> Assignee: Mikhail Loenko
> Priority: Minor
> Attachments: Harmony-321.txt
>
> The spec on VetoableChangeSupport.fireVetoableChange(String, Object, Object)
> reads:
> "If anyone vetos the change, then fire a new event reverting everyone to the old
> value and then rethrow the PropertyVetoException."
> This "new event" is never fired. See test below. Expected and RI output is:
> 1
> 0
> But actual output on Harmony is:
> 0
> 1
> Test:
> ---------------------------------------------
> import java.beans.*;
> public class VetoableChangeSupportTest {
> VetoableChangeSupport vcs = new VetoableChangeSupport(this);
> PropertyChangeEvent event;
> String vetoedPropName = "prop";
> VetoableChangeListener vlistener = new VetoableChangeListener() {
> public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException {
> event = e;
> String propName = e.getPropertyName();
> if (propName.equals(vetoedPropName) && e.getNewValue().equals(new Integer(1))) {
> throw new PropertyVetoException(propName + " change is vetoed!", e);
> }
> }
>
> };
> public static void main(String[] args) {
> new VetoableChangeSupportTest().runTest();
> }
>
> void runTest(){
> vcs.addVetoableChangeListener(vlistener);
> try {
> vcs.fireVetoableChange(vetoedPropName, 0, 1);
> }
> catch (PropertyVetoException pve) {
>
> }
> System.out.println(event.getOldValue());
> System.out.println(event.getNewValue());
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-321) VetoableChangeSupport: the reverting
event is not fired if the change is vetoed
Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-321?page=all ]
Mikhail Loenko resolved HARMONY-321:
------------------------------------
Resolution: Fixed
fixed in revision 396863
Dmitry, please verify that it fully resolves the issue
> VetoableChangeSupport: the reverting event is not fired if the change is vetoed
> -------------------------------------------------------------------------------
>
> Key: HARMONY-321
> URL: http://issues.apache.org/jira/browse/HARMONY-321
> Project: Harmony
> Type: Bug
> Components: Classlib
> Environment: j9 + Harmony classlib
> Reporter: Dmitry A. Durnev
> Assignee: Mikhail Loenko
> Priority: Minor
> Attachments: Harmony-321.txt
>
> The spec on VetoableChangeSupport.fireVetoableChange(String, Object, Object)
> reads:
> "If anyone vetos the change, then fire a new event reverting everyone to the old
> value and then rethrow the PropertyVetoException."
> This "new event" is never fired. See test below. Expected and RI output is:
> 1
> 0
> But actual output on Harmony is:
> 0
> 1
> Test:
> ---------------------------------------------
> import java.beans.*;
> public class VetoableChangeSupportTest {
> VetoableChangeSupport vcs = new VetoableChangeSupport(this);
> PropertyChangeEvent event;
> String vetoedPropName = "prop";
> VetoableChangeListener vlistener = new VetoableChangeListener() {
> public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException {
> event = e;
> String propName = e.getPropertyName();
> if (propName.equals(vetoedPropName) && e.getNewValue().equals(new Integer(1))) {
> throw new PropertyVetoException(propName + " change is vetoed!", e);
> }
> }
>
> };
> public static void main(String[] args) {
> new VetoableChangeSupportTest().runTest();
> }
>
> void runTest(){
> vcs.addVetoableChangeListener(vlistener);
> try {
> vcs.fireVetoableChange(vetoedPropName, 0, 1);
> }
> catch (PropertyVetoException pve) {
>
> }
> System.out.println(event.getOldValue());
> System.out.println(event.getNewValue());
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (HARMONY-321) VetoableChangeSupport: the reverting
event is not fired if the change is vetoed
Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-321?page=all ]
Mikhail Loenko closed HARMONY-321:
----------------------------------
verified by Dmitry
> VetoableChangeSupport: the reverting event is not fired if the change is vetoed
> -------------------------------------------------------------------------------
>
> Key: HARMONY-321
> URL: http://issues.apache.org/jira/browse/HARMONY-321
> Project: Harmony
> Type: Bug
> Components: Classlib
> Environment: j9 + Harmony classlib
> Reporter: Dmitry A. Durnev
> Assignee: Mikhail Loenko
> Priority: Minor
> Attachments: Harmony-321.txt
>
> The spec on VetoableChangeSupport.fireVetoableChange(String, Object, Object)
> reads:
> "If anyone vetos the change, then fire a new event reverting everyone to the old
> value and then rethrow the PropertyVetoException."
> This "new event" is never fired. See test below. Expected and RI output is:
> 1
> 0
> But actual output on Harmony is:
> 0
> 1
> Test:
> ---------------------------------------------
> import java.beans.*;
> public class VetoableChangeSupportTest {
> VetoableChangeSupport vcs = new VetoableChangeSupport(this);
> PropertyChangeEvent event;
> String vetoedPropName = "prop";
> VetoableChangeListener vlistener = new VetoableChangeListener() {
> public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException {
> event = e;
> String propName = e.getPropertyName();
> if (propName.equals(vetoedPropName) && e.getNewValue().equals(new Integer(1))) {
> throw new PropertyVetoException(propName + " change is vetoed!", e);
> }
> }
>
> };
> public static void main(String[] args) {
> new VetoableChangeSupportTest().runTest();
> }
>
> void runTest(){
> vcs.addVetoableChangeListener(vlistener);
> try {
> vcs.fireVetoableChange(vetoedPropName, 0, 1);
> }
> catch (PropertyVetoException pve) {
>
> }
> System.out.println(event.getOldValue());
> System.out.println(event.getNewValue());
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira