From: <mwl...@us...> - 2008-05-08 17:53:14
|
Revision: 776 http://cishell.svn.sourceforge.net/cishell/?rev=776&view=rev Author: mwlinnem Date: 2008-05-08 10:51:48 -0700 (Thu, 08 May 2008) Log Message: ----------- Added handling for null labels. Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/Save.java trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/SaveDataChooser.java Modified: trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/Save.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/Save.java 2008-04-23 18:08:19 UTC (rev 775) +++ trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/Save.java 2008-05-08 17:51:48 UTC (rev 776) @@ -79,7 +79,7 @@ } else { //result instanceof Exception Exception reasonForFailure = (Exception) firstAttemptResult; this.log.log(LogService.LOG_WARNING, "Exception occurred while attempting to save" + - " file using a validator. Attempting to save without validating."); + " file using a validator. Attempting to save without validating.", reasonForFailure); System.out.println("Exception"); } Modified: trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/SaveDataChooser.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/SaveDataChooser.java 2008-04-23 18:08:19 UTC (rev 775) +++ trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/SaveDataChooser.java 2008-05-08 17:51:48 UTC (rev 776) @@ -374,7 +374,18 @@ Converter c2 = (Converter) o2; String c2Label = getLabel(c2); - return c1Label.compareTo(c2Label); + if (c1Label != null && c2Label != null) { + return c1Label.compareTo(c2Label); + } else if (c1Label == null) { + //c1 > c2 + return 1; + } else if (c2Label == null) { + //c1 < c2 + return -1; + } else { + //c1 == c2 + return 0; + } } else { throw new IllegalArgumentException("Can only " + "compare Converters"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |