File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
modules/org.restlet/src/org/restlet/util Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ Changes log
1616 Reported and contributed by Colin Puy.
1717 - Fixed computation of the agent name in case Safari browser. Issue #1238.
1818 Reported by Abhishek Nandi.
19+ - Fixed potential dead lock when compating two instances of WrapperList. Issue #1243.
20+ Contributed by Tim Peierls.
1921 - Enhancements
2022 - Added overload to OAuthParameters.toReference which accepts an existing Reference.
2123 Contributed by Ryan O'Meara.
Original file line number Diff line number Diff line change 2424
2525package org .restlet .util ;
2626
27+ import java .util .Arrays ;
2728import java .util .Collection ;
2829import java .util .Iterator ;
2930import java .util .List ;
3233
3334/**
3435 * List wrapper. Modifiable list that delegates all methods to a wrapped list.
35- * This allows an easy sub-classing. By default, it wraps a thread-safe
36- * {@link Vector} instance.
36+ * This allows an easy sub-classing. By default, it wraps a thread-safe {@link Vector} instance.
3737 *
3838 * @author Jerome Louvel
39- * @see <a href="http://c2.com/cgi/wiki?DecoratorPattern">The decorator (aka
40- * wrapper) pattern</a>
39+ * @see <a href="http://c2.com/cgi/wiki?DecoratorPattern">The decorator (aka wrapper) pattern</a>
4140 * @see java.util.Collections
4241 * @see java.util.List
4342 */
@@ -157,7 +156,16 @@ public boolean containsAll(Collection<?> elements) {
157156 */
158157 @ Override
159158 public boolean equals (Object o ) {
160- return getDelegate ().equals (o );
159+ if (this == o ) {
160+ return true ;
161+ }
162+
163+ if (o instanceof List ) {
164+ List <?> that = (List <?>) o ;
165+ return Arrays .equals (this .toArray (), that .toArray ());
166+ }
167+
168+ return false ;
161169 }
162170
163171 /**
You can’t perform that action at this time.
0 commit comments