Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to address NPE that may occur when multiple cdi-injected servlets #1485

Merged

Conversation

jim-krueger
Copy link
Member

are specified in the web.xml for a JAXRS application with
load-on-startup specified

@LibbyBot
Copy link

LibbyBot commented Jan 5, 2018

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 5 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

@jim-krueger
Copy link
Member Author

#build

@LibbyBot
Copy link

LibbyBot commented Jan 5, 2018

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_Sv6xsPJfEee7FMdg7u8gzA

Target locations of links might be accessible only to IBM employees.

@jim-krueger
Copy link
Member Author

#1483

1 similar comment
@jim-krueger
Copy link
Member Author

#1483

Copy link
Contributor

@andymc12 andymc12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good, but some minor suggested changes.

ModuleMetaData mmd = cmd.getModuleMetaData();
j2eeName = mmd.getJ2EEName();
}
return Integer.toString(customizer.hashCode()) + j2eeName;// + ":" + Thread.currentThread().getId();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove the commented code: // + ":" + Thread.currentThread().getId();

@@ -69,7 +69,8 @@
private final static TraceComponent tc = Tr.register(LibertyJaxRsServerFactoryBean.class);

private final List<JaxRsFactoryBeanCustomizer> beanCustomizers = new LinkedList<JaxRsFactoryBeanCustomizer>();
private final Map<String, Object> beanCustomizerContexts = new HashMap<String, Object>();
// private final Map<String, Object> beanCustomizerContexts = new HashMap<String, Object>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this comment: // private final Map<String, Object> beanCustomizerContexts = new HashMap<String, Object>();

BeanCustomizerContext context = new BeanCustomizerContext(endpointInfo, moduleMetadata, cxfPRHolder);

if (key != null && (oldCustomizerContext instanceof HashMap)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be better if it checked for an instance of Map as opposed to HashMap in case we decide to use different types of Maps in the future - I'm not sure, but I think we currently only use HashMaps (and subclasses of HashMaps - like ThreadBasedHashMap), so this is probably safe as-is, but would be safer to change to check for Map.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose HashMap in order to use the Map we were using... but I see your point for future flexibility. I'll change this.

@LibbyBot
Copy link

LibbyBot commented Jan 6, 2018

The build jim-krueger-1485-20180105-2238
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_Sv6xsPJfEee7FMdg7u8gzA
completed successfully!

are specified in the web.xml for a JAXRS application with
load-on-startup specified
@jim-krueger
Copy link
Member Author

#build

@LibbyBot
Copy link

LibbyBot commented Jan 8, 2018

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_JNXv8PR5EeeSWo-prsQAeQ

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

LibbyBot commented Jan 9, 2018

The build jim-krueger-1485-20180108-1446
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_JNXv8PR5EeeSWo-prsQAeQ
completed successfully!

@jim-krueger jim-krueger merged commit 925d5f8 into OpenLiberty:integration Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants