From 9f2a641dc075f4587068f2d43bf33521a3ddc488 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 29 May 2013 10:21:53 +1000 Subject: [PATCH] 409133 Empty causes StackOverflowError --- .../org/eclipse/jetty/webapp/StandardDescriptorProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java index 5fc3be0af72..1b0089061d9 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java @@ -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)); } }