commit | 6a88c2fcb8c0f66d9c077a7aedd907c0b49caecf | [log] [tgz] |
---|---|---|
author | Dave Borowitz <dborowitz@google.com> | Mon Feb 24 11:12:26 2014 -0800 |
committer | Dave Borowitz <dborowitz@google.com> | Mon Feb 24 11:12:26 2014 -0800 |
tree | fa99397d7b9a306a7aa922af36c341cde1bca958 | |
parent | 21e277760e472a3043d0059ecb9a172eb1a01310 [diff] |
Don't always close URLClassLoaders The documentation[1] says: "Closes this URLClassLoader, so that it can no longer be used to load new classes or resources that are defined by this loader." This was incorrectly converted to try-with-resources in [2]. The purpose of this method is to add URLs to the existing ClassLoader so they can be used in the future, so closing it immediately is counterproductive, and indeed was causing NoClassDefFoundErrors when trying to start Gerrit. [1] http://docs.oracle.com/javase/7/docs/api/java/net/URLClassLoader.html#close() [2] Iead344269bc0b985b2cd2176f15a764e6a0abb70 Change-Id: I322b665a164e1783ca872ba7dcafdc9ad09e139a