You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2016/07/25 20:28:48 UTC

[4/4] cxf git commit: Fixing many checkstyle violations for the sample projects

Fixing many checkstyle violations for the sample projects


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/20a4f79a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/20a4f79a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/20a4f79a

Branch: refs/heads/3.1.x-fixes
Commit: 20a4f79a791cbdb5defe6a1c4c30b258c54d0fde
Parents: d2f8f79
Author: reta <dr...@gmail.com>
Authored: Tue May 10 21:33:07 2016 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Mon Jul 25 16:28:33 2016 -0400

----------------------------------------------------------------------
 .../colocated/client/DispatchSourceClient.java  |  2 +-
 .../rs/service/SampleRestApplication.java       | 34 ++++++++++----------
 .../registry/eureka/RegistryApplication.java    | 18 +++++++++++
 .../src/main/java/demo/jaxrs/client/Client.java |  4 +--
 .../java/demo/jaxrs/server/CustomerService.java | 13 ++++----
 .../java/demo/jaxrs/server/CustomerService.java | 13 ++++----
 .../java/demo/jaxrs/server/CustomerService.java | 13 ++++----
 7 files changed, 59 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/20a4f79a/distribution/src/main/release/samples/in_jvm_transport/src/main/java/demo/colocated/client/DispatchSourceClient.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/in_jvm_transport/src/main/java/demo/colocated/client/DispatchSourceClient.java b/distribution/src/main/release/samples/in_jvm_transport/src/main/java/demo/colocated/client/DispatchSourceClient.java
