> +            // Guava 18 and earlier method
> +            isSuperTypeOfType = 
> TypeToken.class.getDeclaredMethod("isAssignableFrom", Type.class);
> +            isSuperTypeOfTypeToken = 
> TypeToken.class.getDeclaredMethod("isAssignableFrom", TypeToken.class);
> +         } catch (NoSuchMethodException nsme2) {
> +            throw Throwables.propagate(nsme2);
> +         }
> +      }
> +      IS_SUPERTYPE_OF_TYPE = isSuperTypeOfType;
> +      IS_SUPERTYPE_OF_TYPETOKEN = isSuperTypeOfTypeToken;
> +   }
> +
> +   private TypeTokenUtils() {
> +      throw new AssertionError("intentionally not implemented");
> +   }
> +
> +   public static <C> boolean isSupertypeOf(TypeToken<C> token, Type type) {

Your suggestion is shorter and the result is equivalent but I prefer to call 
through to the reflected method to preserve the intent of the workaround.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/982/files/5be952718a45dd48d05cd93bb2f3a0b2a51b23ff#r77431214

Reply via email to