NIFI-6362 - Upgraded com.puppycrawl.tools:checkstyle to 8.18. Made small checkstyle changes to nifi-kafka.

NIFI-6362 - Upgraded both checkstyle plugins to latest. Added a checkstyleCache file and property.

NIFI-6362 - Downgraded maven-checkstyle-plugin to 3.0.0 instead as there was an issue with the latest version and @throws Javadoc checkstyle module. Fixed some checkstyle issues. Changed checkstyleCache file to .checkstyleCache. Added to .gitignore.

NIFI-6362 - Changed checkstyleCache file location into target/, and is no longer a hidden file. Removed .checkstyleCache from .gitignore as it is no longer required.

NIFI-6362 - Grep pattern no longer required.

This closes #3522.

Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
This commit is contained in:
thenatog 2019-06-06 18:15:49 -04:00 committed by Koji Kawamura
parent aab3af4b71
commit 0e1a37fcb9
No known key found for this signature in database
GPG Key ID: 36136B0EC89E4758
10 changed files with 19 additions and 14 deletions

View File

@ -35,7 +35,7 @@ public interface AtlasAuthN {
* Populate required Atlas application properties.
* This method is called when Atlas reporting task generates atlas-application.properties.
*/
default void populateProperties(final Properties properties){};
default void populateProperties(final Properties properties){}
default Optional<ValidationResult> validateRequiredField(ValidationContext context, PropertyDescriptor prop) {
if (!context.getProperty(prop).isSet()) {

View File

@ -22,6 +22,8 @@ import java.util.Map;
import java.util.Set;
import org.apache.nifi.authorization.user.NiFiUser;
import org.apache.nifi.cluster.manager.exception.ConnectingNodeMutableRequestException;
import org.apache.nifi.cluster.manager.exception.DisconnectedNodeMutableRequestException;
import org.apache.nifi.cluster.protocol.NodeIdentifier;
public interface RequestReplicator {

View File

@ -74,7 +74,7 @@ public interface ServerProtocol extends VersionedRemoteResource {
* @param peer peer
* @return the codec to use
* @throws IOException ioe
* @throws org.apache.nifi.remote.exception.ProtocolException pe
* @throws ProtocolException pe
*/
FlowFileCodec negotiateCodec(Peer peer) throws IOException, ProtocolException;
@ -90,7 +90,7 @@ public interface ServerProtocol extends VersionedRemoteResource {
* @param peer peer
* @return the RequestType that the peer would like to happen - or null, if
* no data available
* @throws java.io.IOException ioe
* @throws IOException ioe
*/
RequestType getRequestType(Peer peer) throws IOException;
@ -103,8 +103,8 @@ public interface ServerProtocol extends VersionedRemoteResource {
* @param codec codec
*
* @return the number of FlowFiles transferred
* @throws java.io.IOException ioe
* @throws org.apache.nifi.remote.exception.ProtocolException pe
* @throws IOException ioe
* @throws ProtocolException pe
*/
int transferFlowFiles(Peer peer, ProcessContext context, ProcessSession session, FlowFileCodec codec) throws IOException, ProtocolException;
@ -137,7 +137,7 @@ public interface ServerProtocol extends VersionedRemoteResource {
* @param clusterNodeInfo the cluster information
* @param self the node which received the request
*
* @throws java.io.IOException ioe
* @throws IOException ioe
*/
void sendPeerList(
Peer peer,

View File

@ -20,6 +20,7 @@ package org.apache.nifi.web.api.concurrent;
import java.util.function.Consumer;
import org.apache.nifi.authorization.user.NiFiUser;
import org.apache.nifi.web.ResourceNotFoundException;
public interface RequestManager<T> {

View File

@ -270,7 +270,7 @@ final class KafkaProcessorUtils {
final boolean knownValue = KafkaProcessorUtils.isStaticStringFieldNamePresent(subject, classType, CommonClientConfigs.class, SslConfigs.class, SaslConfigs.class);
return new ValidationResult.Builder().subject(subject).explanation("Must be a known configuration parameter for this kafka client").valid(knownValue).build();
}
};
}
/**
* Builds transit URI for provenance event. The transit URI will be in the

View File

@ -272,7 +272,7 @@ final class KafkaProcessorUtils {
final boolean knownValue = KafkaProcessorUtils.isStaticStringFieldNamePresent(subject, classType, CommonClientConfigs.class, SslConfigs.class, SaslConfigs.class);
return new ValidationResult.Builder().subject(subject).explanation("Must be a known configuration parameter for this kafka client").valid(knownValue).build();
}
};
}
/**
* Builds transit URI for provenance event. The transit URI will be in the

View File

@ -193,7 +193,7 @@ final class KafkaProcessorUtils {
final boolean knownValue = KafkaProcessorUtils.isStaticStringFieldNamePresent(subject, classType, CommonClientConfigs.class, SslConfigs.class, SaslConfigs.class);
return new ValidationResult.Builder().subject(subject).explanation("Must be a known configuration parameter for this kafka client").valid(knownValue).build();
}
};
}
/**
* Builds transit URI for provenance event. The transit URI will be in the

View File

@ -272,7 +272,7 @@ final class KafkaProcessorUtils {
final boolean knownValue = KafkaProcessorUtils.isStaticStringFieldNamePresent(subject, classType, CommonClientConfigs.class, SslConfigs.class, SaslConfigs.class);
return new ValidationResult.Builder().subject(subject).explanation("Must be a known configuration parameter for this kafka client").valid(knownValue).build();
}
};
}
/**
* Builds transit URI for provenance event. The transit URI will be in the

View File

@ -272,7 +272,7 @@ final class KafkaProcessorUtils {
final boolean knownValue = KafkaProcessorUtils.isStaticStringFieldNamePresent(subject, classType, CommonClientConfigs.class, SslConfigs.class, SaslConfigs.class);
return new ValidationResult.Builder().subject(subject).explanation("Must be a known configuration parameter for this kafka client").valid(knownValue).build();
}
};
}
/**
* Builds transit URI for provenance event. The transit URI will be in the

View File

@ -441,12 +441,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<version>3.0.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.12</version>
<version>8.21</version>
</dependency>
</dependencies>
</plugin>
@ -539,6 +539,7 @@
<module name="Checker">
<property name="charset" value="UTF-8" />
<property name="severity" value="warning" />
<property name="cacheFile" value="target/checkstyleCache"/>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
@ -568,7 +569,7 @@
<module name="LeftCurly" />
<module name="RightCurly" />
<module name="RightCurly">
<property name="option" value="alone" />
<property name="option" value="alone_or_singleline" />
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT" />
</module>
<module name="SeparatorWrap">
@ -599,6 +600,7 @@
</module>
<module name="NonEmptyAtclauseDescription" />
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true" />
<property name="allowMissingJavadoc" value="true" />
<property name="allowMissingParamTags" value="true" />
<property name="allowMissingThrowsTags" value="true" />