diff options
author | Sven Gothel <[email protected]> | 2012-03-28 18:54:01 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-03-28 18:54:01 +0200 |
commit | e782618a7c86093a47befe4e35957d1d3d3ee645 (patch) | |
tree | 0352d14b37aa93a8e8f5dbe073f7aea76b30c504 /src/junit/com/jogamp | |
parent | 0f486e656651c193fdad6baba4fcdffbebb1526e (diff) |
Dump Envs: Suppress COOKIE, SSH and GPG env vars
Diffstat (limited to 'src/junit/com/jogamp')
-rw-r--r-- | src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java b/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java index d9afe1d..b182a6f 100644 --- a/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java +++ b/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java @@ -52,15 +52,30 @@ public class TestSystemPropsAndEnvs extends JunitTracer { System.out.println("Property count: "+i); } + private static String[] suppress_envs = new String[] { "COOKIE", "SSH", "GPG" }; + + private static boolean contains(String data, String[] search) { + if(null != data && null != search) { + for(int i=0; i<search.length; i++) { + if(data.indexOf(search[i]) >= 0) { + return true; + } + } + } + return false; + } + @Test public void dumpEnvironment() { int i=0; Map<String, String> env = System.getenv(); for (String envName : env.keySet()) { - i++; - System.out.format("%4d: %s = %s%n", - i, envName, - env.get(envName)); + if(!contains(envName, suppress_envs)) { + i++; + System.out.format("%4d: %s = %s%n", + i, envName, + env.get(envName)); + } } System.out.println("Environment count: "+i); } |