[15] RFR 8247964: All log0() in com/sun/org/slf4j/internal/Logger.java should be private

Weijun Wang weijun.wang at oracle.com
Sat Jun 20 14:47:14 UTC 2020


The 3 newly added log0() methods in com/sun/org/slf4j/internal/Logger.java are declared public. This is a stupid typo. In fact, in the comment at the beginning of that class [1] I specifically pointed out they are private.

Here is the patch. Noreg-trivial.

diff --git a/src/java.xml.crypto/share/classes/com/sun/org/slf4j/internal/Logger.java b/src/java.xml.crypto/share/classes/com/sun/org/slf4j/internal/Logger.java
--- a/src/java.xml.crypto/share/classes/com/sun/org/slf4j/internal/Logger.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/slf4j/internal/Logger.java
@@ -103,14 +103,14 @@
         }
     }
 
-    public void log0(Level level, String s, Throwable e) {
+    private void log0(Level level, String s, Throwable e) {
         if (impl.isLoggable(level)) {
             var sf = WALKER.walk(f -> f.skip(2).findFirst()).get();
             impl.logp(Level.FINE, sf.getClassName(), sf.getMethodName(), s, e);
         }
     }
 
-    public void log0(Level level, String s, Object... o) {
+    private void log0(Level level, String s, Object... o) {
         if (impl.isLoggable(level)) {
             var sf = WALKER.walk(f -> f.skip(2).findFirst()).get();
             impl.logp(Level.FINE, sf.getClassName(), sf.getMethodName(),


Thanks,
Max

[1] https://hg.openjdk.java.net/jdk/jdk15/rev/33b9328a9605#l2.21
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20200620/cbc19d95/attachment.htm>


More information about the security-dev mailing list