Re: Barracuda still doesn't compile on JDK 1.3.1
"Diez B. Roggisch" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, I just created a patch that makes barracuda compile with 1.3.1. It covers two subjects: HttpRequester: It looks like the 1.4 api introduces some convenience methods, but reproducing the same results is possible for 1.3. HttpServices: The ParseException now misses the initCause - well, whilst this surely eases debugging, I don't consider it a major drawback if we lose this feature. I havn't had the time to test it - I would love to get some feedback on this by somebody actually using cookies (I never use them). Maybe Shawn can test it, as he had the need for making the changes and can check if the patch breaks his app? Now that I can compile, I hope I find the time to move some of my contrib classes to core. Diez
jdk1.3.patch
(text/x-diff, 1.7 KB)
Index: org/enhydra/barracuda/plankton/http/HttpRequester.java
===================================================================
RCS file: /u/cvs/Projects/EnhydraOrg/toolsTech/Barracuda/src/org/enhydra/barracuda/plankton/http/HttpRequester.java,v
retrieving revision 1.2
diff -r1.2 HttpRequester.java
496c496,505
< List scookies = (List) conn.getHeaderFields().get("Set-Cookie");
---
>
> // dbr_032601.start
> //List scookies = (List) conn.getHeaderFields().get("Set-Cookie");
> List scookies = new ArrayList();
> for(int i = 0; conn.getHeaderFieldKey(i) != null; i++) {
> if("Set-Cookie".equals(conn.getHeaderFieldKey(i))) {
> scookies.add(conn.getHeaderField(i));
> }
> }
> // dbr_032601.end
661c670
< }
\ No newline at end of file
---
> }
Index: org/enhydra/barracuda/plankton/http/HttpServices.java
===================================================================
RCS file: /u/cvs/Projects/EnhydraOrg/toolsTech/Barracuda/src/org/enhydra/barracuda/plankton/http/HttpServices.java,v
retrieving revision 1.2
diff -r1.2 HttpServices.java
88c88,90
< ee.initCause(e);
---
> // dbr_032601
> // The 1.3 api doesn't support this
> // ee.initCause(e);
97c99,101
< ee.initCause(e);
---
> // dbr_032601
> // The 1.3 api doesn't support this
> // ee.initCause(e);
105c109,111
< ee.initCause(e);
---
> // dbr_032601
> // The 1.3 api doesn't support this
> // ee.initCause(e);