Skip to content
Snippets Groups Projects
Commit 5b7d847c authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Corrected some code

parent 12577e63
No related branches found
No related tags found
No related merge requests found
......@@ -92,10 +92,17 @@ public final class ClassAndMethodContainer {
this.repositoryPortNameMethod = this.repositoryPortAnnotationClass.getMethod("name", new Class<?>[0]);
this.propertyNameMethod = this.propertyAnnotationClass.getMethod("name", new Class<?>[0]);
this.propertyDefaultValueMethod = this.propertyAnnotationClass.getMethod("defaultValue", new Class<?>[0]);
} catch (final ReflectiveOperationException ex) {
} catch (final ClassNotFoundException ex) {
ClassAndMethodContainer.LOG.error("An error occured while loading the classes and methods.", ex);
throw new ProjectLoadException();
} catch (final NoSuchMethodException ex) {
ClassAndMethodContainer.LOG.error("An error occured while loading the classes and methods.", ex);
throw new ProjectLoadException();
} catch (final SecurityException ex) {
ClassAndMethodContainer.LOG.error("An error occured while loading the classes and methods.", ex);
throw new ProjectLoadException();
}
}
public Class<?> getAbstractFilterPluginClass() {
......
......@@ -22,6 +22,7 @@ package kieker.webgui.beans.view;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.net.MalformedURLException;
......@@ -399,7 +400,13 @@ public final class CurrentAnalysisEditorBean {
} else {
return (String) this.classAndMethodContainer.getPluginDescriptionMethod().invoke(annotationPlugin, new Object[0]);
}
} catch (final ReflectiveOperationException ex) {
} catch (final IllegalAccessException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
return "No description available";
} catch (final IllegalArgumentException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
return "No description available";
} catch (final InvocationTargetException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
return "No description available";
}
......@@ -431,7 +438,11 @@ public final class CurrentAnalysisEditorBean {
result.add(property);
}
} catch (final ReflectiveOperationException ex) {
} catch (final IllegalAccessException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
} catch (final IllegalArgumentException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
} catch (final InvocationTargetException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
}
return result;
......@@ -480,7 +491,11 @@ public final class CurrentAnalysisEditorBean {
}
}
} catch (final ReflectiveOperationException ex) {
} catch (final IllegalAccessException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
} catch (final IllegalArgumentException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
} catch (final InvocationTargetException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
}
return result;
......@@ -505,7 +520,11 @@ public final class CurrentAnalysisEditorBean {
result.add(rPort);
}
}
} catch (final ReflectiveOperationException ex) {
} catch (final IllegalAccessException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
} catch (final IllegalArgumentException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
} catch (final InvocationTargetException ex) {
CurrentAnalysisEditorBean.LOG.warn("Could not invoke method", ex);
}
return result;
......@@ -644,7 +663,7 @@ public final class CurrentAnalysisEditorBean {
}
return true;
} catch (final ReflectiveOperationException ex) {
} catch (final IllegalAccessException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the displays of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while loading the displays of the plugin.");
return false;
......@@ -652,6 +671,14 @@ public final class CurrentAnalysisEditorBean {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the displays of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while loading the displays of the plugin.");
return false;
} catch (final IllegalArgumentException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the displays of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while loading the displays of the plugin.");
return false;
} catch (final InvocationTargetException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the displays of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while loading the displays of the plugin.");
return false;
}
}
}
......@@ -699,7 +726,7 @@ public final class CurrentAnalysisEditorBean {
return true;
} catch (final ReflectiveOperationException ex) {
} catch (final IllegalAccessException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the ports of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the ports of the plugin.");
return false;
......@@ -707,6 +734,14 @@ public final class CurrentAnalysisEditorBean {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the ports of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the ports of the plugin.");
return false;
} catch (final IllegalArgumentException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the ports of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the ports of the plugin.");
return false;
} catch (final InvocationTargetException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the ports of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the ports of the plugin.");
return false;
}
}
}
......@@ -736,7 +771,7 @@ public final class CurrentAnalysisEditorBean {
}
return true;
} catch (final ReflectiveOperationException ex) {
} catch (final IllegalAccessException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the properties of the repository.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the properties of the repository.");
return false;
......@@ -744,6 +779,14 @@ public final class CurrentAnalysisEditorBean {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the properties of the repository.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the properties of the repository.");
return false;
} catch (final IllegalArgumentException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the properties of the repository.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the properties of the repository.");
return false;
} catch (final InvocationTargetException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the properties of the repository.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the properties of the repository.");
return false;
}
}
......@@ -772,7 +815,7 @@ public final class CurrentAnalysisEditorBean {
}
return true;
} catch (final ReflectiveOperationException ex) {
} catch (final IllegalAccessException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the properties of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the properties of the plugin.");
return false;
......@@ -780,6 +823,14 @@ public final class CurrentAnalysisEditorBean {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the properties of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the properties of the plugin.");
return false;
} catch (final IllegalArgumentException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the properties of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the properties of the plugin.");
return false;
} catch (final InvocationTargetException ex) {
CurrentAnalysisEditorBean.LOG.error("An error occured while loading the properties of the plugin.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An errcor occured while loading the properties of the plugin.");
return false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment