diff options
author | dmocek <none@none> | 2013-02-05 16:38:25 -0800 |
---|---|---|
committer | dmocek <none@none> | 2013-02-05 16:38:25 -0800 |
commit | eb42d49efda154a538aebb05d6c02ecbaade1e91 (patch) | |
tree | 0e66372e3c693e47d3d4b7cc165efbd4a42bcb3f | |
parent | 9d7f33e666626fa5c2824c86a15a4549ed1afe18 (diff) | |
download | jdk8u_jdk-eb42d49efda154a538aebb05d6c02ecbaade1e91.tar.gz |
8001329: Augment RMI logging
Reviewed-by: smarks, hawtin, alanb
-rw-r--r-- | src/share/classes/java/rmi/server/LogStream.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/share/classes/java/rmi/server/LogStream.java b/src/share/classes/java/rmi/server/LogStream.java index 625e841ce8..60adea3d96 100644 --- a/src/share/classes/java/rmi/server/LogStream.java +++ b/src/share/classes/java/rmi/server/LogStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -120,6 +120,13 @@ public class LogStream extends PrintStream { */ @Deprecated public static synchronized void setDefaultStream(PrintStream newDefault) { + SecurityManager sm = System.getSecurityManager(); + + if (sm != null) { + sm.checkPermission( + new java.util.logging.LoggingPermission("control", null)); + } + defaultStream = newDefault; } |