Skip to content

CAMEL-13962: keep track of brackets that belong to a method in order …#3165

Closed
mpaetzold wants to merge 2 commits intoapache:masterfrom
mpaetzold:CAMEL-13962
Closed

CAMEL-13962: keep track of brackets that belong to a method in order …#3165
mpaetzold wants to merge 2 commits intoapache:masterfrom
mpaetzold:CAMEL-13962

Conversation

@mpaetzold
Copy link
Copy Markdown
Contributor

… to prevent false method splitting

Copy link
Copy Markdown
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 @mpaetzold for the PR! Just some nits from my side, please see below. BTW, for the future, you can run mvn -Psourcecheck clean install to verify the checkstyle of your code to fix these small nits

@@ -0,0 +1,26 @@
package org.apache.camel.util;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: the licence header needs to be added here

import org.junit.Assert;
import org.junit.Test;

import java.util.List;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: the order needs to be rearranged


String last = methods.isEmpty() ? null : methods.get(methods.size() - 1);
if (parenthesisBracket && last != null) {
if (parenthesisBracketCnt>0 && last != null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: there should be whitespace between >

Copy link
Copy Markdown
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.

Except the code style it seems to be ok. Did you run the all the camel core tests?

@mpaetzold
Copy link
Copy Markdown
Contributor Author

I fixed the code style issues. And yes I ran the core tests.

@mpaetzold mpaetzold requested a review from oscerd September 12, 2019 15:45
@oscerd
Copy link
Copy Markdown
Contributor

oscerd commented Sep 14, 2019

Merged on master. Thanks.

@oscerd oscerd closed this Sep 14, 2019
@mpaetzold mpaetzold deleted the CAMEL-13962 branch September 16, 2019 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants