From 8b2a2c3db5efb6b309655601604c0822d42910ca Mon Sep 17 00:00:00 2001 From: tkellner Date: Thu, 27 Sep 2012 14:46:21 +0000 Subject: Show correct calling method for checkPermissions git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1138 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../main/java/at/gv/egiz/bku/online/applet/BKUApplet.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'BKUApplet/src/main/java/at') diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java index d274e048..cf2fba35 100644 --- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java @@ -378,7 +378,17 @@ private boolean checkPermissions() { return true; } catch (Exception e) { if (log.isDebugEnabled()) - log.debug("Not enough permissions for " + e.getStackTrace()[1].getMethodName()); + { + StackTraceElement[] st = e.getStackTrace(); + String method = "unknown"; + for (int i = 0; i < st.length; i++) { + if (st[i].getClassName().equals(this.getClass().getName())) { + method = st[i+1].getMethodName(); + break; + } + } + log.debug("Not enough permissions for " + method, e); + } } return false; } -- cgit v1.2.3