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

chore: remove additional braces for LeftCurlyCheck checkstyle #1076

Merged
merged 2 commits into from Jan 19, 2018

Conversation

@vaano94
Copy link
Contributor

@vaano94 vaano94 commented Jan 18, 2018

By mistake I've corrected only one couple of braces. In this commit I tried to take into account all of them.
I removed and replaced some additional braces in case scenarios that are also required for build to proceed.
However, some braces were not removed and only displaced into other location otherwise it raises an exception of duplicated variable parameters: "Variable has been already defined in this scope"

Please refer to the following issue of the underlying problem : LeftCurlyCheck

}
break;
Copy link
Member

@vlsi vlsi Jan 18, 2018

Choose a reason for hiding this comment

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

Is this line motion required?
I think it looks better when break is within the braces.

Copy link
Contributor Author

@vaano94 vaano94 Jan 19, 2018

Choose a reason for hiding this comment

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

Fixed. I returned break within the braces.

@@ -2186,31 +2184,27 @@ protected void processResults(ResultHandler handler, int flags) throws IOExcepti

LOGGER.log(Level.FINEST, " <=BE EmptyQuery");

{
Copy link
Member

@vlsi vlsi Jan 18, 2018

Choose a reason for hiding this comment

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

These lines make sure the variables are local, so I would like to refrain from removing these curly braces.

Copy link
Contributor Author

@vaano94 vaano94 Jan 19, 2018

Choose a reason for hiding this comment

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

Though the case with 'i' seems to be the last in the switch sentence with the variables instantiations, braces around it could be omitted. But you are right, for logical clearness i've added them back.

Copy link
Member

@vlsi vlsi Jan 19, 2018

Choose a reason for hiding this comment

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

Thanks. It looks good now.

@codecov-io
Copy link

@codecov-io codecov-io commented Jan 18, 2018

Codecov Report

Merging #1076 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #1076      +/-   ##
============================================
- Coverage     67.21%   67.21%   -0.01%     
+ Complexity     3663     3662       -1     
============================================
  Files           170      170              
  Lines         15621    15622       +1     
  Branches       2522     2522              
============================================
  Hits          10500    10500              
  Misses         3936     3936              
- Partials       1185     1186       +1

@vaano94 vaano94 force-pushed the chore/leftcurlycheck branch from d434024 to bd6ff43 Jan 19, 2018
@vlsi vlsi added this to the 42.2.1 milestone Jan 19, 2018
@vlsi vlsi merged commit 975aaf5 into pgjdbc:master Jan 19, 2018
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants