Skip to content
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

Gh680 jsonproviders no auto start #681

Merged
merged 6 commits into from
Oct 29, 2021
Merged

Conversation

brenuart
Copy link
Collaborator

@brenuart brenuart commented Oct 14, 2021

Close #680: no auto-start of JsonProviders

  • remove Lifecycle from the JsonProvider interface to prevent Logstash from auto-starting the provider
  • declare the start/stop method initially defined by the Lifecycle interface in the JsonProvider interface
  • now that start() is called only once, parse the JSON string during start()

Close #679: remaining characters after reading JSON string

  • raise an error if some characters remain after reading a JsonNode out of the string

…tring

Issue #680: no auto-start of JsonProviders
- remove Lifecycle from the JsonProvider interface to prevent Logstash from auto-starting the provider
- declare the start/stop method initially defined by the Lifecycle interface in the JsonProvider interface
- now that start() is called only once, parse the JSON string during start()

Issue #679: remaining characters after reading JSON string
- raise an error if some characters remain after reading a JsonNode out of the string
@brenuart brenuart requested a review from philsttr October 14, 2021 20:23
*
* @param jsonFactory the {@link JsonFactory} from which to obtain a {@link JsonParser} to read the JSON string.
* @param json the JSON string to read
* @param readFully whether to throw a {@link JsonParseException} when the input is not fully read.
Copy link
Collaborator

@philsttr philsttr Oct 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any places in where readFully is ever false. The code and tests could be simplified a bit since that functionality is not needed. It can always be added in the future if it is ever needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True... do you mean to keep only the readFully... methods ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok - done.

@philsttr philsttr added this to the 7.0 milestone Oct 17, 2021
@brenuart brenuart force-pushed the main branch 3 times, most recently from 8e7c02d to 926c65a Compare October 28, 2021 23:16
These methods will be re-introduced when needed.
@brenuart brenuart merged commit 1994a0a into main Oct 29, 2021
@brenuart brenuart deleted the gh680-jsonproviders-no-auto-start branch October 29, 2021 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants