Blame SOURCES/setting-naming-policy.patch

60961a
From 04e36a01e93c3b79caa9f7e9e8573fe2a0d65d1a Mon Sep 17 00:00:00 2001
60961a
From: Michael Simacek <msimacek@redhat.com>
60961a
Date: Thu, 5 Dec 2013 16:53:36 +0100
60961a
Subject: [PATCH] Setting naming policy
60961a
60961a
Signed-off-by: Michael Simacek <msimacek@redhat.com>
60961a
---
60961a
 src/org/mockito/internal/creation/cglib/CGLIBHacker.java | 5 ++++-
60961a
 1 file changed, 4 insertions(+), 1 deletion(-)
60961a
60961a
diff --git a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
60961a
index 172f744..de53ab1 100644
60961a
--- a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
60961a
+++ b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
60961a
@@ -20,6 +20,9 @@ public class CGLIBHacker implements Serializable {
60961a
             Field createInfoField = reflectOnCreateInfo(methodProxy);
60961a
             createInfoField.setAccessible(true);
60961a
             Object createInfo = createInfoField.get(methodProxy);
60961a
+            if (createInfo == null) {
60961a
+                return;
60961a
+            }
60961a
             Field namingPolicyField = createInfo.getClass().getDeclaredField("namingPolicy");
60961a
             namingPolicyField.setAccessible(true);
60961a
             if (namingPolicyField.get(createInfo) == null) {
60961a
@@ -43,4 +46,4 @@ public class CGLIBHacker implements Serializable {
60961a
         }
60961a
         return cglibMethodProxyClass.getDeclaredField("createInfo");
60961a
     }
60961a
-}
60961a
\ No newline at end of file
60961a
+}
60961a
-- 
60961a
1.8.3.1
60961a