Lines 943-949
Link Here
|
943 |
|
943 |
|
944 |
private FilterRegistration.Dynamic addFilter(String filterName, |
944 |
private FilterRegistration.Dynamic addFilter(String filterName, |
945 |
String filterClass, Filter filter) throws IllegalStateException { |
945 |
String filterClass, Filter filter) throws IllegalStateException { |
946 |
|
946 |
|
|
|
947 |
if (filterName == null || filterName.equals("")) { |
948 |
throw new IllegalArgumentException( |
949 |
sm.getString("applicationContext.invalidFilterName", filterName)); |
950 |
} |
951 |
|
947 |
if (!context.getState().equals(LifecycleState.STARTING_PREP)) { |
952 |
if (!context.getState().equals(LifecycleState.STARTING_PREP)) { |
948 |
//TODO Spec breaking enhancement to ignore this restriction |
953 |
//TODO Spec breaking enhancement to ignore this restriction |
949 |
throw new IllegalStateException( |
954 |
throw new IllegalStateException( |
Lines 1083-1089
Link Here
|
1083 |
|
1088 |
|
1084 |
private ServletRegistration.Dynamic addServlet(String servletName, |
1089 |
private ServletRegistration.Dynamic addServlet(String servletName, |
1085 |
String servletClass, Servlet servlet) throws IllegalStateException { |
1090 |
String servletClass, Servlet servlet) throws IllegalStateException { |
1086 |
|
1091 |
|
|
|
1092 |
if (servletName == null || servletName.equals("")) { |
1093 |
throw new IllegalArgumentException( |
1094 |
sm.getString("applicationContext.invalidServletName", servletName)); |
1095 |
} |
1096 |
|
1087 |
if (!context.getState().equals(LifecycleState.STARTING_PREP)) { |
1097 |
if (!context.getState().equals(LifecycleState.STARTING_PREP)) { |
1088 |
//TODO Spec breaking enhancement to ignore this restriction |
1098 |
//TODO Spec breaking enhancement to ignore this restriction |
1089 |
throw new IllegalStateException( |
1099 |
throw new IllegalStateException( |