You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/02/26 20:51:10 UTC

[GitHub] [camel-examples] metters opened a new pull request #38: Camel 16012 remove prefix 05

metters opened a new pull request #38:
URL: https://github.com/apache/camel-examples/pull/38


   This PR removes some more prefixes


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-examples] metters commented on a change in pull request #38: CAMEL-16012: Remove prefix 05

Posted by GitBox <gi...@apache.org>.
metters commented on a change in pull request #38:
URL: https://github.com/apache/camel-examples/pull/38#discussion_r584075013



##########
File path: examples/main/src/main/java/org/apache/camel/example/StandaloneCamel.java
##########
@@ -34,29 +34,30 @@ private StandaloneCamel() {
 
     public static void main(String[] args) throws Exception {
         // create a new CamelContext
-        CamelContext camelContext = new DefaultCamelContext();
+        try (CamelContext camelContext = new DefaultCamelContext()) {

Review comment:
       May I ask, why we ignore that Sonar issue?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-examples] davsclaus merged pull request #38: CAMEL-16012: Remove prefix 05

Posted by GitBox <gi...@apache.org>.
davsclaus merged pull request #38:
URL: https://github.com/apache/camel-examples/pull/38


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-examples] metters commented on a change in pull request #38: CAMEL-16012: Remove prefix 05

Posted by GitBox <gi...@apache.org>.
metters commented on a change in pull request #38:
URL: https://github.com/apache/camel-examples/pull/38#discussion_r584075013



##########
File path: examples/main/src/main/java/org/apache/camel/example/StandaloneCamel.java
##########
@@ -34,29 +34,30 @@ private StandaloneCamel() {
 
     public static void main(String[] args) throws Exception {
         // create a new CamelContext
-        CamelContext camelContext = new DefaultCamelContext();
+        try (CamelContext camelContext = new DefaultCamelContext()) {

Review comment:
       @davsclaus , may I ask, why we ignore that Sonar issue?
   I have to admit that I have made this kind of change several times in the past. Usually not without testing it, therefore only on modules that I was able to start/run.
   However, I deleted my branches and because the modules were moved/renamed it will be quite difficult to find out where I did those changes (wrapping a statement in try with resources)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-examples] davsclaus commented on a change in pull request #38: CAMEL-16012: Remove prefix 05

Posted by GitBox <gi...@apache.org>.
davsclaus commented on a change in pull request #38:
URL: https://github.com/apache/camel-examples/pull/38#discussion_r584052759



##########
File path: examples/main/src/main/java/org/apache/camel/example/StandaloneCamel.java
##########
@@ -34,29 +34,30 @@ private StandaloneCamel() {
 
     public static void main(String[] args) throws Exception {
         // create a new CamelContext
-        CamelContext camelContext = new DefaultCamelContext();
+        try (CamelContext camelContext = new DefaultCamelContext()) {

Review comment:
       Oh we should avoid this, can you keep the code as before.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-examples] metters commented on a change in pull request #38: CAMEL-16012: Remove prefix 05

Posted by GitBox <gi...@apache.org>.
metters commented on a change in pull request #38:
URL: https://github.com/apache/camel-examples/pull/38#discussion_r584074574



##########
File path: examples/main/src/main/java/org/apache/camel/example/StandaloneCamel.java
##########
@@ -34,29 +34,30 @@ private StandaloneCamel() {
 
     public static void main(String[] args) throws Exception {
         // create a new CamelContext
-        CamelContext camelContext = new DefaultCamelContext();
+        try (CamelContext camelContext = new DefaultCamelContext()) {

Review comment:
       Ok I will revert this.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-examples] metters commented on a change in pull request #38: CAMEL-16012: Remove prefix 05

Posted by GitBox <gi...@apache.org>.
metters commented on a change in pull request #38:
URL: https://github.com/apache/camel-examples/pull/38#discussion_r584075013



##########
File path: examples/main/src/main/java/org/apache/camel/example/StandaloneCamel.java
##########
@@ -34,29 +34,30 @@ private StandaloneCamel() {
 
     public static void main(String[] args) throws Exception {
         // create a new CamelContext
-        CamelContext camelContext = new DefaultCamelContext();
+        try (CamelContext camelContext = new DefaultCamelContext()) {

Review comment:
       @davsclaus , may I ask, why we ignore that Sonar issue?
   I have to admit that I have made this kind of change several times in the past. Usually not without testing it, therefore only on modules that I was able to start/run.  Also I added these changes with a dedicated commit message ("Fix sonar issue")
   However, I deleted my branches and because the modules were moved/renamed it will be quite difficult to find out where I did those changes (wrapping a statement in try with resources)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org