You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "dk2k (via GitHub)" <gi...@apache.org> on 2023/04/03 12:45:10 UTC

[GitHub] [camel] dk2k opened a new pull request, #9782: removed weird call of Class.getClass()

dk2k opened a new pull request, #9782:
URL: https://github.com/apache/camel/pull/9782

   removed weird call of Class.getClass()


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] github-actions[bot] commented on pull request #9782: removed weird call of Class.getClass()

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9782:
URL: https://github.com/apache/camel/pull/9782#issuecomment-1494371993

   :no_entry_sign: There are (likely) no components to be tested in this PR


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] github-actions[bot] commented on pull request #9782: removed weird call of Class.getClass()

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9782:
URL: https://github.com/apache/camel/pull/9782#issuecomment-1496305327

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 2 | 2 | 0 | 3 |


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] dk2k commented on pull request #9782: removed weird call of Class.getClass()

Posted by "dk2k (via GitHub)" <gi...@apache.org>.
dk2k commented on PR #9782:
URL: https://github.com/apache/camel/pull/9782#issuecomment-1496350520

   @orpiske I appreciate your time for sending git commands (I saved them just in case), but it's still a rocket science to me. I have an IDE with comfortable menus and console git is beyond my comfort zone. The changes here are pretty straightforward, so I rebased the PR itself :)
   new PR https://github.com/apache/camel/pull/9812


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] davsclaus closed pull request #9782: removed weird call of Class.getClass()

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus closed pull request #9782: removed weird call of Class.getClass()
URL: https://github.com/apache/camel/pull/9782


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] dk2k commented on pull request #9782: removed weird call of Class.getClass()

Posted by "dk2k (via GitHub)" <gi...@apache.org>.
dk2k commented on PR #9782:
URL: https://github.com/apache/camel/pull/9782#issuecomment-1495565031

   @essobedo @oscerd @orpiske 
   Sorry for the commit message. I meant: injectionPointType has type Class<?> and calling injectionPointType.getClass() just erases the actual type. Will try changing it
   
   @essobedo 
   in the line 61 requiredType has type implementing Type (it's an interface). Hence, requiredType.getClass() gives relevant information


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] orpiske commented on pull request #9782: removed weird call of Class.getClass()

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on PR #9782:
URL: https://github.com/apache/camel/pull/9782#issuecomment-1496239153

   Not trying to be pedantic, but please try something like this for the commit message: 
   
   `Removed a call of Class.getClass(). getClass() that is called on the instance of type Class<?> and additional getClass() call that could erase the type'
   
   Please, make sure to **rebase** so it rewrites the history and avoids writing the messages (where `upstream` is our  repo https://github.com/apache/camel and `origin` is yours). Something like this should do the trick:
   
   `git pull --rebase upstream main; git checkout <my-working-branch> ; git rebase main ; git push -f origin <my-working-branch>` 
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] essobedo commented on a diff in pull request #9782: removed weird call of Class.getClass()

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #9782:
URL: https://github.com/apache/camel/pull/9782#discussion_r1155917866


##########
tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/GenericsUtil.java:
##########
@@ -74,7 +74,7 @@ private static boolean isAssignableFrom(boolean isDelegateOrEvent, Class<?> inje
         } else if (beanType instanceof WildcardType) {
             return isAssignableFrom(isDelegateOrEvent, (Type) injectionPointType, (WildcardType) beanType);
         } else {
-            throw new IllegalArgumentException("Unsupported type " + injectionPointType.getClass());
+            throw new IllegalArgumentException("Unsupported type " + injectionPointType);

Review Comment:
   I'm wondering if it would make sense to do the same line 61



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] dk2k commented on a diff in pull request #9782: removed weird call of Class.getClass()

Posted by "dk2k (via GitHub)" <gi...@apache.org>.
dk2k commented on code in PR #9782:
URL: https://github.com/apache/camel/pull/9782#discussion_r1157190834


##########
tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/GenericsUtil.java:
##########
@@ -74,7 +74,7 @@ private static boolean isAssignableFrom(boolean isDelegateOrEvent, Class<?> inje
         } else if (beanType instanceof WildcardType) {
             return isAssignableFrom(isDelegateOrEvent, (Type) injectionPointType, (WildcardType) beanType);
         } else {
-            throw new IllegalArgumentException("Unsupported type " + injectionPointType.getClass());
+            throw new IllegalArgumentException("Unsupported type " + injectionPointType);

Review Comment:
   in the line 61 requiredType has type implementing Type (it's an interface). Hence, requiredType.getClass() gives relevant information



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] davsclaus commented on pull request #9782: removed weird call of Class.getClass()

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #9782:
URL: https://github.com/apache/camel/pull/9782#issuecomment-1496425809

   closing 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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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