You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by zi...@apache.org on 2022/12/13 10:26:28 UTC

[streampipes] branch dev updated: Enable checkstyle for streampipes-dataformat-*

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

zike pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new be6fa8d1d Enable checkstyle for streampipes-dataformat-*
     new 5602010f1 Merge pull request #864 from RobertIndie/iss-820-2
be6fa8d1d is described below

commit be6fa8d1d367d6f7c4c7ce47b108e92abb68d62c
Author: Zike Yang <zi...@apache.org>
AuthorDate: Mon Dec 12 21:16:08 2022 +0800

    Enable checkstyle for streampipes-dataformat-*
---
 streampipes-dataformat-cbor/pom.xml                    | 13 +++++++++++--
 .../dataformat/cbor/CborDataFormatDefinition.java      |  5 +++--
 streampipes-dataformat-fst/pom.xml                     | 13 +++++++++++--
 .../dataformat/fst/FstDataFormatDefinition.java        |  3 ++-
 streampipes-dataformat-json/pom.xml                    | 14 ++++++++++++--
 .../dataformat/json/JsonDataFormatDefinition.java      |  5 +++--
 streampipes-dataformat-smile/pom.xml                   | 13 +++++++++++--
 .../dataformat/smile/SmileDataFormatDefinition.java    |  5 +++--
 streampipes-dataformat/pom.xml                         | 14 ++++++++++++--
 .../streampipes/dataformat/SpDataFormatManager.java    | 18 +++++++++---------
 10 files changed, 77 insertions(+), 26 deletions(-)

diff --git a/streampipes-dataformat-cbor/pom.xml b/streampipes-dataformat-cbor/pom.xml
index c626e6a26..5d146c30a 100644
--- a/streampipes-dataformat-cbor/pom.xml
+++ b/streampipes-dataformat-cbor/pom.xml
@@ -17,7 +17,8 @@
   ~
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>streampipes-parent</artifactId>
         <groupId>org.apache.streampipes</groupId>
@@ -47,5 +48,13 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/streampipes-dataformat-cbor/src/main/java/org/apache/streampipes/dataformat/cbor/CborDataFormatDefinition.java b/streampipes-dataformat-cbor/src/main/java/org/apache/streampipes/dataformat/cbor/CborDataFormatDefinition.java
index f96a2e7c5..95464b59e 100644
--- a/streampipes-dataformat-cbor/src/main/java/org/apache/streampipes/dataformat/cbor/CborDataFormatDefinition.java
+++ b/streampipes-dataformat-cbor/src/main/java/org/apache/streampipes/dataformat/cbor/CborDataFormatDefinition.java
@@ -17,11 +17,12 @@
  */
 package org.apache.streampipes.dataformat.cbor;
 
+import org.apache.streampipes.commons.exceptions.SpRuntimeException;
+import org.apache.streampipes.dataformat.SpDataFormatDefinition;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.dataformat.cbor.CBORFactory;
-import org.apache.streampipes.commons.exceptions.SpRuntimeException;
-import org.apache.streampipes.dataformat.SpDataFormatDefinition;
 
 import java.io.IOException;
 import java.util.HashMap;
diff --git a/streampipes-dataformat-fst/pom.xml b/streampipes-dataformat-fst/pom.xml
index 42956f496..539805b41 100644
--- a/streampipes-dataformat-fst/pom.xml
+++ b/streampipes-dataformat-fst/pom.xml
@@ -17,7 +17,8 @@
   ~
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>streampipes-parent</artifactId>
         <groupId>org.apache.streampipes</groupId>
@@ -47,5 +48,13 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/streampipes-dataformat-fst/src/main/java/org/apache/streampipes/dataformat/fst/FstDataFormatDefinition.java b/streampipes-dataformat-fst/src/main/java/org/apache/streampipes/dataformat/fst/FstDataFormatDefinition.java
index fdb9a086d..39095143f 100644
--- a/streampipes-dataformat-fst/src/main/java/org/apache/streampipes/dataformat/fst/FstDataFormatDefinition.java
+++ b/streampipes-dataformat-fst/src/main/java/org/apache/streampipes/dataformat/fst/FstDataFormatDefinition.java
@@ -17,10 +17,11 @@
  */
 package org.apache.streampipes.dataformat.fst;
 
-import org.nustaq.serialization.FSTConfiguration;
 import org.apache.streampipes.commons.exceptions.SpRuntimeException;
 import org.apache.streampipes.dataformat.SpDataFormatDefinition;
 
