nandorsoma commented on code in PR #6769:
URL: https://github.com/apache/nifi/pull/6769#discussion_r1144675192
##########
nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services/src/main/java/org/apache/nifi/jasn1/JASN1Reader.java:
##########
@@ -193,10 +219,23 @@ protected Collection<ValidationResult>
customValidate(ValidationContext validati
@OnEnabled
public void onEnabled(final ConfigurationContext context) throws
InitializationException {
if (context.getProperty(ASN_FILES) != null &&
context.getProperty(ASN_FILES).isSet()) {
- String[] asnFilesPaths =
Arrays.stream(context.getProperty(ASN_FILES).evaluateAttributeExpressions().getValue().split(","))
- .map(String::trim)
- .toArray(String[]::new);
+ String asnFilesString =
context.getProperty(ASN_FILES).evaluateAttributeExpressions().getValue();
+ if (context.getProperty(DO_ADDITIONAL_PREPROCESSING).asBoolean()) {
+ AsnPreprocessorEngine asnPreprocessorEngine = new
AsnPreprocessorEngine();
Review Comment:
final is missing
##########
nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services/src/main/java/org/apache/nifi/jasn1/JASN1Reader.java:
##########
@@ -193,10 +219,23 @@ protected Collection<ValidationResult>
customValidate(ValidationContext validati
@OnEnabled
public void onEnabled(final ConfigurationContext context) throws
InitializationException {
if (context.getProperty(ASN_FILES) != null &&
context.getProperty(ASN_FILES).isSet()) {
- String[] asnFilesPaths =
Arrays.stream(context.getProperty(ASN_FILES).evaluateAttributeExpressions().getValue().split(","))
- .map(String::trim)
- .toArray(String[]::new);
+ String asnFilesString =
context.getProperty(ASN_FILES).evaluateAttributeExpressions().getValue();
+ if (context.getProperty(DO_ADDITIONAL_PREPROCESSING).asBoolean()) {
+ AsnPreprocessorEngine asnPreprocessorEngine = new
AsnPreprocessorEngine();
+
+ String preprocessOutputDirectory =
context.getProperty(ADDITIONAL_PREPROCESSING_OUTPUT_DIRECTORY).evaluateAttributeExpressions().getValue();
Review Comment:
final is missing. Also in line 236, but I cannot comment on it.
##########
nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services/src/test/resources/preprocessed_test_complex_for_preprocessing.asn:
##########
@@ -0,0 +1,15 @@
+ORG-APACHE-NIFI-JASN1-TEST
+
+DEFINITIONS IMPLICIT TAGS ::=
+
+BEGIN
+
+MyType := SEQUENCE {
Review Comment:
An additional colon is missing.
```suggestion
MyType ::= SEQUENCE {
```
##########
nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services/src/test/resources/test_complex_for_preprocessing.asn:
##########
@@ -0,0 +1,15 @@
+ORG-APACHE-NIFI-JASN1-TEST
+
+DEFINITIONS IMPLICIT TAGS ::=
+
+BEGIN
+
+MyType := SEQUENCE {
Review Comment:
An additional colon is missing.
```suggestion
MyType ::= SEQUENCE {
```
--
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]