aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2012-12-03 18:08:38 +0100
committerJiri Vanek <[email protected]>2012-12-03 18:08:38 +0100
commit7aff0a246448bef22d89859b07fef92c128e14e5 (patch)
treee37515083680cbdde1dc32a6d41b972cefdc4e6d /tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
parent5c844362f517ee6704ff66d96c24c4f82b45374c (diff)
Fixed logging bottleneck
Xml logging is now filtering not-unicode characters. Logging have more propper test-method recognition
Diffstat (limited to 'tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java')
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java25
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
index c0dd525..12fde78 100644
--- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
+++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
@@ -783,8 +783,27 @@ public class ServerAccess {
//probablky it is necessary to get out of net.sourceforge.jnlp.
//package where are right now all test-extensions
//for now keeping exactly the three clases helping yo acces the log
- if (!stack[i].getClassName().startsWith("net.sourceforge.jnlp.")) {
- break;
+ try {
+ Class clazz = Class.forName(stack[i].getClassName());
+ String path = null;
+ try {
+ path = clazz.getProtectionDomain().getCodeSource().getLocation().getPath();
+ } catch (NullPointerException ex) {
+ //silently ignoring and continuing with null path
+ }
+ if (path != null && path.contains("/tests.build/")) {
+ if (!path.contains("/test-extensions/")) {
+ break;
+ }
+ } else {
+ //running from ide
+ if (!stack[i].getClassName().startsWith("net.sourceforge.jnlp.")) {
+ break;
+ }
+ }
+ } catch (ClassNotFoundException ex) {
+ ///should not happen, searching only for already loaded class
+ ex.printStackTrace();
}
}
//if nothing left in stack then we have been in ServerAccess already
@@ -793,7 +812,7 @@ public class ServerAccess {
if (i >= stack.length) {
return result;
}
- //now we are out of net.sourceforge.jnlp.*
+ //now we are out of test-extensions
//method we need (the test) is highest from following class
baseClass = stack[i].getClassName();
for (; i < stack.length; i++) {