changed List, BitSet constructor to perform a defensive copy into a
new List git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130632 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c55fe26ab9
commit
f247986918
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/comparators/ComparatorChain.java,v 1.2 2002/03/01 23:40:43 morgand Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/comparators/ComparatorChain.java,v 1.3 2002/03/01 23:48:59 morgand Exp $
|
||||||
* $Revision: 1.2 $
|
* $Revision: 1.3 $
|
||||||
* $Date: 2002/03/01 23:40:43 $
|
* $Date: 2002/03/01 23:48:59 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
|
@ -125,16 +125,14 @@ public class ComparatorChain implements Comparator,Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param list WARNING: If this list is not modifiable, some
|
* @param list NOTE: This constructor performs a defensive
|
||||||
* subsequent modifications
|
* copy of the list elements into a new
|
||||||
* to the ComparatorChain can fail. Also, if you intend
|
* List.
|
||||||
* to serialize
|
|
||||||
* this ComparatorChain, then this List must also
|
|
||||||
* be Serializable.
|
|
||||||
* @param bits
|
* @param bits
|
||||||
*/
|
*/
|
||||||
public ComparatorChain(List list, BitSet bits) {
|
public ComparatorChain(List list, BitSet bits) {
|
||||||
comparatorChain = list;
|
comparatorChain = new ArrayList();
|
||||||
|
comparatorChain.addAll(list);
|
||||||
orderingBits = bits;
|
orderingBits = bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue