Skip to content

Commit

Permalink
Upgrade Spring framework to 3.2.7.RELEASE - TRUNK-3390
Browse files Browse the repository at this point in the history
  • Loading branch information
dkayiwa committed Feb 10, 2014
1 parent c03c3fb commit 4f4aa72
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -1089,7 +1089,7 @@
<openmrs.version.short>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${revisionNumber}-${parsedVersion.qualifier}</openmrs.version.short>
<openmrs.version.shortnumericonly>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${revisionNumber}</openmrs.version.shortnumericonly>

<springVersion>3.0.5.RELEASE</springVersion>
<springVersion>3.2.7.RELEASE</springVersion>
<customArgLineForTesting></customArgLineForTesting>
</properties>
</project>
6 changes: 3 additions & 3 deletions web/src/main/java/org/openmrs/web/Listener.java
Expand Up @@ -37,6 +37,7 @@
import org.springframework.util.StringUtils;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.XmlWebApplicationContext;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.EntityResolver;
Expand Down Expand Up @@ -162,10 +163,9 @@ public void contextInitialized(ServletContextEvent event) {
* Copied here instead of calling that so that the context is not cached
* and hence not garbage collected
*/
ApplicationContext parent = loadParentContext(servletContext);
WebApplicationContext context = createWebApplicationContext(servletContext, parent);
XmlWebApplicationContext context = (XmlWebApplicationContext) createWebApplicationContext(servletContext);
configureAndRefreshWebApplicationContext(context, servletContext);
servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, context);
/** */

WebDaemon.startOpenmrs(event.getServletContext());
}
Expand Down
11 changes: 11 additions & 0 deletions web/src/test/java/org/openmrs/web/test/TestContextLoader.java
Expand Up @@ -13,8 +13,10 @@
*/
package org.openmrs.web.test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.mock.web.MockServletContext;
import org.springframework.test.context.MergedContextConfiguration;
import org.springframework.test.context.support.AbstractContextLoader;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.XmlWebApplicationContext;
Expand Down Expand Up @@ -44,4 +46,13 @@ public final ConfigurableApplicationContext loadContext(String... locations) thr
protected String getResourceSuffix() {
return "-context.xml";
}

/**
* @see org.springframework.test.context.SmartContextLoader#loadContext(org.springframework.test.context.MergedContextConfiguration)
*/
@Override
public ApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception {
// TODO Auto-generated method stub

This comment has been minimized.

Copy link
@rkorytkowski

rkorytkowski Feb 10, 2014

Member

TODO remove the todo :)

This comment has been minimized.

Copy link
@dkayiwa

dkayiwa Feb 10, 2014

Author Member

Removed at: 1d59b0b :)

return null;
}
}

1 comment on commit 4f4aa72

@rkorytkowski
Copy link
Member

Choose a reason for hiding this comment

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

Awesome! Thanks Daniel!

Please sign in to comment.