nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From exceptionfact...@apache.org
Subject [nifi] branch main updated: NIFI-8624 Updated Maven archetypes to conform to SonarQube standards
Date Tue, 29 Jun 2021 01:48:45 GMT
This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 70d8fe8  NIFI-8624 Updated Maven archetypes to conform to SonarQube standards
70d8fe8 is described below

commit 70d8fe8e0032e27eace5d82e5cdbe389e533b00e
Author: Lockie Richter <lockie.richter@capgemini.com>
AuthorDate: Fri May 21 15:16:18 2021 +0930

    NIFI-8624 Updated Maven archetypes to conform to SonarQube standards
    
    This closes #5092
    
    Signed-off-by: David Handermann <exceptionfactory@apache.org>
---
 .../src/main/java/MyProcessor.java                             | 10 +++++-----
 .../nifi-__artifactBaseName__-api/src/main/java/MyService.java |  2 +-
 .../src/main/java/StandardMyService.java                       |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/java/MyProcessor.java
b/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/java/MyProcessor.java
index 14fbbff..e1c339e 100644
--- a/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/java/MyProcessor.java
+++ b/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/java/MyProcessor.java
@@ -66,13 +66,13 @@ public class MyProcessor extends AbstractProcessor {
 
     @Override
     protected void init(final ProcessorInitializationContext context) {
-        final List<PropertyDescriptor> descriptors = new ArrayList<>();
+        descriptors = new ArrayList<>();
         descriptors.add(MY_PROPERTY);
-        this.descriptors = Collections.unmodifiableList(descriptors);
+        descriptors = Collections.unmodifiableList(descriptors);
 
-        final Set<Relationship> relationships = new HashSet<>();
+        relationships = new HashSet<>();
         relationships.add(MY_RELATIONSHIP);
-        this.relationships = Collections.unmodifiableSet(relationships);
+        relationships = Collections.unmodifiableSet(relationships);
     }
 
     @Override
@@ -91,7 +91,7 @@ public class MyProcessor extends AbstractProcessor {
     }
 
     @Override
-    public void onTrigger(final ProcessContext context, final ProcessSession session) throws
ProcessException {
+    public void onTrigger(final ProcessContext context, final ProcessSession session) {
         FlowFile flowFile = session.get();
         if ( flowFile == null ) {
             return;
diff --git a/nifi-maven-archetypes/nifi-service-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-api/src/main/java/MyService.java
b/nifi-maven-archetypes/nifi-service-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-api/src/main/java/MyService.java
index df58f5e..325a8dc 100644
--- a/nifi-maven-archetypes/nifi-service-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-api/src/main/java/MyService.java
+++ b/nifi-maven-archetypes/nifi-service-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-api/src/main/java/MyService.java
@@ -25,6 +25,6 @@ import org.apache.nifi.processor.exception.ProcessException;
 @CapabilityDescription("Example Service API.")
 public interface MyService extends ControllerService {
 
-    public void execute()  throws ProcessException;
+    public void execute();
 
 }
diff --git a/nifi-maven-archetypes/nifi-service-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__/src/main/java/StandardMyService.java
b/nifi-maven-archetypes/nifi-service-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__/src/main/java/StandardMyService.java
index 71473ea..2c94a91 100644
--- a/nifi-maven-archetypes/nifi-service-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__/src/main/java/StandardMyService.java
+++ b/nifi-maven-archetypes/nifi-service-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__/src/main/java/StandardMyService.java
@@ -73,7 +73,7 @@ public class StandardMyService extends AbstractControllerService implements
MySe
     }
 
     @Override
-    public void execute() throws ProcessException {
+    public void execute() {
 
     }
 

Mime
View raw message