From 29deefe70a2dbdab405b72f644cc74bc5b613014 Mon Sep 17 00:00:00 2001 From: Nils Christian Ehmke <nie@informatik.uni-kiel.de> Date: Mon, 11 Jun 2012 14:37:06 +0200 Subject: [PATCH] Solved some minor bugs. --- .../java/kieker/webgui/beans/application/ProjectsBean.java | 4 ++-- .../src/main/java/kieker/webgui/common/ACManager.java | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java index 83635e34..66a9ea28 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java @@ -159,10 +159,10 @@ public final class ProjectsBean { /** * This method delivers all available projects as a list of string. * - * @return All currently available projects. The list can not be modified. + * @return All currently available projects. Do not modify this list with add, remove etc. (It still has to be sortable for Primefaces though) */ public List<String> getProjects() { - return Collections.unmodifiableList(this.projects); + return this.projects; } /** diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java index 9843b0e5..084a6a84 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java @@ -360,6 +360,7 @@ public final class ACManager { this.displayObjects.put(view.getName(), viewMap); for (final MIDisplay display : view.getDisplays()) { final Method displayMethod = UpdateDisplaysThread.getDisplayMethod(this.myPluginMap.get(display.getParent()).getClass(), display.getName()); + // Make sure that the method really exists and that is has the correct parameters if ((displayMethod != null) && (displayMethod.getParameterTypes().length == 1)) { final Class<?> parameterType = displayMethod.getParameterTypes()[0]; @@ -380,6 +381,7 @@ public final class ACManager { } if (displayObject != null) { viewMap.put(display.getName(), displayObject); + this.methodMap.put(displayObject, displayMethod); } } } @@ -445,6 +447,8 @@ public final class ACManager { ACManager.LOG.error("An error occured while updating the display.", ex); } catch (final InvocationTargetException ex) { ACManager.LOG.error("An error occured while updating the display.", ex); + } catch (final NullPointerException ex) { + ACManager.LOG.error("An error occured while updating the display.", ex); } } } -- GitLab