Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 835194 Details for
Bug 1040350
NPE in setting NamingPolicy
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
NPE workaround
0001-Workaround-for-NPE-in-setting-NamingPolicy.patch (text/plain), 3.36 KB, created by
Michael Simacek
on 2013-12-11 09:25:54 UTC
(
hide
)
Description:
NPE workaround
Filename:
MIME Type:
Creator:
Michael Simacek
Created:
2013-12-11 09:25:54 UTC
Size:
3.36 KB
patch
obsolete
>From 7e4b3911f71f65555654058213bc2b829858ba42 Mon Sep 17 00:00:00 2001 >From: Michael Simacek <msimacek@redhat.com> >Date: Wed, 11 Dec 2013 09:37:01 +0100 >Subject: [PATCH 1/2] Workaround for NPE in setting NamingPolicy > >Signed-off-by: Michael Simacek <msimacek@redhat.com> >--- > mockito.spec | 9 ++++++++- > setting-naming-policy.patch | 34 ++++++++++++++++++++++++++++++++++ > 2 files changed, 42 insertions(+), 1 deletion(-) > create mode 100644 setting-naming-policy.patch > >diff --git a/mockito.spec b/mockito.spec >index 5586832..d651a87 100644 >--- a/mockito.spec >+++ b/mockito.spec >@@ -1,6 +1,6 @@ > Name: mockito > Version: 1.9.0 >-Release: 13%{?dist} >+Release: 14%{?dist} > Summary: A Java mocking framework > > License: MIT >@@ -12,6 +12,8 @@ Patch1: fix-cglib-refs.patch > Patch2: maven-cglib-dependency.patch > Patch3: fix-bnd-config.patch > Patch4: %{name}-matcher.patch >+# Workaround for NPE in setting NamingPolicy in cglib >+Patch5: setting-naming-policy.patch > > BuildArch: noarch > BuildRequires: jpackage-utils >@@ -53,8 +55,10 @@ This package contains the API documentation for %{name}. > sed -i 's/Bundle-Version= ${version}/Bundle-Version= %{version}/' conf/mockito-core.bnd > %patch3 > %patch4 -p1 >+%patch5 -p1 > > %build >+build-jar-repository lib/compile objenesis > ant jar javadoc > # Convert to OSGi bundle > pushd target >@@ -88,6 +92,9 @@ cp -rp target/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} > %doc NOTICE > > %changelog >+* Wed Dec 11 2013 Michael Simacek <msimacek@redhat.com> - 1.9.0-14 >+- Workaround for NPE in setting NamingPolicy >+ > * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-13 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild > >diff --git a/setting-naming-policy.patch b/setting-naming-policy.patch >new file mode 100644 >index 0000000..d4f30b1 >--- /dev/null >+++ b/setting-naming-policy.patch >@@ -0,0 +1,34 @@ >+From 04e36a01e93c3b79caa9f7e9e8573fe2a0d65d1a Mon Sep 17 00:00:00 2001 >+From: Michael Simacek <msimacek@redhat.com> >+Date: Thu, 5 Dec 2013 16:53:36 +0100 >+Subject: [PATCH] Setting naming policy >+ >+Signed-off-by: Michael Simacek <msimacek@redhat.com> >+--- >+ src/org/mockito/internal/creation/cglib/CGLIBHacker.java | 5 ++++- >+ 1 file changed, 4 insertions(+), 1 deletion(-) >+ >+diff --git a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java >+index 172f744..de53ab1 100644 >+--- a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java >++++ b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java >+@@ -20,6 +20,9 @@ public class CGLIBHacker implements Serializable { >+ Field createInfoField = reflectOnCreateInfo(methodProxy); >+ createInfoField.setAccessible(true); >+ Object createInfo = createInfoField.get(methodProxy); >++ if (createInfo == null) { >++ return; >++ } >+ Field namingPolicyField = createInfo.getClass().getDeclaredField("namingPolicy"); >+ namingPolicyField.setAccessible(true); >+ if (namingPolicyField.get(createInfo) == null) { >+@@ -43,4 +46,4 @@ public class CGLIBHacker implements Serializable { >+ } >+ return cglibMethodProxyClass.getDeclaredField("createInfo"); >+ } >+-} >+\ No newline at end of file >++} >+-- >+1.8.3.1 >+ >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1040350
: 835194 |
835195