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

Xuelei Fan xuelei.fan at oracle.com
Sat Jun 20 16:04:33 UTC 2020


Looks good to me.

Xuelei

On 6/20/2020 7:47 AM, Weijun Wang wrote:
> 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



More information about the security-dev mailing list