ComplexInitializer: Reset " -> new" inferred contract; otherwise we don't get "too complex" warning

This commit is contained in:
Tagir Valeev
2018-09-06 01:43:03 +07:00
parent 86da567987
commit 2a1233d3a2
@@ -58,6 +58,8 @@ class Constants {
static final Object C10 = get();
static final Object C11 = get();
// Reset " -> new" inferred contract; otherwise we don't get "too complex" warning
@Contract("-> _")
static Object get() {
System.out.println();
return new Object();