Minor patch to handle dynamic filters for 1.2.7

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Minor patch to handle dynamic filters for 1.2.7

We use jcifs to authenticate our web service requests and our client code works a little differently from the examples.
The examples have you set system properties:
But we don't like messing with the properties inside our application server (which is where the client code is) in case another app needs to use jcifs differently. So we use the following:
            url = new URL(null,u,new jcifs.http.Handler());
where u is the url string and always includes the username and password (eg user:password@host)

But this breaks jcifs with NullPointerException at NtlmHttpURLConnection.java:112 unless we install a dummy filter (which we don't).
I changed line 112 to this:
                StringTokenizer tokenizer = new StringTokenizer((path==null)?"":path, "|");
and it works just fine now.

Alternately you could just install a dummy filter which will make the NullPointerException go away.


Roger Parkinson
+64 21 508 792