You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2009/03/04 12:11:56 UTC
[jira] Resolved: (CXF-2058)
org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getPackageContext
erroneously returns null value
[ https://issues.apache.org/jira/browse/CXF-2058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-2058.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.1.5
2.2
thanks for pointing to where the problem is - fixed now. The fix has been merged to 2.2 only but it will also go to 2.1.5
> org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getPackageContext erroneously returns null value
> ---------------------------------------------------------------------------------------------------
>
> Key: CXF-2058
> URL: https://issues.apache.org/jira/browse/CXF-2058
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.4
> Reporter: Marcus Hanau
> Fix For: 2.2, 2.1.5
>
>
> The following code does not allow a non-null context returned by packageContexts.get(packageName) to be returned.
> JAXBContext context = packageContexts.get(packageName); // In my test case this value == null on first iteration but not on second
> if (context == null) { // If context != null, then this block is not executed.
> try {
> context = JAXBContext.newInstance(packageName, type.getClassLoader());
> packageContexts.put(packageName, context);
> return context;
> } catch (JAXBException ex) {
> LOG.fine("Error creating a JAXBContext using ObjectFactory : "
> + ex.getMessage());
> return null;
> } // end try-catch
> } // end if
> } // end synchronized block
> return null; // Causes response to be null when above if(context == null) is false
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.