+import org.nustaq.serialization.FSTConfiguration;
+
 import java.util.Map;
 
 public class FstDataFormatDefinition implements SpDataFormatDefinition {
diff --git a/streampipes-dataformat-json/pom.xml b/streampipes-dataformat-json/pom.xml
index f82f44c2c..eac5e54ef 100644
--- a/streampipes-dataformat-json/pom.xml
+++ b/streampipes-dataformat-json/pom.xml
@@ -17,7 +17,8 @@
   ~
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>streampipes-parent</artifactId>
         <groupId>org.apache.streampipes</groupId>
@@ -55,4 +56,13 @@
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/streampipes-dataformat-json/src/main/java/org/apache/streampipes/dataformat/json/JsonDataFormatDefinition.java b/streampipes-dataformat-json/src/main/java/org/apache/streampipes/dataformat/json/JsonDataFormatDefinition.java
index 12a55c158..f3bbacaf0 100644
--- a/streampipes-dataformat-json/src/main/java/org/apache/streampipes/dataformat/json/JsonDataFormatDefinition.java
+++ b/streampipes-dataformat-json/src/main/java/org/apache/streampipes/dataformat/json/JsonDataFormatDefinition.java
@@ -18,11 +18,12 @@
 
 package org.apache.streampipes.dataformat.json;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.streampipes.commons.exceptions.SpRuntimeException;
 import org.apache.streampipes.dataformat.SpDataFormatDefinition;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
diff --git a/streampipes-dataformat-smile/pom.xml b/streampipes-dataformat-smile/pom.xml
index 112824945..6cc7b516a 100644
--- a/streampipes-dataformat-smile/pom.xml
+++ b/streampipes-dataformat-smile/pom.xml
@@ -17,7 +17,8 @@
   ~
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>streampipes-parent</artifactId>
         <groupId>org.apache.streampipes</groupId>
@@ -47,5 +48,13 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/streampipes-dataformat-smile/src/main/java/org/apache/streampipes/dataformat/smile/SmileDataFormatDefinition.java b/streampipes-dataformat-smile/src/main/java/org/apache/streampipes/dataformat/smile/SmileDataFormatDefinition.java
index 414b90fe0..6c6bbdf26 100644
--- a/streampipes-dataformat-smile/src/main/java/org/apache/streampipes/dataformat/smile/SmileDataFormatDefinition.java
+++ b/streampipes-dataformat-smile/src/main/java/org/apache/streampipes/dataformat/smile/SmileDataFormatDefinition.java
@@ -17,11 +17,12 @@
  */
 package org.apache.streampipes.dataformat.smile;
 
+import org.apache.streampipes.commons.exceptions.SpRuntimeException;
+import org.apache.streampipes.dataformat.SpDataFormatDefinition;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.dataformat.smile.SmileFactory;
-import org.apache.streampipes.commons.exceptions.SpRuntimeException;
-import org.apache.streampipes.dataformat.SpDataFormatDefinition;
 
 import java.io.IOException;
 import java.util.HashMap;
diff --git a/streampipes-dataformat/pom.xml b/streampipes-dataformat/pom.xml
index b012687e1..f796f85f0 100644
--- a/streampipes-dataformat/pom.xml
+++ b/streampipes-dataformat/pom.xml
@@ -17,7 +17,8 @@
   ~
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>streampipes-parent</artifactId>
         <groupId>org.apache.streampipes</groupId>
@@ -36,4 +37,13 @@
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/streampipes-dataformat/src/main/java/org/apache/streampipes/dataformat/SpDataFormatManager.java b/streampipes-dataformat/src/main/java/org/apache/streampipes/dataformat/SpDataFormatManager.java
index 83fc001bb..342a9b40d 100644
--- a/streampipes-dataformat/src/main/java/org/apache/streampipes/dataformat/SpDataFormatManager.java
+++ b/streampipes-dataformat/src/main/java/org/apache/streampipes/dataformat/SpDataFormatManager.java
@@ -45,15 +45,15 @@ public enum SpDataFormatManager {
   public Optional<SpDataFormatDefinition> findDefinition(TransportFormat transportFormat) {
     // TODO why is transportFormat.getRdfType a list?
     return this.availableDataFormats
-            .stream()
-            .filter
-                    (adf -> transportFormat
-                            .getRdfType()
-                            .stream()
-                            .anyMatch(tf -> tf.toString().equals(adf
-                                    .getTransportFormatRdfUri())))
-            .map(SpDataFormatFactory::createInstance)
-            .findFirst();
+        .stream()
+        .filter
+            (adf -> transportFormat
+                .getRdfType()
+                .stream()
+                .anyMatch(tf -> tf.toString().equals(adf
+                    .getTransportFormatRdfUri())))
+        .map(SpDataFormatFactory::createInstance)
+        .findFirst();
 
   }