Skip to content

Instantly share code, notes, and snippets.

@agentgt
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agentgt/7aa05288b560a6190091 to your computer and use it in GitHub Desktop.
Save agentgt/7aa05288b560a6190091 to your computer and use it in GitHub Desktop.
IntelliJ line continuation breaks on functions that take lambda/anonymous
public class IntelliBadLineContinuationTest {
@Test
public void testBlah() throws Exception {
//ok not so bad
asList("a")
.get(0)
.toString();
//ok
asList(
"a",
"b",
"c")
.get(0)
.toString();
//ok
Executors
.newCachedThreadPool()
.submit(new Callable<Object>() {
@Override
public Object call() throws Exception {
return null;
}
})
.get();
//oh snap wtf is that get doing?
execute(new Callable<Object>() {
@Override
public Object call() throws Exception {
return execute(new Callable<Object>() {
return null;
})
.get();
}
});
}
public static <T> Future<T> execute(Callable<T> c) {
return Executors.newCachedThreadPool().submit(c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment