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

CAMEL-14387 - fix NPE when client error #3473

Merged
merged 2 commits into from Jan 10, 2020
Merged

Conversation

jbdefard
Copy link

No description provided.

Copy link
Contributor

@oscerd oscerd left a comment

Choose a reason for hiding this comment

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

Please report the JIRA issue (CAMEL-14387) in the commit message. Personally I don't like the use of this in this way, but it's only a matter of taste.
@zregvart can you have a look? Thanks.

@@ -16,6 +16,16 @@
*/
package org.apache.camel.component.salesforce.internal.streaming;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please run the build with the sourcecheck profile enabled, the static part must be at the end of the imports listing.

Copy link
Member

@omarsmak omarsmak left a comment

Choose a reason for hiding this comment

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

Thanks @jbdefard. IMHO I am not on board with using of this and SubscriptionHelper.this, in my taste adds unnecessarily parts to the code

LOG.debug("[CHANNEL:META_HANDSHAKE]: {}", message);

if (!message.isSuccessful()) {
LOG.warn("Handshake failure: {}", message);
handshakeError = (String)message.get(ERROR_FIELD);
handshakeException = getFailure(message);
SubscriptionHelper.this.handshakeError = (String)message.get(ERROR_FIELD);
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason to add SubscriptionHelper.this for these properties? IMHO it makes the code a bit chaotic, same goes for this.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry is my mistake... (default configuration of my IDE). I fix this.

Copy link
Author

Choose a reason for hiding this comment

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

I commited a more correct patch

@oscerd oscerd requested a review from zregvart January 10, 2020 10:25
Copy link
Member

@zregvart zregvart left a comment

Choose a reason for hiding this comment

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

👍 thanks!

@omarsmak omarsmak merged commit 0c9c2ec into apache:master Jan 10, 2020
@omarsmak
Copy link
Member

Merged. Thank you @jbdefard !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants