409133 Empty <welcome-file> causes StackOverflowError

This commit is contained in:
Jan Bartel 2013-05-29 10:21:53 +10:00
parent 48c2a410b6
commit 9f2a641dc0
1 changed files with 2 additions and 1 deletions

View File

@ -750,7 +750,8 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
String welcome = indexNode.toString(false, true);
//Servlet Spec 3.0 p. 74 welcome files are additive
context.setWelcomeFiles((String[])LazyList.addToArray(context.getWelcomeFiles(),welcome,String.class));
if (welcome != null && welcome.trim().length() > 0)
context.setWelcomeFiles((String[])LazyList.addToArray(context.getWelcomeFiles(),welcome,String.class));
}
}