Changeset 1430


Ignore:
Timestamp:
09/06/06 17:13:35 (14 years ago)
Author:
curtis
Message:

Fix NullPointerException when no arguments are given.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/notebook/MetadataNotebook.java

    r1419 r1430  
    128128 
    129129    //create a MetadataPane, where most everything happen 
    130     if (args != null) { 
    131       if(args.length > 0) { 
    132         File file = null; 
    133         try { 
    134           file = new File(args[0]); 
    135         } 
    136         catch (Exception exc) { 
    137           System.out.println("Error occured: You suck."); 
    138         } 
    139         currentFile = file; 
    140         metadata = new MetadataPane(file, addSave, editable); 
    141         setTitle("OME Metadata Notebook - " + file); 
    142       } 
    143     } 
    144     else metadata = new MetadataPane((File)null, addSave, editable); 
     130    if (args != null && args.length > 0) { 
     131      File file = null; 
     132      try { 
     133        file = new File(args[0]); 
     134      } 
     135      catch (Exception exc) { 
     136        System.out.println("Error occured: You suck."); 
     137      } 
     138      currentFile = file; 
     139      metadata = new MetadataPane(file, addSave, editable); 
     140      setTitle("OME Metadata Notebook - " + file); 
     141    } 
     142    else metadata = new MetadataPane((File) null, addSave, editable); 
    145143 
    146144    metadata.setVisible(true); 
Note: See TracChangeset for help on using the changeset viewer.