Skip to content

Commit

Permalink
Cleanup warning
Browse files Browse the repository at this point in the history
- removed unnused imports
- removed other warnings

Signed-off-by: Mark Hoffmann <m.hoffmann@data-in-motion.biz>
  • Loading branch information
maho7791 committed Mar 20, 2024
1 parent cc6ac2b commit 3ac76b6
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 25 deletions.
2 changes: 0 additions & 2 deletions org.eclipse.osgitech.rest.bnd.library/bnd.bnd
Expand Up @@ -7,6 +7,4 @@ Provide-Capability: \
bnd.library;\
bnd.library = jakartaREST; \
path = library/workspace

-includeresource: {library=library}

Expand Up @@ -44,7 +44,6 @@
import org.osgi.service.cm.Configuration;
import org.osgi.service.jakartars.runtime.JakartarsServiceRuntime;
import org.osgi.service.jakartars.whiteboard.JakartarsWhiteboardConstants;
import org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants;
import org.osgi.test.common.annotation.InjectBundleContext;
import org.osgi.test.common.annotation.config.InjectConfiguration;
import org.osgi.test.common.annotation.config.WithFactoryConfiguration;
Expand Down Expand Up @@ -222,6 +221,9 @@ public void testServletWhiteboardDefaultContext(@InjectBundleContext BundleConte
properties.put(HTTP_WHITEBOARD_SERVLET_PATTERN, "/servlet");
properties.put(HTTP_WHITEBOARD_CONTEXT_SELECT, "(" + HTTP_WHITEBOARD_CONTEXT_NAME + "=" + HTTP_WHITEBOARD_DEFAULT_CONTEXT_NAME + ")");
ctx.registerService(Servlet.class, new HttpServlet() {
/** serialVersionUID */
private static final long serialVersionUID = 1L;

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
resp.getWriter().print("Hello Servlet");
Expand Down
10 changes: 5 additions & 5 deletions org.eclipse.osgitech.rest.servlet.whiteboard.tests/test.bndrun
Expand Up @@ -53,10 +53,6 @@
org.apache.felix.http.servlet-api;version='[2.1.0,2.1.1)',\
org.apache.felix.scr;version='[2.2.6,2.2.7)',\
org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\
org.eclipse.osgitech.rest;version='[1.0.0,1.0.1)',\
org.eclipse.osgitech.rest.servlet.whiteboard;version='[1.0.0,1.0.1)',\
org.eclipse.osgitech.rest.servlet.whiteboard.tests-tests;version='[1.0.0,1.0.1)',\
org.eclipse.osgitech.rest.sse;version='[1.0.0,1.0.1)',\
org.osgi.service.component;version='[1.5.1,1.5.2)',\
org.osgi.service.jakartars;version='[2.0.0,2.0.1)',\
org.osgi.test.common;version='[1.2.1,1.2.2)',\
Expand Down Expand Up @@ -84,4 +80,8 @@
junit-jupiter-api;version='[5.9.2,5.9.3)',\
junit-jupiter-params;version='[5.9.2,5.9.3)',\
junit-platform-commons;version='[1.9.2,1.9.3)',\
org.opentest4j;version='[1.2.0,1.2.1)'
org.opentest4j;version='[1.2.0,1.2.1)',\
org.eclipse.osgitech.rest;version='[1.2.3,1.2.4)',\
org.eclipse.osgitech.rest.servlet.whiteboard;version='[1.2.3,1.2.4)',\
org.eclipse.osgitech.rest.servlet.whiteboard.tests-tests;version='[1.2.3,1.2.4)',\
org.eclipse.osgitech.rest.sse;version='[1.2.3,1.2.4)'
6 changes: 6 additions & 0 deletions org.eclipse.osgitech.rest.servlet.whiteboard/pom.xml
Expand Up @@ -88,6 +88,11 @@
<artifactId>org.apache.aries.spifly.dynamic.framework.extension</artifactId>
<destFileName>org.apache.aries.spifly.dynamic.framework.extension.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<destFileName>slf4j-api.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Expand Down Expand Up @@ -131,6 +136,7 @@
<bundle>${project.build.directory}/bundles/org.apache.felix.scr.jar</bundle>
<bundle>${project.build.directory}/bundles/org.apache.felix.http.jetty.jar</bundle>
<bundle>${project.build.directory}/bundles/org.apache.aries.spifly.dynamic.framework.extension.jar</bundle>
<bundle>${project.build.directory}/bundles/slf4j-api.jar</bundle>
<bundle>${project.build.directory}/bundles/slf4j-simple.jar</bundle>
</bundles>
</configuration>
Expand Down
Expand Up @@ -16,7 +16,6 @@
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

import org.eclipse.osgitech.rest.provider.JerseyConstants;
import org.osgi.framework.BundleContext;
Expand Down Expand Up @@ -50,7 +49,6 @@
target = JerseyConstants.JERSEY_RUNTIME_CONDITION))
public class JakartarsServletWhiteboardRuntimeComponent {

private static Logger logger = Logger.getLogger(JakartarsServletWhiteboardRuntimeComponent.class.getName());
private BundleContext context;
private String target;
private String basePath;
Expand Down
Expand Up @@ -34,7 +34,6 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Logger;

import org.eclipse.osgitech.rest.annotations.ProvideRuntimeAdapter;
import org.eclipse.osgitech.rest.helper.JerseyHelper;
Expand All @@ -61,7 +60,6 @@
@RequireHttpWhiteboard
public class ServletWhiteboardBasedJerseyServiceRuntime {

private final Logger logger = Logger.getLogger(ServletWhiteboardBasedJerseyServiceRuntime.class.getName());
private final BundleContext context;
private final String basePath;
private final ServiceReference<HttpServiceRuntime> runtimeTarget;
Expand Down
Expand Up @@ -13,7 +13,6 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.util.Hashtable;
Expand Down
Expand Up @@ -16,34 +16,25 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.when;

import java.util.HashMap;
import java.util.Map;

import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.ext.MessageBodyReader;

import org.eclipse.osgitech.rest.resources.TestApplication;
import org.eclipse.osgitech.rest.resources.TestExtension;
import org.eclipse.osgitech.rest.resources.TestLegacyApplication;
import org.eclipse.osgitech.rest.resources.TestResource;
import org.eclipse.osgitech.rest.runtime.application.JerseyApplicationProvider;
import org.eclipse.osgitech.rest.runtime.application.JerseyExtensionProvider;
import org.eclipse.osgitech.rest.runtime.application.JerseyResourceProvider;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceObjects;
import org.osgi.service.jakartars.runtime.dto.BaseApplicationDTO;
import org.osgi.service.jakartars.runtime.dto.DTOConstants;
import org.osgi.service.jakartars.runtime.dto.FailedApplicationDTO;
import org.osgi.service.jakartars.whiteboard.JakartarsWhiteboardConstants;

import jakarta.ws.rs.core.Application;

/**
*
* @author Mark Hoffmann
Expand Down
Expand Up @@ -24,7 +24,6 @@
import java.io.IOException;
import java.util.Optional;

import org.eclipse.osgitech.rest.util.OptionalResponseFilter;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
Expand Down

0 comments on commit 3ac76b6

Please sign in to comment.