Skip to content

Commit b42bfd1

Browse files
committed
2 parents aded4a6 + 485bfa2 commit b42bfd1

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix typo in exception message throws from org.apache.commons.beanutils2.PropertyUtilsBean.setMappedProperty(Object, String, String, Object).</action>
3434
<action type="fix" dev="ggregory" due-to="Basil Crow, Piotr P. Karwasz, Gary Gregory">Simplify FluentPropertyBeanIntrospector#propertyName (#363).</action>
3535
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix malformed Javadoc comments.</action>
36+
<action type="fix" dev="sebb">Static fields should be final or protected by synch.</action>
3637
<!-- ADD -->
3738
<action type="add" dev="ggregory" due-to="Gary Gregory">Use varargs for org.apache.commons.beanutils2.MethodUtils.getAccessibleMethod(Class, String, Class...), and remove last argument variants using Class[] and Class.</action>
3839
<action type="add" dev="ggregory" due-to="SethFalco, Melloware, Gary Gregory">Add Instant converter and improve enum converter #49.</action>

src/main/java/org/apache/commons/beanutils2/LazyDynaBean.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public class LazyDynaBean implements DynaBean {
129129
/**
130130
* Commons Logging
131131
*/
132-
private static transient Log LOG = LogFactory.getLog(LazyDynaBean.class);
132+
private static final transient Log LOG = LogFactory.getLog(LazyDynaBean.class);
133133

134134
/** BigInteger Zero */
135135
protected static final BigInteger BigInteger_ZERO = new BigInteger("0");
@@ -673,9 +673,6 @@ protected boolean isDynaProperty(final String name) {
673673
* Returns the {@code Log}.
674674
*/
675675
private Log logger() {
676-
if (LOG == null) {
677-
LOG = LogFactory.getLog(LazyDynaBean.class);
678-
}
679676
return LOG;
680677
}
681678

src/main/java/org/apache/commons/beanutils2/MethodUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public String toString() {
118118
* would mean having a map keyed by context classloader which may introduce memory-leak problems.
119119
* </p>
120120
*/
121-
private static boolean CACHE_ENABLED = true;
121+
private static boolean CACHE_ENABLED = true; //NOPMD @GuardedBy("this")
122122

123123
/**
124124
* Stores a cache of MethodKey -> Method.

0 commit comments

Comments
 (0)