soullkk commented on issue #16271:
URL: https://github.com/apache/druid/issues/16271#issuecomment-2054295943

   ```
       private static final Integer num = 1;
   
       public static void main(String[] args) {
           add(get());
       }
   
       public static void add(int obj) {
           System.out.println("int");
       }
   
       public static void add(String obj) {
           System.out.println("string");
       }
   
       public static void add(long obj) {
           System.out.println("long");
       }
   
       public static <T> T get() {
           return (T) num;
       }
   ```
   result is :
   Exception in thread "main" java.lang.ClassCastException: java.lang.Integer 
cannot be cast to java.lang.String
        at lkk.util.Main.main(Main.java:136)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to