commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject [httpclient] New change to Cookie.java breaks Cactus
Date Sat, 16 Feb 2002 23:54:16 GMT
It seems a change brought on the 14/02/2002 to Cookie.java is breaking
the Cactus tests, as reported by GUMP :

     [java]     [junit] Testcase: testSendMultipleCookies took 0.025 sec
     [java]     [junit] 	Caused an ERROR
     [java]     [junit] null
     [java]     [junit] java.lang.NullPointerException
     [java]     [junit] 	at
org.apache.commons.httpclient.Cookie.compare(Cookie.java:513)
     [java]     [junit] 	at
java.util.TreeMap.compare(TreeMap.java:1047)
     [java]     [junit] 	at
java.util.TreeMap.put(TreeMap.java:449)
     [java]     [junit] 	at
java.util.TreeSet.add(TreeSet.java:198)
     [java]     [junit] 	at
org.apache.commons.httpclient.Cookie.createCookieHeader(Cookie.java:477)
     [java]     [junit] 	at
org.apache.commons.httpclient.Cookie.createCookieHeader(Cookie.java:456)
     [java]     [junit] 	at
org.apache.commons.httpclient.Cookie.createCookieHeader(Cookie.java:444)
     [java]     [junit] 	at
org.apache.commons.httpclient.Cookie.createCookieHeader(Cookie.java:421)
     [java]     [junit] 	at
org.apache.cactus.client.HttpClientHelper.addCookies(HttpClientHelper.ja
va;org/apache/cactus/util/log/LogAspect.java(1k):377)

My analysis is that the previous Cookie class was more lenient WRT the
cookie domain (i.e. it could be "null"). However it seems the new
Cookie.compare() method throws a NPE if it is null.

Questions :
1/ Is this done voluntarily (i.e. force the user to always specify a
domain) ?
2/ Is HttpClient going to preserve a backward compatibility or should I
change the Cactus code ?

Thanks
-Vincent



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message