cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Hanau (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2058) org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getPackageContext erroneously returns null value
Date Mon, 23 Feb 2009 20:28:01 GMT
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


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.


Mime
View raw message