Daniel Trebbien created NETBEANS-345:
----------------------------------------
Summary: "Move Inner to Outer Level" refactoring adds erroneous
"<captured wildcard>" to the new outer class' source
Key: NETBEANS-345
URL: https://issues.apache.org/jira/browse/NETBEANS-345
Project: NetBeans
Issue Type: Bug
Components: java - Refactoring
Affects Versions: Next
Reporter: Daniel Trebbien
Steps to reproduce:
# Open the following source file:
{code:java}
package bugs;
import java.util.List;
import java.util.concurrent.RunnableFuture;
public class MoveInnerToOuterTest {
public static class Inner {
public Inner(List<? extends Runnable> runnables) {
assert runnables.stream()
.noneMatch((r) -> r instanceof RunnableFuture);
}
}
}
{code}
# Right click on {{class Inner}} and select *Refactor > Move Inner to Outer
Level…*
# Click the "Refactor" button on the dialog.
The newly-generated {{Inner.java}} has the following contents:
{code:java}
package bugs;
import java.util.List;
import java.util.concurrent.RunnableFuture;
public class Inner {
public Inner(List<? extends Runnable> runnables) {
assert runnables.stream().noneMatch((<captured wildcard> r) -> r
instanceof RunnableFuture);
}
}
{code}
Notice the invalid "<captured wildcard>".
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists