@Test void hashCode_isNotProxied() throws Throwable { Method method = ProxyTarget.class.getMethod("hashCode"); int value = (int) this.target.invoke(this.target, method, null); assertThat(value).isNotZero(); verifyZeroInteractions(this.targetMethodHandler); }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (EQUALS.equals(method.getName())) { return this.equals(args[0]); } else if (HASH_CODE.equals(method.getName())) { return this.hashCode(); } else if (TO_STRING.equals(method.getName())) { return this.toString(); } TargetMethodHandler methodHandler = null; if (this.methodHandlerMap.containsKey(method)) { methodHandler = this.methodHandlerMap.get(method); } else { if (method.isDefault()) { methodHandler = this.createGuardMethodHandler(method, proxy); this.methodHandlerMap.put(method, methodHandler); } } if (methodHandler != null) { return methodHandler.execute(args); } else { throw new UnsupportedOperationException( "HttpMethod [" + method.getName() + "] is not supported by this implementation."); } }
ProxyTarget implements InvocationHandler, Target<T> { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (EQUALS.equals(method.getName())) { return this.equals(args[0]); } else if (HASH_CODE.equals(method.getName())) { return this.hashCode(); } else if (TO_STRING.equals(method.getName())) { return this.toString(); } TargetMethodHandler methodHandler = null; if (this.methodHandlerMap.containsKey(method)) { methodHandler = this.methodHandlerMap.get(method); } else { if (method.isDefault()) { methodHandler = this.createGuardMethodHandler(method, proxy); this.methodHandlerMap.put(method, methodHandler); } } if (methodHandler != null) { return methodHandler.execute(args); } else { throw new UnsupportedOperationException( "HttpMethod [" + method.getName() + "] is not supported by this implementation."); } } }
ProxyTarget implements InvocationHandler, Target<T> { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (EQUALS.equals(method.getName())) { return this.equals(args[0]); } else if (HASH_CODE.equals(method.getName())) { return this.hashCode(); } else if (TO_STRING.equals(method.getName())) { return this.toString(); } TargetMethodHandler methodHandler = null; if (this.methodHandlerMap.containsKey(method)) { methodHandler = this.methodHandlerMap.get(method); } else { if (method.isDefault()) { methodHandler = this.createGuardMethodHandler(method, proxy); this.methodHandlerMap.put(method, methodHandler); } } if (methodHandler != null) { return methodHandler.execute(args); } else { throw new UnsupportedOperationException( "HttpMethod [" + method.getName() + "] is not supported by this implementation."); } } ProxyTarget(
      Collection<TargetMethodDefinition> methods, FeignConfiguration configuration);   ProxyTarget(Collection<TargetMethodDefinition> methods,
      TargetMethodHandlerFactory methodHandlerFactory,
      FeignConfiguration configuration); }
ProxyTarget implements InvocationHandler, Target<T> { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (EQUALS.equals(method.getName())) { return this.equals(args[0]); } else if (HASH_CODE.equals(method.getName())) { return this.hashCode(); } else if (TO_STRING.equals(method.getName())) { return this.toString(); } TargetMethodHandler methodHandler = null; if (this.methodHandlerMap.containsKey(method)) { methodHandler = this.methodHandlerMap.get(method); } else { if (method.isDefault()) { methodHandler = this.createGuardMethodHandler(method, proxy); this.methodHandlerMap.put(method, methodHandler); } } if (methodHandler != null) { return methodHandler.execute(args); } else { throw new UnsupportedOperationException( "HttpMethod [" + method.getName() + "] is not supported by this implementation."); } } ProxyTarget(
      Collection<TargetMethodDefinition> methods, FeignConfiguration configuration);   ProxyTarget(Collection<TargetMethodDefinition> methods,
      TargetMethodHandlerFactory methodHandlerFactory,
      FeignConfiguration configuration); @Override Class<T> type(); @Override String name(); @Override Object invoke(Object proxy, Method method, Object[] args); @Override void apply(RequestSpecification requestSpecification); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
ProxyTarget implements InvocationHandler, Target<T> { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (EQUALS.equals(method.getName())) { return this.equals(args[0]); } else if (HASH_CODE.equals(method.getName())) { return this.hashCode(); } else if (TO_STRING.equals(method.getName())) { return this.toString(); } TargetMethodHandler methodHandler = null; if (this.methodHandlerMap.containsKey(method)) { methodHandler = this.methodHandlerMap.get(method); } else { if (method.isDefault()) { methodHandler = this.createGuardMethodHandler(method, proxy); this.methodHandlerMap.put(method, methodHandler); } } if (methodHandler != null) { return methodHandler.execute(args); } else { throw new UnsupportedOperationException( "HttpMethod [" + method.getName() + "] is not supported by this implementation."); } } ProxyTarget(
      Collection<TargetMethodDefinition> methods, FeignConfiguration configuration);   ProxyTarget(Collection<TargetMethodDefinition> methods,
      TargetMethodHandlerFactory methodHandlerFactory,
      FeignConfiguration configuration); @Override Class<T> type(); @Override String name(); @Override Object invoke(Object proxy, Method method, Object[] args); @Override void apply(RequestSpecification requestSpecification); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }