Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/319#discussion_r153822758
  
    --- Diff: 
jena-text/src/main/java/org/apache/jena/query/text/TextIndexLucene.java ---
    @@ -204,7 +204,10 @@ public void close() {
     
         @Override public void updateEntity(Entity entity) {
             if ( log.isDebugEnabled() )
    -            log.debug("Update entity: " + entity) ;
    +            if (log.isTraceEnabled() && entity != null)
    --- End diff --
    
    Better than checking `log.isDebugEnabled()` is to use the idiom 
`log.debug("Update entity: {}", entity))`, same with other log statements that 
have guards and are calling `toString` implicitly. Using it for `trace` here 
makes sense because you aren't just calling `toString` and sadly, SLF4J doesn't 
yet accept `Supplier`s for messages.


---

Reply via email to