This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git


The following commit(s) were added to refs/heads/master by this push:
     new 0e5b4ec  Raise embedded if into parent if.
0e5b4ec is described below

commit 0e5b4ec5f4f3aaacc2d61323f629d2a819fb405b
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Feb 28 12:16:48 2021 -0500

    Raise embedded if into parent if.
---
 src/main/java/org/apache/commons/beanutils2/MethodUtils.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/beanutils2/MethodUtils.java 
b/src/main/java/org/apache/commons/beanutils2/MethodUtils.java
index eaa418f..838884a 100644
--- a/src/main/java/org/apache/commons/beanutils2/MethodUtils.java
+++ b/src/main/java/org/apache/commons/beanutils2/MethodUtils.java
@@ -1268,10 +1268,8 @@ public class MethodUtils {
      * @param method The method to cache
      */
     private static void cacheMethod(final MethodDescriptor md, final Method 
method) {
-        if (CACHE_METHODS) {
-            if (method != null) {
-                cache.put(md, new WeakReference<>(method));
-            }
+        if (CACHE_METHODS && method != null) {
+            cache.put(md, new WeakReference<>(method));
         }
     }
 

Reply via email to