You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2021/04/07 04:30:30 UTC

[tomee] 02/04: Reformatted

This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit b6eecb3f4bf449cad1d68487ba3fae0f6e5efa1f
Author: David Blevins <da...@gmail.com>
AuthorDate: Tue Apr 6 21:25:52 2021 -0700

    Reformatted
---
 .../openejb/server/cxf/rs/CxfRsHttpListener.java   | 26 +++++++++++-----------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
index 1a79dd2..1fd8819 100644
--- a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
+++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
@@ -39,8 +39,8 @@ import org.apache.cxf.jaxrs.model.ProviderInfo;
 import org.apache.cxf.jaxrs.provider.ProviderFactory;
 import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
 import org.apache.cxf.jaxrs.sse.SseContextProvider;
-import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.jaxrs.validation.JAXRSBeanValidationInInterceptor;
 import org.apache.cxf.jaxrs.validation.JAXRSBeanValidationOutInterceptor;
 import org.apache.cxf.jaxrs.validation.ValidationExceptionMapper;
@@ -119,8 +119,8 @@ import javax.ws.rs.client.ClientRequestFilter;
 import javax.ws.rs.core.Application;
 import javax.ws.rs.core.Configuration;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.ext.ExceptionMapper;
 import javax.ws.rs.ext.MessageBodyReader;
@@ -299,7 +299,7 @@ public class CxfRsHttpListener implements RsHttpListener {
         }
         if (pathInfo.endsWith("/") || pathInfo.isEmpty()) { // root of path is redirected to welcomefiles
             if (pathInfo.endsWith("/")) {
-              pathInfo = pathInfo.substring(0, pathInfo.length() - 1);
+                pathInfo = pathInfo.substring(0, pathInfo.length() - 1);
             }
             for (final String n : welcomeFiles) {
                 final InputStream is = request.getServletContext().getResourceAsStream(pathInfo + n);
@@ -343,16 +343,16 @@ public class CxfRsHttpListener implements RsHttpListener {
         }
         return true;
     }
-        
+
     private Application findApplication() {
         try {
-            ApplicationInfo appInfo = (ApplicationInfo)server.getEndpoint().get(Application.class.getName());
-            return (Application)appInfo.getProvider();
+            ApplicationInfo appInfo = (ApplicationInfo) server.getEndpoint().get(Application.class.getName());
+            return (Application) appInfo.getProvider();
         } catch (final Exception e) {
         }
         return null;
     }
-    
+
     private boolean applicationProvidesResources(final Application application) {
         try {
             if (application == null) {
@@ -366,14 +366,14 @@ public class CxfRsHttpListener implements RsHttpListener {
             return false;
         }
     }
-    
+
     public boolean isCXFResource(final HttpServletRequest request) {
         try {
             Application application = findApplication();
             if (!applicationProvidesResources(application)) {
-                JAXRSServiceImpl service = (JAXRSServiceImpl)server.getEndpoint().getService();
+                JAXRSServiceImpl service = (JAXRSServiceImpl) server.getEndpoint().getService();
 
-                if( service == null ) {
+                if (service == null) {
                     return false;
                 }
 
@@ -384,7 +384,7 @@ public class CxfRsHttpListener implements RsHttpListener {
                     if (info.getResourceClass() == null || info.getURITemplate() == null) { // possible?
                         continue;
                     }
-                   
+
                     final MultivaluedMap<String, String> parameters = new MultivaluedHashMap<>();
                     if (info.getURITemplate().match(pathToMatch, parameters)) {
                         return true;
@@ -591,8 +591,8 @@ public class CxfRsHttpListener implements RsHttpListener {
             instances.add(new ValidationExceptionMapper());
             final String level = SystemInstance.get()
                     .getProperty(
-                        "openejb.cxf.rs.bval.log.level",
-                        serviceConfiguration.getProperties().getProperty(CXF_JAXRS_PREFIX + "bval.log.level"));
+                            "openejb.cxf.rs.bval.log.level",
+                            serviceConfiguration.getProperties().getProperty(CXF_JAXRS_PREFIX + "bval.log.level"));
             if (level != null) {
                 try {
                     LogUtils.getL7dLogger(ValidationExceptionMapper.class).setLevel(Level.parse(level));