ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meta...@apache.org
Subject cvs commit: jakarta-ant/src/antidote/org/apache/tools/ant/gui/command SaveAsCmd.java
Date Thu, 11 Jan 2001 19:22:27 GMT
metasim     01/01/11 11:22:27

  Modified:    src/antidote/org/apache/tools/ant/gui/command SaveAsCmd.java
  Log:
  Fixed bug where location wasn't getting set.
  
  Revision  Changes    Path
  1.7       +13 -12    jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/SaveAsCmd.java
  
  Index: SaveAsCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/SaveAsCmd.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SaveAsCmd.java	2001/01/08 19:43:23	1.6
  +++ SaveAsCmd.java	2001/01/11 19:22:24	1.7
  @@ -67,7 +67,7 @@
   /**
    * Command for doing a "Save as" type of save.
    * 
  - * @version $Revision: 1.6 $ 
  + * @version $Revision: 1.7 $ 
    * @author Simeon Fitch 
    */
   public class SaveAsCmd extends AbstractCommand {
  @@ -135,18 +135,19 @@
                               getContext().getParentFrame(), message, title, 
                               JOptionPane.YES_NO_OPTION);
                           // If cancelled unset file.
  -                        if(val == JOptionPane.YES_OPTION) {
  -                            try {
  -                                _location = new URL(
  -                                    "file", null, file.getAbsolutePath());
  -                            }
  -                            catch(MalformedURLException ex) {
  -                                // Shouldn't happen. Save will just not
  -                                // happen.
  -                                ex.printStackTrace();
  -                            }
  +                        if(val != JOptionPane.YES_OPTION) {
  +                            return;
                           }
                       }
  +                    try {
  +                        _location = new URL(
  +                            "file", null, file.getAbsolutePath());
  +                    }
  +                    catch(MalformedURLException ex) {
  +                        // Shouldn't happen. Save will just not
  +                        // happen.
  +                        ex.printStackTrace();
  +                    }
                   }
               }
               
  @@ -162,7 +163,7 @@
                           new Object[] { _location.toString() });
                       
                       getContext().getEventBus().
  -                        postEvent(new ErrorEvent(getContext(), message));
  +                        postEvent(new ErrorEvent(getContext(), message, ex));
                   }
               }
           }
  
  
  

Mime
View raw message