[GRADLEREV-41] Type coercion should deal with multiple overloads that can accept the original argument Created: 29/Jul/13  Updated: 25/Jul/16  Resolved: 25/Jul/16

Status: Resolved
Project: Gradle Code Review Tasks
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Adam Murdoch Assignee: Luke Daley
Resolution: Done Votes: 0
Labels: None


We should deal with multiple overloads that can accept the original argument (e.g. a foo(String) and a foo(CharSequence) and a foo(Object) and a foo(Object...))

Comment by Evgeny Goldin [ 07/Aug/13 ]

I'm getting the following error with Gradle 1.7 when calling a method in a plugin that expects String with GString. Is that the same issue?

Caused by: org.gradle.api.GradleException: Could not call GitDumpTask.jsonMaps() on task ':gitdump'
	at org.gradle.util.JavaMethod.invoke(JavaMethod.java:71)
	at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:295)
	at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:136)
	at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
	at com.github.goldin.plugins.gradle.gitdump.GitDumpTask_Decorated.invokeMethod(Unknown Source)
        ...... skipped ......
	... 54 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.gradle.util.JavaMethod.invoke(JavaMethod.java:62)
	... 101 more
Comment by Pepper Lebeck-Jobe [ 25/Jul/16 ]

Closing these clearly obsolete review issues. They haven't been touched in more than 2 years and the reviews for which they were originally opened are closed in Crucible.

Generated at Wed Jun 30 11:18:56 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.