[jboss-cvs] jboss-seam/src/debug/org/jboss/seam/debug/hot ...
Gavin King
gavin.king at jboss.com
Fri May 18 12:27:06 EDT 2007
User: gavin
Date: 07/05/18 12:27:05
Modified: src/debug/org/jboss/seam/debug/hot HotDeployFilter.java
Log:
JBSEAM-1332, fix NPE on hot redeploy
Revision Changes Path
1.5 +7 -5 jboss-seam/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: HotDeployFilter.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- HotDeployFilter.java 9 May 2007 01:49:37 -0000 1.4
+++ HotDeployFilter.java 18 May 2007 16:27:05 -0000 1.5
@@ -42,6 +42,7 @@
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException
{
+
Init init = (Init) getServletContext().getAttribute( Seam.getComponentName(Init.class) );
if ( init!=null && init.hasHotDeployableComponents() )
{
@@ -49,6 +50,7 @@
{
if ( scan(request, init, file) )
{
+ Seam.clearComponentNameCache();
new Initialization( getServletContext() ).redeploy( ( (HttpServletRequest) request ).getSession(true) );
break;
}
@@ -66,12 +68,12 @@
{
if ( file.isFile() )
{
+ if ( !file.exists() || ( file.lastModified() > init.getTimestamp() ) )
+ {
if ( log.isDebugEnabled() )
{
log.debug( "file updated: " + file.getName() );
}
- if ( file.lastModified() > init.getTimestamp() )
- {
return true;
}
}
More information about the jboss-cvs-commits
mailing list