Author: aadamchik
Date: Sun Jun  5 14:51:06 2011
New Revision: 1132431

URL: http://svn.apache.org/viewvc?rev=1132431&view=rev
Log:
CAY-1561 Modeler trivial bug

patch by rkvashchanka (adapting for 3.0)

Modified:
    
cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
    
cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java

Modified: 
cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1132431&r1=1132430&r2=1132431&view=diff
==============================================================================
--- 
cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt 
(original)
+++ 
cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt 
Sun Jun  5 14:51:06 2011
@@ -33,6 +33,7 @@ CAY-1505 Callbacks: POST_UPDATE is calle
 CAY-1506 Reserverd words mapping in WHERE clause
 CAY-1518 cgen: duplicate callback methods
 CAY-1557 Vertical inheritance is broken for subclasses with more than one 
flattened attribute
+CAY-1561 Modeler trivial bug NullPointerException on remove
 CAY-1567 BaseQueryMetadata.setPrefetches() causes a shared lock
 CAY-1578 unicode character types on MS SQL 2008 server aren't recognized.
 

Modified: 
cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java
URL: 
http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java?rev=1132431&r1=1132430&r2=1132431&view=diff
==============================================================================
--- 
cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java
 (original)
+++ 
cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/ConfirmRemoveDialog.java
 Sun Jun  5 14:51:06 2011
@@ -54,9 +54,9 @@ public class ConfirmRemoveDialog {
         dialog.setVisible(true);
 
         Object selectedValue = pane.getValue();
-        shouldDelete = selectedValue.equals(JOptionPane.YES_OPTION);
+               shouldDelete = 
selectedValue==null?false:selectedValue.equals(JOptionPane.YES_OPTION);
 
-        // If the user clicks "no", we'll just ignore whatever's in the 
checkbox because it's non-sensical.
+        // If the user clicks "no" or window close button, we'll just ignore 
whatever's in the checkbox because it's non-sensical.
         if (shouldDelete) {
             PreferenceDetail pref = 
Application.getInstance().getPreferenceDomain().getDetail(GeneralPreferences.DELETE_PROMPT_PREFERENCE,
 true);
             
pref.setBooleanProperty(GeneralPreferences.DELETE_PROMPT_PREFERENCE, 
neverPromptAgainBox.isSelected());


Reply via email to