@ SuppressWarnings ( "ReferenceEquality" ) private void logImpl ( String message , Object ... args ) { this . args = args ; // Evaluate any (rare) LazyArg instances early. This may throw exceptions from user code, but // it seems reasonable to propagate them in this case (they would have been thrown if the // argument was evaluated at the call site anyway). for ( int n = 0 ; n < args . length ; n ++ ) { if ( args [ n ] instanceof LazyArg ) { args [ n ] = ( ( LazyArg < ? > ) args [ n ] ) . evaluate ( ) ; } } // Using "!=" is fast and sufficient here because the only real case this should be skipping // is when we called log(String) or log(), which should not result in a template being created. // DO NOT replace this with a string instance which can be interned, or use equals() here, // since that could mistakenly treat other calls to log(String, Object...) incorrectly. if ( message != LITERAL_VALUE_MESSAGE ) { this . templateContext = new TemplateContext ( getMessageParser ( ) , message ) ; } getLogger ( ) . write ( this ) ; }
Make the backend logging call . This is the point at which we have paid the price of creating a varargs array and doing any necessary auto - boxing .