Add test case for #2534
This commit is contained in:
@ -91,6 +91,21 @@ public class Test<E> {
|
||||
// still returns an Object[] array type, and not E[].
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>#2534 FN with toArray() called on a method call chain</description>
|
||||
<expected-problems>1</expected-problems>
|
||||
<expected-linenumbers>5</expected-linenumbers>
|
||||
<code><![CDATA[
|
||||
import java.util.Map;
|
||||
|
||||
public class Test {
|
||||
public String[] extractKey(Map<String, String> data) {
|
||||
return (String[]) data.keySet().toArray();
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
Reference in New Issue
Block a user