exceptionfactory commented on code in PR #9562:
URL: https://github.com/apache/nifi/pull/9562#discussion_r1870548302
##########
nifi-extension-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java:
##########
@@ -181,28 +180,10 @@ public class PutSmbFile extends AbstractProcessor {
@Override
protected void init(final ProcessorInitializationContext context) {
- final List<PropertyDescriptor> descriptors = new
ArrayList<PropertyDescriptor>();
- descriptors.add(HOSTNAME);
- descriptors.add(SHARE);
- descriptors.add(DIRECTORY);
- descriptors.add(DOMAIN);
- descriptors.add(USERNAME);
- descriptors.add(PASSWORD);
- descriptors.add(CREATE_DIRS);
- descriptors.add(SHARE_ACCESS);
- descriptors.add(CONFLICT_RESOLUTION);
- descriptors.add(BATCH_SIZE);
- descriptors.add(RENAME_SUFFIX);
- descriptors.add(SMB_DIALECT);
- descriptors.add(USE_ENCRYPTION);
- descriptors.add(ENABLE_DFS);
- descriptors.add(TIMEOUT);
- this.descriptors = Collections.unmodifiableList(descriptors);
-
- final Set<Relationship> relationships = new HashSet<Relationship>();
- relationships.add(REL_SUCCESS);
- relationships.add(REL_FAILURE);
- this.relationships = Collections.unmodifiableSet(relationships);
+ this.descriptors = List.of(HOSTNAME, SHARE, DIRECTORY, DOMAIN,
USERNAME, PASSWORD, CREATE_DIRS, SHARE_ACCESS, CONFLICT_RESOLUTION, BATCH_SIZE,
+ RENAME_SUFFIX, SMB_DIALECT, USE_ENCRYPTION, ENABLE_DFS,
TIMEOUT);
Review Comment:
For property declarations, it is helpful to maintain one per line for easier
reading and future review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]