12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.security.util;
27
28 import java.math.BigInteger;
29 import java.util.regex.Pattern;
30 import java.util.regex.Matcher;
31 import java.util.Locale;
32
33 /**
34 * A utility class for debuging.
35 *
36 * @author Roland Schemers
37 */
38 public class Debug {
39
40 private String prefix;
41
42 private static String args;
43
44 static {
45 args = java.security.AccessController.doPrivileged
46 (new sun.security.action.GetPropertyAction
47 ("java.security.debug"));
48
49 String args2 = java.security.AccessController.doPrivileged
50 (new sun.security.action.GetPropertyAction
51 ("java.security.auth.debug"));
52
53 if (args == null) {
54 args = args2;
55 } else {
56 if (args2 != null)
57 args = args + "," + args2;
58 }
59
60 if (args != null) {
61 args = marshal(args);
62 if (args.equals("help")) {
63 Help();
64 }
65 }
66 }
67
68 public static void Help()
69 {
70 System.err.println();
71 System.err.println("all turn on all debugging");
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.security.util;
27
28 import java.math.BigInteger;
29 import java.util.regex.Pattern;
30 import java.util.regex.Matcher;
31 import java.util.Locale;
32 import sun.security.action.GetPropertyAction;
33
34 /**
35 * A utility class for debuging.
36 *
37 * @author Roland Schemers
38 */
39 public class Debug {
40
41 private String prefix;
42
43 private static String args;
44
45 static {
46 args = GetPropertyAction.getProperty("java.security.debug");
47
48 String args2 =
49 GetPropertyAction.getProperty("java.security.auth.debug");
50
51 if (args == null) {
52 args = args2;
53 } else {
54 if (args2 != null)
55 args = args + "," + args2;
56 }
57
58 if (args != null) {
59 args = marshal(args);
60 if (args.equals("help")) {
61 Help();
62 }
63 }
64 }
65
66 public static void Help()
67 {
68 System.err.println();
69 System.err.println("all turn on all debugging");
|