From b923ea847b3680d2118460d107397bc3260000e3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 1 Feb 2013 20:32:34 +1100 Subject: [PATCH] Don't infinite loop. --- .../net/md_5/bungee/api/plugin/PluginClassloader.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java index 0babad65..a4493bb9 100644 --- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java +++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java @@ -21,11 +21,14 @@ public class PluginClassloader extends URLClassLoader { for (PluginClassloader loader : allLoaders) { - try - { - return loader.loadClass(name); - } catch (ClassNotFoundException ex) + if (loader != this) { + try + { + return loader.loadClass(name); + } catch (ClassNotFoundException ex) + { + } } } throw new ClassNotFoundException();