-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update logging message on MultipleJGitEnvironmentRepository, JGitEnvironmentRepository #2162
Conversation
@ndy2 Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@ndy2 Thank you for signing the Contributor License Agreement! |
Codecov ReportBase: 77.15% // Head: 77.52% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## 3.1.x #2162 +/- ##
============================================
+ Coverage 77.15% 77.52% +0.36%
- Complexity 1455 1472 +17
============================================
Files 183 186 +3
Lines 5376 5442 +66
Branches 705 706 +1
============================================
+ Hits 4148 4219 +71
+ Misses 954 943 -11
- Partials 274 280 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
in |
I will check and add ! |
I debugged and found the actually Try Master Branch behavior happens in |
…ronmentRepository
I found that there are actually three case where 1. two methods in JGitEnvironmentRepository handle original exception by logging. Considering that, i think simple loggin on So I add a log on And fix a wrong log message in |
@@ -160,7 +160,6 @@ public Environment findOne(String application, String profile, String label, boo | |||
this.logger.debug("Cannot load configuration from " + candidate.getUri() + ", cause: (" | |||
+ e.getClass().getSimpleName() + ") " + e.getMessage(), e); | |||
} | |||
continue; |
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.
Why is this being removed?
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.
My IDE suggests
'continue' is unnecessary as the last statement in a loop
so i removed it.
I find that there is one more such continue statement at MultipleJGitEnvironmentRepository.getLocations
May i remove 'continue;' from that also or retreive this one.
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 limit changes to those specific to the issue.
After I restore the continue statement. I have no clue that why it fails. Since the change i made is only to add some logging. |
@ndy2 can you please pull the latest changes from 3.1.x into your branch? |
As decribe in #2161, it is more easy to debug by throw original exception.
It can be handled by adding original exception as suppressed to master branch exception in case both findOne try thorws exception.
Thanks for @woshikid to sharing solutions.