-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
avoid non necessary objects allocation if session do not have any attributes data #4375
Conversation
…ributes data Signed-off-by: olivier lamy <[email protected]>
Signed-off-by: olivier lamy <[email protected]>
Signed-off-by: olivier lamy <[email protected]>
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.
Fine, subject to ensuring that serializing 0 bytes instead of an empty map deserializes ok.
"select * from " + TABLE + | ||
" where " + ID_COL + " = ? and " + CONTEXT_COL + | ||
" = ? and virtualHost = ?" ); | ||
statement.setString(1, data.getId() ); |
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.
how are you getting away with the extra space before the final ); ??? Is checkstyle broken?
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.
ohh my bad I usually avoid only blank line. But agree I have to take care of spaces as well
} | ||
} | ||
else | ||
{ | ||
statement.setBinaryStream( 7, EMPTY, 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.
Does this deserialize correctly? Serializing an empty map would be a different result than an empty byte string.
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.
just an empty map but good point I will add a test for that.
Signed-off-by: olivier lamy <[email protected]>
Signed-off-by: olivier lamy [email protected]