diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-07-24 09:48:02 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-07-24 09:48:02 +0200 |
commit | 9f63824c2ad9730c2ce820d08767594d2fb74aa5 (patch) | |
tree | ad7e90ada1e7eb59b66c86b76e2594823f571d95 | |
parent | de8d9bfdbc850bf4af94b5d636936331317de609 (diff) | |
download | sonarqube-9f63824c2ad9730c2ce820d08767594d2fb74aa5.tar.gz sonarqube-9f63824c2ad9730c2ce820d08767594d2fb74aa5.zip |
Add some comments
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/plugins/PluginClassloaders.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/plugins/PluginClassloaders.java b/sonar-core/src/main/java/org/sonar/core/plugins/PluginClassloaders.java index 2b2c27600be..a53effc5c34 100644 --- a/sonar-core/src/main/java/org/sonar/core/plugins/PluginClassloaders.java +++ b/sonar-core/src/main/java/org/sonar/core/plugins/PluginClassloaders.java @@ -123,6 +123,10 @@ public class PluginClassloaders { } return realm; } catch (Throwable e) { + // SONAR-3688 + // Throwable is explicitely caught instead of Exception in order to log the plugins + // that are compiled for Java > 5. In such case java.lang.UnsupportedClassVersionError + // is raised. throw new SonarException("Fail to build the classloader of " + plugin.getKey(), e); } } @@ -144,6 +148,10 @@ public class PluginClassloaders { } return true; } catch (Throwable e) { + // SONAR-3688 + // Throwable is explicitely caught instead of Exception in order to log the plugins + // that are compiled for Java > 5. In such case java.lang.UnsupportedClassVersionError + // is raised. throw new SonarException("Fail to extend the plugin " + plugin.getBasePlugin() + " for " + plugin.getKey(), e); } } @@ -208,8 +216,10 @@ public class PluginClassloaders { return (Plugin) claz.newInstance(); } catch (Throwable e) { - // Do not catch only Exception in order to detect the plugins compiled for Java > 5 - // (it raises a java.lang.UnsupportedClassVersionError) + // SONAR-3688 + // Throwable is explicitely caught instead of Exception in order to log the plugins + // that are compiled for Java > 5. In such case java.lang.UnsupportedClassVersionError + // is raised. throw new SonarException("Fail to load plugin " + metadata.getKey(), e); } } |