Commit 8c32690a authored by Pete Gillin's avatar Pete Gillin
Browse files

Verify j.u.logging.LogManager against OpenJDK 8u121-b13.

There are two minor code changes in here:

1. The (Android-added) getClassInstance method, which implements the
   fallback from the system classloader to the context classloader, is
   simplified:
  a. If the call on the context classloader fails, it throws
     ClassNotFoundException instead of returning null. Every single
     caller assumed the return was non-null, so you'd have got a
     NullPointerException, and a ClassNotFoundException seems more
     useful. Also, this means that the behaviour is now identical to
     upstream's in the two of the six cases where upstream was already
     doing the fallback, and closer to upstream's in the other four.
  b. The null-check on its argument is removed. None of the callers
     will ever pass in null, and as noted above the behaviour of
     returning null is useless.

2. The changes in http://r.android.com/197098 are effectively
   reverted. That android-N-era change fixed some failing CTS
   tests. I'm unable to reproduce the failure with this change, so I
   think the patch is no longer needed.

Test: cts-tradefed run cts -m CtsLibcoreTestCases -t com.android.org.apache.harmony.logging.tests.java.util.logging
Bug: 35910877
Change-Id: I91d6d1924a0acac7192fcd5c7d533053a834a0a8
parent cdfe551d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment