[8u] RFR 8225425: java.lang.UnsatisfiedLinkError: net.dll: Can't find dependent libraries

Aleksey Shipilev shade at redhat.com
Mon Sep 16 11:40:12 UTC 2019


On 9/12/19 4:55 AM, Andrew John Hughes wrote:
> On 10/09/2019 19:47, Aleksey Shipilev wrote:
>>  *) test/lib/jdk/test/lib/net/URIBuilder.java put into location that fits 8u.
> 
> The right location would seem to be
> jdk/test/lib/testlibrary/jdk/testlibrary/net as
> jdk/test/lib/testlibrary/jdk/testlibrary/ houses JDKToolLauncher.java,
> which is in test/lib/jdk/test/lib/ in trunk.

Right. testlibrary is a mess. Moved to:
test/lib/testlibrary/jdk/testlibrary/net/URIBuilder.java

> Why is this being backported as part of this and not a backport of
> https://bugs.openjdk.java.net/browse/JDK-8220575 which would also mean
> we get the advantages of introducing this helper class in other tests?

Because this is a critical bugfix, and we don't want to pull in more that necessary. It also matches
what was done in 11u.

>>  Read the InputStream without readAllBytes method (added in 9):
>>   85             InputStream is = uc.getInputStream();
>>   86             byte[] buf = new byte[1024];
>>   87             while (is.read(buf) != -1) {};
> 
> This conversion loses the output of the read data. Something closer to
> the original would be along the lines of:
> 
> InputStream is = uc.getInputStream();
> BufferedReader r = new BufferedReader(new InputStreamReader(is, UTF_8);
> String body = r.readLine();
> out.print("received body: " + body);
> while (body != null) { body = r.readLine(); out.print(body); }

Well, this part of the test is not critical, and its job is to drain the InputStream first and
foremost. But okay, we can also print it. The code above would print "null" at the end, though, so
we need to make a proper post-condition loop. See new patch:

    InputStream is = uc.getInputStream();
    BufferedReader r = new BufferedReader(new InputStreamReader(is, UTF_8));
    String body = r.readLine();
    out.print("received body: ");
    do {
        out.print(body);
        body = r.readLine();
    } while (body != null);

Updated 8u webrev:
  https://cr.openjdk.java.net/~shade/8225425/webrev.8u.02/

Still passes new test. Haven't retested anything else, because all changes were related to test code
only.

-- 
Thanks,
-Aleksey



More information about the jdk8u-dev mailing list