Added isXXXEnabled for logging statements
Guarded the logging statements which do concatenation of strings or calling toString on objects. When a log level isn't enabled this still would produce garbage that would need to be collected. Guarded all logging up to info, warn and error can be assumed to be enabled on a production system.
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
3fbfbb9503
commit
b7d144c10d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -123,7 +123,7 @@ public class DefaultFieldSet implements FieldSet {
|
||||
if (names == null) {
|
||||
throw new IllegalStateException("Field names are not known");
|
||||
}
|
||||
return names.toArray(new String[names.size()]);
|
||||
return names.toArray(new String[0]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user