index 181b931..32a2811 100755
--- a/distribution/src/main/release/samples/in_jvm_transport/src/main/java/demo/colocated/client/DispatchSourceClient.java
+++ b/distribution/src/main/release/samples/in_jvm_transport/src/main/java/demo/colocated/client/DispatchSourceClient.java
@@ -125,7 +125,7 @@ public final class DispatchSourceClient {
         String elementName;
         boolean recording;
         
-        public ContentHandler(String namespaceURI, String elementName) {
+        ContentHandler(String namespaceURI, String elementName) {
             this.namespaceURI = namespaceURI;
             this.elementName = elementName;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/20a4f79a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
index f622a43..db47c2f 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
@@ -36,27 +36,27 @@ public class SampleRestApplication {
     @Bean
     @ExportMetricWriter
     public MetricWriter metricWriter() {
-            return new MetricWriter() {
+        return new MetricWriter() {
 
-                @Override
-                public void set(Metric<?> arg0) {
-                    // TODO Auto-generated method stub
-                    
-                }
+            @Override
+            public void set(Metric<?> arg0) {
+                // TODO Auto-generated method stub
+                
+            }
 
-                @Override
-                public void increment(Delta<?> arg0) {
-                    // TODO Auto-generated method stub
-                    
-                }
+            @Override
+            public void increment(Delta<?> arg0) {
+                // TODO Auto-generated method stub
+                
+            }
 
-                @Override
-                public void reset(String arg0) {
-                    // TODO Auto-generated method stub
-                    
-                }
+            @Override
+            public void reset(String arg0) {
+                // TODO Auto-generated method stub
                 
-            };
+            }
+            
+        };
     }
     
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/20a4f79a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
index bed6961..a481fae 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package registry.eureka;
 
 import org.springframework.boot.SpringApplication;

http://git-wip-us.apache.org/repos/asf/cxf/blob/20a4f79a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java
index 1b91019..10e3917 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java
+++ b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java
@@ -19,14 +19,14 @@
 
 package demo.jaxrs.client;
 
-import demo.jaxrs.server.Server;
-
 import java.io.InputStream;
 import java.util.List;
 
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.io.CachedOutputStream;
 
+import demo.jaxrs.server.Server;
+
 public final class Client {
 
     private Client() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/20a4f79a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
index 605fa8b..ac765a2 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
+++ b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
@@ -147,7 +147,7 @@ public class CustomerService {
     @Path("/monitor2")
     @Produces("text/*")
     public void monitorCustomers2(
-            final @javax.ws.rs.core.Context HttpServletResponse httpResponse,
+            @javax.ws.rs.core.Context final HttpServletResponse httpResponse,
             @HeaderParam(WebSocketConstants.DEFAULT_REQUEST_ID_KEY) String reqid) {
         final String key = reqid == null ? "*" : reqid; 
         monitors2.put(key, new WriterHolder(httpResponse, MAX_ERROR_COUNT));
@@ -199,7 +199,8 @@ public class CustomerService {
                             }
                         }
                     }
-                    for (Iterator<WriterHolder<HttpServletResponse>> it = monitors2.values().iterator(); it.hasNext();) {
+                    for (Iterator<WriterHolder<HttpServletResponse>> it = monitors2.values().iterator(); 
+                            it.hasNext();) {
                         WriterHolder<HttpServletResponse> wh = it.next();
                         try {
                             wh.getValue().getOutputStream().write(t.getBytes());
@@ -246,11 +247,11 @@ public class CustomerService {
     }
 
     private static class WriterHolder<T> {
-        final private T value;
-        final private int max; 
-        final private AtomicInteger errorCount;
+        private final T value;
+        private final int max; 
+        private final AtomicInteger errorCount;
 
-        public WriterHolder(T object, int max) {
+        WriterHolder(T object, int max) {
             this.value = object;
             this.max = max;
             this.errorCount = new AtomicInteger();

http://git-wip-us.apache.org/repos/asf/cxf/blob/20a4f79a/distribution/src/main/release/samples/jax_rs/websocket_osgi/src/main/java/demo/jaxrs/server/CustomerService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/websocket_osgi/src/main/java/demo/jaxrs/server/CustomerService.java b/distribution/src/main/release/samples/jax_rs/websocket_osgi/src/main/java/demo/jaxrs/server/CustomerService.java
index 605fa8b..ac765a2 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket_osgi/src/main/java/demo/jaxrs/server/CustomerService.java
+++ b/distribution/src/main/release/samples/jax_rs/websocket_osgi/src/main/java/demo/jaxrs/server/CustomerService.java
@@ -147,7 +147,7 @@ public class CustomerService {
     @Path("/monitor2")
     @Produces("text/*")
     public void monitorCustomers2(
-            final @javax.ws.rs.core.Context HttpServletResponse httpResponse,
+            @javax.ws.rs.core.Context final HttpServletResponse httpResponse,
             @HeaderParam(WebSocketConstants.DEFAULT_REQUEST_ID_KEY) String reqid) {
         final String key = reqid == null ? "*" : reqid; 
         monitors2.put(key, new WriterHolder(httpResponse, MAX_ERROR_COUNT));
@@ -199,7 +199,8 @@ public class CustomerService {
                             }
                         }
                     }
-                    for (Iterator<WriterHolder<HttpServletResponse>> it = monitors2.values().iterator(); it.hasNext();) {
+                    for (Iterator<WriterHolder<HttpServletResponse>> it = monitors2.values().iterator(); 
+                            it.hasNext();) {
                         WriterHolder<HttpServletResponse> wh = it.next();
                         try {
                             wh.getValue().getOutputStream().write(t.getBytes());
@@ -246,11 +247,11 @@ public class CustomerService {
     }
 
     private static class WriterHolder<T> {
-        final private T value;
-        final private int max; 
-        final private AtomicInteger errorCount;
+        private final T value;
+        private final int max; 
+        private final AtomicInteger errorCount;
 
-        public WriterHolder(T object, int max) {
+        WriterHolder(T object, int max) {
             this.value = object;
             this.max = max;
             this.errorCount = new AtomicInteger();

http://git-wip-us.apache.org/repos/asf/cxf/blob/20a4f79a/distribution/src/main/release/samples/jax_rs/websocket_web/src/main/java/demo/jaxrs/server/CustomerService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/websocket_web/src/main/java/demo/jaxrs/server/CustomerService.java b/distribution/src/main/release/samples/jax_rs/websocket_web/src/main/java/demo/jaxrs/server/CustomerService.java
index 605fa8b..ac765a2 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket_web/src/main/java/demo/jaxrs/server/CustomerService.java
+++ b/distribution/src/main/release/samples/jax_rs/websocket_web/src/main/java/demo/jaxrs/server/CustomerService.java
@@ -147,7 +147,7 @@ public class CustomerService {
     @Path("/monitor2")
     @Produces("text/*")
     public void monitorCustomers2(
-            final @javax.ws.rs.core.Context HttpServletResponse httpResponse,
+            @javax.ws.rs.core.Context final HttpServletResponse httpResponse,
             @HeaderParam(WebSocketConstants.DEFAULT_REQUEST_ID_KEY) String reqid) {
         final String key = reqid == null ? "*" : reqid; 
         monitors2.put(key, new WriterHolder(httpResponse, MAX_ERROR_COUNT));
@@ -199,7 +199,8 @@ public class CustomerService {
                             }
                         }
                     }
-                    for (Iterator<WriterHolder<HttpServletResponse>> it = monitors2.values().iterator(); it.hasNext();) {
+                    for (Iterator<WriterHolder<HttpServletResponse>> it = monitors2.values().iterator(); 
+                            it.hasNext();) {
                         WriterHolder<HttpServletResponse> wh = it.next();
                         try {
                             wh.getValue().getOutputStream().write(t.getBytes());
@@ -246,11 +247,11 @@ public class CustomerService {
     }
 
     private static class WriterHolder<T> {
-        final private T value;
-        final private int max; 
-        final private AtomicInteger errorCount;
+        private final T value;
+        private final int max; 
+        private final AtomicInteger errorCount;
 
-        public WriterHolder(T object, int max) {
+        WriterHolder(T object, int max) {
             this.value = object;
             this.max = max;
             this.errorCount = new AtomicInteger();