-
Notifications
You must be signed in to change notification settings - Fork 472
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
KAA-1650: Don't set the body present flag in extension options if body size is equal to zero #1369
Conversation
@@ -424,7 +424,8 @@ private void encode(GrowingByteBuffer buf, LogServerSync logSync) { | |||
private void encode(GrowingByteBuffer buf, ConfigurationServerSync configurationSync) { | |||
int option = 0; | |||
boolean confSchemaPresent = configurationSync.getConfSchemaBody() != null; | |||
boolean confBodyPresent = configurationSync.getConfDeltaBody() != null; | |||
boolean confBodyPresent = configurationSync.getConfDeltaBody() != null | |||
&& configurationSync.getConfDeltaBody().array().length != 0; |
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.
Call hasArray() method before invoking array()
/cc @vtkhir |
@@ -423,8 +423,12 @@ private void encode(GrowingByteBuffer buf, LogServerSync logSync) { | |||
|
|||
private void encode(GrowingByteBuffer buf, ConfigurationServerSync configurationSync) { | |||
int option = 0; | |||
boolean confSchemaPresent = configurationSync.getConfSchemaBody() != null; | |||
boolean confBodyPresent = configurationSync.getConfDeltaBody() != null; | |||
boolean confSchemaPresent = configurationSync.getConfSchemaBody() != null |
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.
Please extract configurationSync.getConfSchemaBody()
to local variable
boolean confSchemaPresent = configurationSync.getConfSchemaBody() != null | ||
&& configurationSync.getConfSchemaBody().hasArray() | ||
&& configurationSync.getConfSchemaBody().array().length != 0; | ||
boolean confBodyPresent = configurationSync.getConfDeltaBody() != null |
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.
Please extract configurationSync.getConfDeltaBody()
to local variable
&& configurationSync.getConfSchemaBody().array().length != 0; | ||
boolean confBodyPresent = configurationSync.getConfDeltaBody() != null | ||
&& configurationSync.getConfSchemaBody().hasArray() | ||
&& configurationSync.getConfDeltaBody().array().length != 0; |
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.
Fix the typo
…y size is equal to zero
Jenkins failure is caused by KAA-1640 and is not related to the PR. |
/cc @GamovCoder @Sergio-Dev