#310382 NPE protection when WAR is not a file

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1645 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-05-03 10:41:45 +00:00
parent 4f5c512d75
commit 7908935011
2 changed files with 7 additions and 3 deletions

View File

@ -7,6 +7,7 @@ jetty-7.1.0.RC1-SNAPSHOT
+ 308868 Update test suite to JUnit4 - Module jetty-websocket
+ 308869 Update test suite to JUnit4 - Module jetty-xml
+ 310094 Improved start.jar options handling and configs
+ 310382 NPE protection when WAR is not a file
+ 310562 SslSocketConnector fails to start if excludeCipherSuites is set
+ 310634 Get the localport when opening a server socket.
+ 310703 Update test suite to JUnit4 - Module tests/test-integration

View File

@ -403,9 +403,12 @@ public class WebInfConfiguration implements Configuration
{
// look for a sibling like "foo/" to a "foo.war"
File warfile=Resource.newResource(war).getFile();
File sibling = new File(warfile.getParent(),warfile.getName().substring(0,warfile.getName().length()-4));
if (sibling.exists() && sibling.isDirectory() && sibling.canWrite())
extractedWebAppDir=sibling;
if (warfile!=null)
{
File sibling = new File(warfile.getParent(),warfile.getName().substring(0,warfile.getName().length()-4));
if (sibling.exists() && sibling.isDirectory() && sibling.canWrite())
extractedWebAppDir=sibling;
}
}
if (extractedWebAppDir==null)