Author: olamy
Date: Tue Oct 16 14:27:25 2012
New Revision: 1398815
URL: http://svn.apache.org/viewvc?rev=1398815&view=rev
Log:
[MTOMCAT-179] Null pointer dereference in RunMojo
Modified:
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
Modified:
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java?rev=1398815&r1=1398814&r2=1398815&view=diff
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
(original)
+++
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
Tue Oct 16 14:27:25 2012
@@ -160,6 +160,8 @@ public class RunMojo
temporaryContextFile = File.createTempFile( "tomcat-maven-plugin",
"temp-ctx-file" );
temporaryContextFile.deleteOnExit();
+ fw = new FileWriter( temporaryContextFile );
+
// format to modify/create <Context backgroundProcessorDelay="5"
reloadable="false">
if ( contextFile != null && contextFile.exists() )
{
@@ -176,7 +178,6 @@ public class RunMojo
Xpp3Dom xpp3Dom = Xpp3DomBuilder.build( fr );
xpp3Dom.setAttribute( "backgroundProcessorDelay",
Integer.toString( backgroundProcessorDelay ) );
xpp3Dom.setAttribute( "reloadable", Boolean.toString(
isContextReloadable() ) );
- fw = new FileWriter( temporaryContextFile );
Xpp3DomWriter.write( fw, xpp3Dom );
Xpp3DomWriter.write( sw, xpp3Dom );
getLog().debug( " generated context file " + sw.toString() );
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]