Skip to content

Commit

Permalink
Remove copies of ThreadContextClassLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Sep 24, 2014
1 parent 2941344 commit 70662e2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.facebook.presto.spi.ConnectorSplitSource;
import com.facebook.presto.spi.HostAddress;
import com.facebook.presto.spi.PrestoException;
import com.facebook.presto.spi.classloader.ThreadContextClassLoader;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Optional;
import com.google.common.base.Throwables;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.facebook.presto.spi.Plugin;
import com.facebook.presto.spi.SystemTable;
import com.facebook.presto.spi.block.BlockEncodingFactory;
import com.facebook.presto.spi.classloader.ThreadContextClassLoader;
import com.facebook.presto.spi.type.Type;
import com.facebook.presto.type.TypeRegistry;
import com.google.common.base.Function;
Expand Down Expand Up @@ -152,13 +153,12 @@ public void loadPlugins()
pluginsLoaded.set(true);
}

@SuppressWarnings("UnusedDeclaration")
private void loadPlugin(String plugin)
throws Exception
{
log.info("-- Loading plugin %s --", plugin);
URLClassLoader pluginClassLoader = buildClassLoader(plugin);
try (ThreadContextClassLoader threadContextClassLoader = new ThreadContextClassLoader(pluginClassLoader)) {
try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(pluginClassLoader)) {
loadPlugin(pluginClassLoader);
}
log.info("-- Finished loading plugin %s --", plugin);
Expand Down

This file was deleted.

0 comments on commit 70662e2

Please sign in to comment.