krysalis-update/src/java/org/krysalis/depot/update/util/compare ComparatorSequence.java,1.1,1.2 ComparisonHelper.java,1.1,1.2

Nick Chalko <[email protected]> Wed, 08 Dec 2004 09:12:03 +0000
Newsgroups gmane.comp.krysalis.cvs
Message-ID <[email protected]>
Update of /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/util/compare
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26470/src/java/org/krysalis/depot/update/util/compare

Modified Files:
	ComparatorSequence.java ComparisonHelper.java 
Log Message:
format

Index: ComparatorSequence.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/util/compare/ComparatorSequence.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ComparatorSequence.java	8 Dec 2004 09:06:34 -0000	1.1
--- ComparatorSequence.java	8 Dec 2004 09:12:00 -0000	1.2
***************
*** 34,38 ****
  	/**
  	 * An empty sequence
! 	 *
  	 */
  	public ComparatorSequence() {
--- 34,38 ----
  	/**
  	 * An empty sequence
! 	 * 
  	 */
  	public ComparatorSequence() {
***************
*** 45,56 ****
  
  	/**
! 	 * Compare using sub comparators, in order, until
! 	 * a difference is found, or not.
  	 */
  	public int compare(Object o1, Object o2) {
  		int comparison = 0;
  
! 		for (Iterator i = iterator(); 
! 				i.hasNext() && (0 == comparison);) {
  			Comparator comparator = ((Comparator) i.next());
  
--- 45,55 ----
  
  	/**
! 	 * Compare using sub comparators, in order, until a difference is found, or
! 	 * not.
  	 */
  	public int compare(Object o1, Object o2) {
  		int comparison = 0;
  
! 		for (Iterator i = iterator(); i.hasNext() && (0 == comparison);) {
  			Comparator comparator = ((Comparator) i.next());
  

Index: ComparisonHelper.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/util/compare/ComparisonHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ComparisonHelper.java	8 Dec 2004 09:06:34 -0000	1.1
--- ComparisonHelper.java	8 Dec 2004 09:12:01 -0000	1.2
***************
*** 24,29 ****
  import java.util.TreeSet;
  
- import org.krysalis.depot.update.util.text.Messages;
  import org.krysalis.depot.common.log.Logger;
  
  /**
--- 24,29 ----
  import java.util.TreeSet;
  
  import org.krysalis.depot.common.log.Logger;
+ import org.krysalis.depot.update.util.text.Messages;
  
  /**
***************
*** 45,53 ****
  	}
  
! 	public static void sortUniqueInto(
! 		List choices,
! 		Comparator comparator,
! 		List sorted) {
! 			
  		// Inefficient, no doubt for many reasons, but so a :TODO:
  		TreeSet set = new TreeSet(comparator);
--- 45,51 ----
  	}
  
! 	public static void sortUniqueInto(List choices, Comparator comparator,
! 			List sorted) {
! 
  		// Inefficient, no doubt for many reasons, but so a :TODO:
  		TreeSet set = new TreeSet(comparator);
***************
*** 60,73 ****
  				else
  					Logger.getLogger().debug(
! 						Messages.getString(
! 							"DUPLICATE",
! 							new Object[] { comparator, choice }));
! 			}
! 			catch (Exception e) {
  				Logger.getLogger().error(
! 					Messages.getString(
! 						"COMPARATOR_CRASHED",
! 						new Object[] { comparator, e }),
! 					e);
  			}
  		}
--- 58,67 ----
  				else
  					Logger.getLogger().debug(
! 							Messages.getString("DUPLICATE", new Object[] {
! 									comparator, choice }));
! 			} catch (Exception e) {
  				Logger.getLogger().error(
! 						Messages.getString("COMPARATOR_CRASHED", new Object[] {
! 								comparator, e }), e);
  			}
  		}



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/