Skip to content

Commit

Permalink
Move o.e.equinox.http.servlet.tests to Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
akurtakov committed Sep 30, 2023
1 parent f5e4f60 commit d3bf637
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion bundles/org.eclipse.equinox.http.servlet.tests/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src">
<attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand All @@ -27,6 +27,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
Expand Down Expand Up @@ -72,6 +73,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
Expand Down Expand Up @@ -110,8 +112,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-Name: org.eclipse.equinox.http.servlet.tests
Bundle-Vendor: Eclipse.org - Equinox
Bundle-SymbolicName: org.eclipse.equinox.http.servlet.tests
Bundle-Version: 1.8.500.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Eclipse-BundleShape: dir
Require-Bundle: org.junit;bundle-version="4.0",
org.apache.felix.scr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class TestFilter1 extends AbstractTestServlet {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerServlet(regexAlias(), this, null, null);
service.registerFilter(regexAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f1, new Hashtable<>(), null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public class TestFilter2 extends AbstractTestServlet {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerServlet(regexAlias(), this, null, null);
service.registerFilter(regexAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f1, new Hashtable<>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<>(), null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public class TestFilter3 extends AbstractTestServlet {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerServlet(regexAlias(), this, null, null);
service.registerFilter(regexAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f3, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f1, new Hashtable<>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<>(), null);
service.registerFilter(regexAlias(), f3, new Hashtable<>(), null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public class TestFilter4 extends AbstractTestServlet {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerServlet(regexAlias(), this, null, null);
service.registerFilter(regexAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f1, new Hashtable<>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<>(), null);
Hashtable<String, String> hashtable = new Hashtable<>();
hashtable.put("filter-priority", "1");
service.registerFilter(regexAlias(), f3, hashtable, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class TestFilter5 extends AbstractTestServlet {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerServlet(extensionAlias(), this, null, null);
service.registerFilter(extensionAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(extensionAlias(), f1, new Hashtable<>(), null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public class TestFilter6 extends AbstractTestServlet {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerServlet(extensionAlias(), this, null, null);
service.registerFilter(extensionAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(extensionAlias(), f2, new Hashtable<String, String>(), null);
service.registerFilter(extensionAlias(), f1, new Hashtable<>(), null);
service.registerFilter(extensionAlias(), f2, new Hashtable<>(), null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public class TestFilter7 extends AbstractTestServlet {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerServlet(extensionAlias(), this, null, null);
service.registerFilter(extensionAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(extensionAlias(), f2, new Hashtable<String, String>(), null);
service.registerFilter(extensionAlias(), f3, new Hashtable<String, String>(), null);
service.registerFilter(extensionAlias(), f1, new Hashtable<>(), null);
service.registerFilter(extensionAlias(), f2, new Hashtable<>(), null);
service.registerFilter(extensionAlias(), f3, new Hashtable<>(), null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public class TestFilter8 extends AbstractTestServlet {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerServlet(extensionAlias(), this, null, null);
service.registerFilter(extensionAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(extensionAlias(), f2, new Hashtable<String, String>(), null);
service.registerFilter(extensionAlias(), f1, new Hashtable<>(), null);
service.registerFilter(extensionAlias(), f2, new Hashtable<>(), null);
Hashtable<String, String> hashtable = new Hashtable<>();
hashtable.put("filter-priority", "1");
service.registerFilter(extensionAlias(), f3, hashtable, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.eclipse.equinox.http.servlet.ExtendedHttpService;
import org.eclipse.equinox.http.servlet.tests.tb.AbstractTestResource;
import org.eclipse.equinox.http.servlet.tests.util.BaseFilter;

import org.osgi.service.component.ComponentContext;
import org.osgi.service.http.NamespaceException;

Expand All @@ -35,9 +34,9 @@ public class TestResource2 extends AbstractTestResource {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerResources(regexAlias(), getName() , null);
service.registerFilter(regexAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f3, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f1, new Hashtable<>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<>(), null);
service.registerFilter(regexAlias(), f3, new Hashtable<>(), null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public class TestResource4 extends AbstractTestResource {
public void activate(ComponentContext componentContext) throws ServletException, NamespaceException {
ExtendedHttpService service = (ExtendedHttpService)getHttpService();
service.registerResources(regexAlias(), getName() , null);
service.registerFilter(regexAlias(), f1, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<String, String>(), null);
service.registerFilter(regexAlias(), f1, new Hashtable<>(), null);
service.registerFilter(regexAlias(), f2, new Hashtable<>(), null);
Hashtable<String, String> hashtable = new Hashtable<>();
hashtable.put("filter-priority", "1");
service.registerFilter(regexAlias(), f3, hashtable, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.Hashtable;
import java.util.concurrent.atomic.AtomicReference;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextListener;

import org.eclipse.equinox.http.servlet.testbase.BaseTest;
Expand All @@ -44,7 +43,7 @@ public void test_140_7_validation() {
Dictionary<String, Object> properties = new Hashtable<>();
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER, "true");
ServiceRegistration<?> sr = context.registerService(
ServletContextListener.class, new MockSCL(new AtomicReference<ServletContext>()), properties);
ServletContextListener.class, new MockSCL(new AtomicReference<>()), properties);
registrations.add(sr);

ListenerDTO listenerDTO = getListenerDTOByServiceId(DEFAULT, getServiceId(sr));
Expand Down

0 comments on commit d3bf637

Please sign in to comment.