Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolveRawArguments returns empty array #60

Open
bmaassenee opened this issue Dec 6, 2019 · 2 comments
Open

resolveRawArguments returns empty array #60

bmaassenee opened this issue Dec 6, 2019 · 2 comments

Comments

@bmaassenee
Copy link

bmaassenee commented Dec 6, 2019

The following unit test fails because the resolveRawArguments returns an empty array. According to the java doc i would either expect null or a filled array

public class TypeResolverTest
{
	class A
	{
		B b;
	}
	
	class B extends HashMap<String,String>
	{}
	
	@Test
	public void test()
	{
		Class[] resolved = TypeResolver.resolveRawArguments( B.class, A.class );
		assertEquals( 2, resolved.length );
		assertEquals( String.class, resolved[0] );
		assertEquals( String.class, resolved[1] );
	}
}
@bmaassenee
Copy link
Author

tested in 0.6.1

@scruel
Copy link

scruel commented Nov 9, 2021

Wrong use, you code should be:
TypeResolver.resolveRawArguments(HashMap.class, B.class)
By the way, the second parameter of resolveRawArguments method should be a subclass, which A is not.
@jhalterman close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants