cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/4] cxf git commit: Fix checkstyle issues in samples
Date Wed, 23 Nov 2016 14:51:48 GMT
Repository: cxf
Updated Branches:
  refs/heads/master d9e2a6e72 -> 8fc9d7829


Fix checkstyle issues in samples


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

Branch: refs/heads/master
Commit: 8fc9d782901adddf874fe7c2f9500836a0585707
Parents: 54b7117
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Nov 23 09:39:03 2016 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Nov 23 09:51:40 2016 -0500

----------------------------------------------------------------------
 .../main/java/demo/jaxrs/server/SparkUtils.java | 10 ++++----
 .../java/demo/jaxrs/server/simple/Server.java   |  4 ++--
 .../jaxrs/server/simple/StreamingService.java   | 24 ++++++++++----------
 .../rs/service/SampleRestApplication.java       |  5 ++--
 .../registry/eureka/RegistryApplication.java    |  4 ++--
 .../sample/ws/SampleWsApplicationClient.java    |  4 +++-
 6 files changed, 27 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
index ff29627..98894b4 100644
--- a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
+++ b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
@@ -47,14 +47,14 @@ public final class SparkUtils {
     public static JavaPairDStream<String, Integer> createOutputDStream(
         JavaDStream<String> receiverStream, boolean withId) {
         final JavaDStream<String> words = 
-            receiverStream.flatMap(x -> (withId ? splitInputStringWithId(x) : splitInputString(x)));
+            receiverStream.flatMap(x -> withId ? splitInputStringWithId(x) : splitInputString(x));
             
         final JavaPairDStream<String, Integer> pairs = words.mapToPair(s -> {
-                    return new Tuple2<String, Integer>(s, 1);
-                });
+            return new Tuple2<String, Integer>(s, 1);
+        });
         return pairs.reduceByKey((i1, i2) -> {
-                    return i1 + i2;
-                });
+            return i1 + i2;
+        });
     }
     public static Iterator<String> splitInputString(String x) {
         List<String> list = new LinkedList<String>();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
index cbe4008..c1a49b2 100644
--- a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
+++ b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
@@ -29,8 +29,8 @@ public class Server {
         JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
         sf.setResourceClasses(StreamingService.class);
         
-        String receiverType = args.length == 1 && args[0].equals("-receiverType=queue")
?
-            "queue" : "string";
+        String receiverType = args.length == 1 && args[0].equals("-receiverType=queue")
+            ? "queue" : "string";
         sf.setResourceProvider(StreamingService.class, 
             new SingletonResourceProvider(new StreamingService(receiverType)));
         sf.setAddress("http://localhost:9000/spark");

http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
index 93dbfb8..ee2eade 100644
--- a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
+++ b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
@@ -124,13 +124,13 @@ public class StreamingService {
             
             JavaDStream<String> receiverStream = null;
             if ("queue".equals(receiverType)) {
-               Queue<JavaRDD<String>> rddQueue = new LinkedList<>();
-               for (int i = 0; i < 30; i++) {
-                   rddQueue.add(jssc.sparkContext().parallelize(inputStrings));
-               }
-               receiverStream = jssc.queueStream(rddQueue);
+                Queue<JavaRDD<String>> rddQueue = new LinkedList<>();
+                for (int i = 0; i < 30; i++) {
+                    rddQueue.add(jssc.sparkContext().parallelize(inputStrings));
+                }
+                receiverStream = jssc.queueStream(rddQueue);
             } else {
-               receiverStream = jssc.receiverStream(new StringListReceiver(inputStrings));
+                receiverStream = jssc.receiverStream(new StringListReceiver(inputStrings));
             }
             
             JavaPairDStream<String, Integer> wordCounts = SparkUtils.createOutputDStream(receiverStream,
false);
@@ -156,13 +156,13 @@ public class StreamingService {
             
             JavaDStream<String> receiverStream = null;
             if ("queue".equals(receiverType)) {
-               Queue<JavaRDD<String>> rddQueue = new LinkedList<>();
-               for (int i = 0; i < 30; i++) {
-                   rddQueue.add(jssc.sparkContext().parallelize(inputStrings));
-               }
-               receiverStream = jssc.queueStream(rddQueue);
+                Queue<JavaRDD<String>> rddQueue = new LinkedList<>();
+                for (int i = 0; i < 30; i++) {
+                    rddQueue.add(jssc.sparkContext().parallelize(inputStrings));
+                }
+                receiverStream = jssc.queueStream(rddQueue);
             } else {
-               receiverStream = jssc.receiverStream(new StringListReceiver(inputStrings));
+                receiverStream = jssc.receiverStream(new StringListReceiver(inputStrings));
             }
             
             JavaPairDStream<String, Integer> wordCounts = SparkUtils.createOutputDStream(receiverStream,
false);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/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 e146a7f..35bf34a 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
@@ -19,6 +19,8 @@
 package sample.rs.service;
 import java.util.Collections;
 
+import com.codahale.metrics.MetricRegistry;
+
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.actuate.endpoint.MetricReaderPublicMetrics;
 import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
@@ -27,13 +29,12 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.context.annotation.Bean;
 
-import com.codahale.metrics.MetricRegistry;
 
 @SpringBootApplication
 @EnableEurekaClient
 public class SampleRestApplication {
     @Bean
-    public MetricRegistry metricRegistry(){
+    public MetricRegistry metricRegistry() {
         return new MetricRegistry();
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/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 0cbdc6e..b38ed90 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
@@ -22,12 +22,12 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
 
+//CHECKSTYLE:OFF
 @SpringBootApplication
 @EnableEurekaServer
-//CHECKSTYLE:OFF
 public class RegistryApplication {
-//CHECKSTYLE:ON    
     public static void main(String[] args) {
         SpringApplication.run(RegistryApplication.class, args);
     }
 }
+//CHECKSTYLE:ON

http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
b/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
index 76f4611..15ea971 100644
--- a/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
+++ b/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
@@ -24,8 +24,8 @@ import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
 
+//CHECKSTYLE:OFF
 public class SampleWsApplicationClient {
-
  
     public static void main(String[] args) {
         String address = "http://localhost:8080/Service/Hello";
@@ -44,3 +44,5 @@ public class SampleWsApplicationClient {
     }
 
 }
+//CHECKSTYLE:ON
+


Mime
View raw message