commit | 3d0a7c809d9150dfc67487c0b9449bfc8c60e2a9 | [log] [tgz] |
---|---|---|
author | Konstantin Kolinko <kkolinko@apache.org> | Fri Nov 08 09:20:10 2013 +0000 |
committer | Konstantin Kolinko <kkolinko@apache.org> | Fri Nov 08 09:20:10 2013 +0000 |
tree | 9824d2a2d5ffde4811910f29fdba9659e2506844 | |
parent | ebd0cc72cc682d789e3a281da91892ae21821d77 [diff] |
https://issues.apache.org/jira/browse/MTOMCAT-211 Followup to r1539920 Introduce a local variable to cache the object created by expandFile.getParentFile() call. git-svn-id: https://svn.apache.org/repos/asf/tomcat/maven-plugin/trunk@1539956 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java b/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java index 2ea26a8..34871c8 100644 --- a/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java +++ b/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
@@ -580,10 +580,10 @@ debugMessage( "expand to file:" + expandFile.getPath() ); // MTOMCAT-211 ensure parent directories created - - if ( !expandFile.getParentFile().mkdirs() && !expandFile.getParentFile().isDirectory()) + File parentFile = expandFile.getParentFile(); + if ( !parentFile.mkdirs() && !parentFile.isDirectory()) { - throw new Exception( "FATAL: impossible to create directories:" + expandFile.getParentFile() ); + throw new Exception( "FATAL: impossible to create directories:" + parentFile ); } expand( inputStream, expandFile );