-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-14190 Add Max String Length to ValidationJson #9660
base: main
Are you sure you want to change the base?
Conversation
e8949d2
to
1dfa759
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @NimrodAvni! The overall approach looks good, I just noted two convention-related things, and otherwise this should be good.
@@ -199,7 +213,7 @@ public String getDescription() { | |||
REL_FAILURE | |||
); | |||
|
|||
private static final ObjectMapper MAPPER = new ObjectMapper().configure(JsonParser.Feature.ALLOW_COMMENTS, true); | |||
private ObjectMapper MAPPER; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable name should be lowercased to mapper
since it is no longer static.
private ObjectMapper MAPPER; | |
private ObjectMapper mapper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@exceptionfactory I was wondering whether this should be done in light of the changes you made in #9648. Do want ObjectMapper
to be an instance variable in this processor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dan-s1. This does result in creating an instance of ObjectMapper
per Processor instance, but since it is created in onScheduled
it is the correct place for initialization.
|
||
public static final PropertyDescriptor MAX_STRING_LENGTH = new PropertyDescriptor.Builder() | ||
.name("Max String Length") | ||
.displayName("Max String Length") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a new property, the displayName is not needed.
.displayName("Max String Length") |
Summary
NIFI-14190
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation