rename JAVAX_API to JAKARTA_API in ee9 and ee10 Source
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
a03c5251df
commit
4e9c59cb78
|
@ -52,7 +52,7 @@ public class TestAnnotationIntrospector
|
|||
assertTrue(introspector.isIntrospectable(new ServletE(), holder));
|
||||
|
||||
//a JAVAX API sourced servlet can be introspected
|
||||
holder = new ServletHolder(Source.JAVAX_API);
|
||||
holder = new ServletHolder(Source.JAKARTA_API);
|
||||
holder.setHeldClass(ServletE.class);
|
||||
assertTrue(introspector.isIntrospectable(new ServletE(), holder));
|
||||
|
||||
|
|
|
@ -2141,7 +2141,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new filter
|
||||
holder = handler.newFilterHolder(Source.JAVAX_API);
|
||||
holder = handler.newFilterHolder(Source.JAKARTA_API);
|
||||
holder.setName(filterName);
|
||||
holder.setHeldClass(filterClass);
|
||||
handler.addFilter(holder);
|
||||
|
@ -2170,7 +2170,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new filter
|
||||
holder = handler.newFilterHolder(Source.JAVAX_API);
|
||||
holder = handler.newFilterHolder(Source.JAKARTA_API);
|
||||
holder.setName(filterName);
|
||||
holder.setClassName(className);
|
||||
handler.addFilter(holder);
|
||||
|
@ -2199,7 +2199,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new filter
|
||||
holder = handler.newFilterHolder(Source.JAVAX_API);
|
||||
holder = handler.newFilterHolder(Source.JAKARTA_API);
|
||||
holder.setName(filterName);
|
||||
holder.setFilter(filter);
|
||||
handler.addFilter(holder);
|
||||
|
@ -2229,7 +2229,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new servlet
|
||||
holder = handler.newServletHolder(Source.JAVAX_API);
|
||||
holder = handler.newServletHolder(Source.JAKARTA_API);
|
||||
holder.setName(servletName);
|
||||
holder.setHeldClass(servletClass);
|
||||
handler.addServlet(holder);
|
||||
|
@ -2259,7 +2259,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new servlet
|
||||
holder = handler.newServletHolder(Source.JAVAX_API);
|
||||
holder = handler.newServletHolder(Source.JAKARTA_API);
|
||||
holder.setName(servletName);
|
||||
holder.setClassName(className);
|
||||
handler.addServlet(holder);
|
||||
|
@ -2288,7 +2288,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
ServletHolder holder = handler.getServlet(servletName);
|
||||
if (holder == null)
|
||||
{
|
||||
holder = handler.newServletHolder(Source.JAVAX_API);
|
||||
holder = handler.newServletHolder(Source.JAKARTA_API);
|
||||
holder.setName(servletName);
|
||||
holder.setServlet(servlet);
|
||||
handler.addServlet(holder);
|
||||
|
@ -2315,7 +2315,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new servlet
|
||||
holder = handler.newServletHolder(Source.JAVAX_API);
|
||||
holder = handler.newServletHolder(Source.JAKARTA_API);
|
||||
holder.setName(servletName);
|
||||
holder.setForcedPath(jspFile);
|
||||
handler.addServlet(holder);
|
||||
|
@ -2600,7 +2600,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
|
||||
checkListener(t.getClass());
|
||||
|
||||
ListenerHolder holder = getServletHandler().newListenerHolder(Source.JAVAX_API);
|
||||
ListenerHolder holder = getServletHandler().newListenerHolder(Source.JAKARTA_API);
|
||||
holder.setListener(t);
|
||||
addProgrammaticListener(t);
|
||||
getServletHandler().addListener(holder);
|
||||
|
|
|
@ -1070,7 +1070,7 @@ public class ServletHandler extends Handler.Wrapper
|
|||
if (_filterMappings.isEmpty())
|
||||
{
|
||||
_filterMappings.add(mapping);
|
||||
if (source == Source.JAVAX_API)
|
||||
if (source == Source.JAKARTA_API)
|
||||
_matchAfterIndex = 0;
|
||||
}
|
||||
else
|
||||
|
@ -1078,7 +1078,7 @@ public class ServletHandler extends Handler.Wrapper
|
|||
//there are existing entries. If this is a programmatic filtermapping, it is added at the end of the list.
|
||||
//If this is a normal filtermapping, it is inserted after all the other filtermappings (matchBefores and normals),
|
||||
//but before the first matchAfter filtermapping.
|
||||
if (Source.JAVAX_API == source)
|
||||
if (Source.JAKARTA_API == source)
|
||||
{
|
||||
_filterMappings.add(mapping);
|
||||
if (_matchAfterIndex < 0)
|
||||
|
@ -1116,12 +1116,12 @@ public class ServletHandler extends Handler.Wrapper
|
|||
if (_filterMappings.isEmpty())
|
||||
{
|
||||
_filterMappings.add(mapping);
|
||||
if (Source.JAVAX_API == source)
|
||||
if (Source.JAKARTA_API == source)
|
||||
_matchBeforeIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Source.JAVAX_API == source)
|
||||
if (Source.JAKARTA_API == source)
|
||||
{
|
||||
//programmatically defined filter mappings are prepended to mapping list in the order
|
||||
//in which they were defined. In other words, insert this mapping at the tail of the
|
||||
|
|
|
@ -943,7 +943,7 @@ public class ServletHolder extends Holder<Servlet> implements Comparable<Servlet
|
|||
return clash;
|
||||
|
||||
//otherwise apply all of them
|
||||
ServletMapping mapping = new ServletMapping(Source.JAVAX_API);
|
||||
ServletMapping mapping = new ServletMapping(Source.JAKARTA_API);
|
||||
mapping.setServletName(ServletHolder.this.getName());
|
||||
mapping.setPathSpecs(urlPatterns);
|
||||
getServletHandler().addServletMapping(mapping);
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.eclipse.jetty.util.resource.Resource;
|
|||
public class Source
|
||||
{
|
||||
public static final Source EMBEDDED = new Source(Origin.EMBEDDED);
|
||||
public static final Source JAVAX_API = new Source(Origin.JAKARTA_API);
|
||||
public static final Source JAKARTA_API = new Source(Origin.JAKARTA_API);
|
||||
|
||||
public enum Origin
|
||||
{
|
||||
|
|
|
@ -55,13 +55,13 @@ public class ServletHandlerTest
|
|||
FilterHolder fh2 = new FilterHolder(new Source(Source.Origin.DESCRIPTOR, "foo.xml"));
|
||||
FilterMapping fm2 = new FilterMapping();
|
||||
|
||||
FilterHolder fh3 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder fh3 = new FilterHolder(Source.JAKARTA_API);
|
||||
FilterMapping fm3 = new FilterMapping();
|
||||
|
||||
FilterHolder fh4 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder fh4 = new FilterHolder(Source.JAKARTA_API);
|
||||
FilterMapping fm4 = new FilterMapping();
|
||||
|
||||
FilterHolder fh5 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder fh5 = new FilterHolder(Source.JAKARTA_API);
|
||||
FilterMapping fm5 = new FilterMapping();
|
||||
|
||||
ServletHolder sh1 = new ServletHolder(new Source(Source.Origin.DESCRIPTOR, "foo.xml"));
|
||||
|
@ -538,7 +538,7 @@ public class ServletHandlerTest
|
|||
assertThat(mappings[4], is(fm3)); //isMatchAfter = true;
|
||||
|
||||
//add a programmatic one, isMatchAfter=true
|
||||
FilterHolder pf = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder pf = new FilterHolder(Source.JAKARTA_API);
|
||||
pf.setName("programmaticA");
|
||||
FilterMapping pfm = new FilterMapping();
|
||||
pfm.setFilterHolder(pf);
|
||||
|
@ -556,7 +556,7 @@ public class ServletHandlerTest
|
|||
assertThat(mappings[5], is(pfm)); //isMatchAfter = true;
|
||||
|
||||
//add a programmatic one, isMatchAfter=false
|
||||
FilterHolder pf2 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder pf2 = new FilterHolder(Source.JAKARTA_API);
|
||||
pf2.setName("programmaticB");
|
||||
FilterMapping pfm2 = new FilterMapping();
|
||||
pfm2.setFilterHolder(pf2);
|
||||
|
@ -638,7 +638,7 @@ public class ServletHandlerTest
|
|||
assertThat(mappings[4].getFilterHolder(), is(fh3)); //isMatchAfter = true;
|
||||
|
||||
//add a programmatic one, isMatchAfter=true
|
||||
FilterHolder pf = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder pf = new FilterHolder(Source.JAKARTA_API);
|
||||
pf.setServletHandler(handler);
|
||||
pf.setName("programmaticA");
|
||||
handler.addFilter(pf);
|
||||
|
@ -655,7 +655,7 @@ public class ServletHandlerTest
|
|||
assertThat(mappings[5].getFilterHolder(), is(pf)); //isMatchAfter = true;
|
||||
|
||||
//add a programmatic one, isMatchAfter=false
|
||||
FilterHolder pf2 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder pf2 = new FilterHolder(Source.JAKARTA_API);
|
||||
pf2.setServletHandler(handler);
|
||||
pf2.setName("programmaticB");
|
||||
handler.addFilter(pf2);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ServletHolderTest
|
|||
@Test
|
||||
public void testInitParams() throws Exception
|
||||
{
|
||||
ServletHolder holder = new ServletHolder(Source.JAVAX_API);
|
||||
ServletHolder holder = new ServletHolder(Source.JAKARTA_API);
|
||||
ServletRegistration reg = holder.getRegistration();
|
||||
|
||||
assertThrows(IllegalArgumentException.class, () -> reg.setInitParameter(null, "foo"));
|
||||
|
|
|
@ -52,7 +52,7 @@ public class TestAnnotationIntrospector
|
|||
assertTrue(introspector.isIntrospectable(new ServletE(), holder));
|
||||
|
||||
//a JAVAX API sourced servlet can be introspected
|
||||
holder = new ServletHolder(Source.JAVAX_API);
|
||||
holder = new ServletHolder(Source.JAKARTA_API);
|
||||
holder.setHeldClass(ServletE.class);
|
||||
assertTrue(introspector.isIntrospectable(new ServletE(), holder));
|
||||
|
||||
|
|
|
@ -1050,7 +1050,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new filter
|
||||
holder = handler.newFilterHolder(Source.JAVAX_API);
|
||||
holder = handler.newFilterHolder(Source.JAKARTA_API);
|
||||
holder.setName(filterName);
|
||||
holder.setHeldClass(filterClass);
|
||||
handler.addFilter(holder);
|
||||
|
@ -1079,7 +1079,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new filter
|
||||
holder = handler.newFilterHolder(Source.JAVAX_API);
|
||||
holder = handler.newFilterHolder(Source.JAKARTA_API);
|
||||
holder.setName(filterName);
|
||||
holder.setClassName(className);
|
||||
handler.addFilter(holder);
|
||||
|
@ -1108,7 +1108,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new filter
|
||||
holder = handler.newFilterHolder(Source.JAVAX_API);
|
||||
holder = handler.newFilterHolder(Source.JAKARTA_API);
|
||||
holder.setName(filterName);
|
||||
holder.setFilter(filter);
|
||||
handler.addFilter(holder);
|
||||
|
@ -1138,7 +1138,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new servlet
|
||||
holder = handler.newServletHolder(Source.JAVAX_API);
|
||||
holder = handler.newServletHolder(Source.JAKARTA_API);
|
||||
holder.setName(servletName);
|
||||
holder.setHeldClass(servletClass);
|
||||
handler.addServlet(holder);
|
||||
|
@ -1168,7 +1168,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new servlet
|
||||
holder = handler.newServletHolder(Source.JAVAX_API);
|
||||
holder = handler.newServletHolder(Source.JAKARTA_API);
|
||||
holder.setName(servletName);
|
||||
holder.setClassName(className);
|
||||
handler.addServlet(holder);
|
||||
|
@ -1197,7 +1197,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
ServletHolder holder = handler.getServlet(servletName);
|
||||
if (holder == null)
|
||||
{
|
||||
holder = handler.newServletHolder(Source.JAVAX_API);
|
||||
holder = handler.newServletHolder(Source.JAKARTA_API);
|
||||
holder.setName(servletName);
|
||||
holder.setServlet(servlet);
|
||||
handler.addServlet(holder);
|
||||
|
@ -1224,7 +1224,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
if (holder == null)
|
||||
{
|
||||
//new servlet
|
||||
holder = handler.newServletHolder(Source.JAVAX_API);
|
||||
holder = handler.newServletHolder(Source.JAKARTA_API);
|
||||
holder.setName(servletName);
|
||||
holder.setForcedPath(jspFile);
|
||||
handler.addServlet(holder);
|
||||
|
@ -1488,7 +1488,7 @@ public class ServletContextHandler extends ContextHandler
|
|||
|
||||
checkListener(t.getClass());
|
||||
|
||||
ListenerHolder holder = getServletHandler().newListenerHolder(Source.JAVAX_API);
|
||||
ListenerHolder holder = getServletHandler().newListenerHolder(Source.JAKARTA_API);
|
||||
holder.setListener(t);
|
||||
addProgrammaticListener(t);
|
||||
getServletHandler().addListener(holder);
|
||||
|
|
|
@ -1147,7 +1147,7 @@ public class ServletHandler extends ScopedHandler
|
|||
if (_filterMappings.isEmpty())
|
||||
{
|
||||
_filterMappings.add(mapping);
|
||||
if (source == Source.JAVAX_API)
|
||||
if (source == Source.JAKARTA_API)
|
||||
_matchAfterIndex = 0;
|
||||
}
|
||||
else
|
||||
|
@ -1155,7 +1155,7 @@ public class ServletHandler extends ScopedHandler
|
|||
//there are existing entries. If this is a programmatic filtermapping, it is added at the end of the list.
|
||||
//If this is a normal filtermapping, it is inserted after all the other filtermappings (matchBefores and normals),
|
||||
//but before the first matchAfter filtermapping.
|
||||
if (Source.JAVAX_API == source)
|
||||
if (Source.JAKARTA_API == source)
|
||||
{
|
||||
_filterMappings.add(mapping);
|
||||
if (_matchAfterIndex < 0)
|
||||
|
@ -1193,12 +1193,12 @@ public class ServletHandler extends ScopedHandler
|
|||
if (_filterMappings.isEmpty())
|
||||
{
|
||||
_filterMappings.add(mapping);
|
||||
if (Source.JAVAX_API == source)
|
||||
if (Source.JAKARTA_API == source)
|
||||
_matchBeforeIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Source.JAVAX_API == source)
|
||||
if (Source.JAKARTA_API == source)
|
||||
{
|
||||
//programmatically defined filter mappings are prepended to mapping list in the order
|
||||
//in which they were defined. In other words, insert this mapping at the tail of the
|
||||
|
|
|
@ -972,7 +972,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentityScope,
|
|||
return clash;
|
||||
|
||||
//otherwise apply all of them
|
||||
ServletMapping mapping = new ServletMapping(Source.JAVAX_API);
|
||||
ServletMapping mapping = new ServletMapping(Source.JAKARTA_API);
|
||||
mapping.setServletName(ServletHolder.this.getName());
|
||||
mapping.setPathSpecs(urlPatterns);
|
||||
getServletHandler().addServletMapping(mapping);
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.jetty.util.resource.Resource;
|
|||
public class Source
|
||||
{
|
||||
public static final Source EMBEDDED = new Source(Origin.EMBEDDED);
|
||||
public static final Source JAVAX_API = new Source(Origin.JAKARTA_API);
|
||||
public static final Source JAKARTA_API = new Source(Origin.JAKARTA_API);
|
||||
|
||||
public enum Origin
|
||||
{
|
||||
|
|
|
@ -55,13 +55,13 @@ public class ServletHandlerTest
|
|||
FilterHolder fh2 = new FilterHolder(new Source(Source.Origin.DESCRIPTOR, "foo.xml"));
|
||||
FilterMapping fm2 = new FilterMapping();
|
||||
|
||||
FilterHolder fh3 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder fh3 = new FilterHolder(Source.JAKARTA_API);
|
||||
FilterMapping fm3 = new FilterMapping();
|
||||
|
||||
FilterHolder fh4 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder fh4 = new FilterHolder(Source.JAKARTA_API);
|
||||
FilterMapping fm4 = new FilterMapping();
|
||||
|
||||
FilterHolder fh5 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder fh5 = new FilterHolder(Source.JAKARTA_API);
|
||||
FilterMapping fm5 = new FilterMapping();
|
||||
|
||||
ServletHolder sh1 = new ServletHolder(new Source(Source.Origin.DESCRIPTOR, "foo.xml"));
|
||||
|
@ -538,7 +538,7 @@ public class ServletHandlerTest
|
|||
assertThat(mappings[4], is(fm3)); //isMatchAfter = true;
|
||||
|
||||
//add a programmatic one, isMatchAfter=true
|
||||
FilterHolder pf = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder pf = new FilterHolder(Source.JAKARTA_API);
|
||||
pf.setName("programmaticA");
|
||||
FilterMapping pfm = new FilterMapping();
|
||||
pfm.setFilterHolder(pf);
|
||||
|
@ -556,7 +556,7 @@ public class ServletHandlerTest
|
|||
assertThat(mappings[5], is(pfm)); //isMatchAfter = true;
|
||||
|
||||
//add a programmatic one, isMatchAfter=false
|
||||
FilterHolder pf2 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder pf2 = new FilterHolder(Source.JAKARTA_API);
|
||||
pf2.setName("programmaticB");
|
||||
FilterMapping pfm2 = new FilterMapping();
|
||||
pfm2.setFilterHolder(pf2);
|
||||
|
@ -638,7 +638,7 @@ public class ServletHandlerTest
|
|||
assertThat(mappings[4].getFilterHolder(), is(fh3)); //isMatchAfter = true;
|
||||
|
||||
//add a programmatic one, isMatchAfter=true
|
||||
FilterHolder pf = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder pf = new FilterHolder(Source.JAKARTA_API);
|
||||
pf.setServletHandler(handler);
|
||||
pf.setName("programmaticA");
|
||||
handler.addFilter(pf);
|
||||
|
@ -655,7 +655,7 @@ public class ServletHandlerTest
|
|||
assertThat(mappings[5].getFilterHolder(), is(pf)); //isMatchAfter = true;
|
||||
|
||||
//add a programmatic one, isMatchAfter=false
|
||||
FilterHolder pf2 = new FilterHolder(Source.JAVAX_API);
|
||||
FilterHolder pf2 = new FilterHolder(Source.JAKARTA_API);
|
||||
pf2.setServletHandler(handler);
|
||||
pf2.setName("programmaticB");
|
||||
handler.addFilter(pf2);
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ServletHolderTest
|
|||
@Test
|
||||
public void testInitParams() throws Exception
|
||||
{
|
||||
ServletHolder holder = new ServletHolder(Source.JAVAX_API);
|
||||
ServletHolder holder = new ServletHolder(Source.JAKARTA_API);
|
||||
ServletRegistration reg = holder.getRegistration();
|
||||
|
||||
assertThrows(IllegalArgumentException.class, () -> reg.setInitParameter(null, "foo"));
|
||||
|
|
Loading…
Reference in New Issue