@Test public void emptyNullsWhenSuppressed() throws Exception { Assert.assertThat( new ExcludeSuppressed( new JavaSourceFile( "class A {\n", " void method() {\n", " @SuppressWarnings(\"nullfree\")\n", " String name = null;\n", " }\n", "}\n" ).nulls() ).asList().isEmpty(), IsEqual.equalTo(true) ); }
@Override public List<Null> asList() { final List<Null> filtered = new ArrayList<>(); for (final Null nil : origin.asList()) { if (!nil.isSuppressed()) { filtered.add(nil); } } return filtered; }
ExcludeSuppressed implements Nulls { @Override public List<Null> asList() { final List<Null> filtered = new ArrayList<>(); for (final Null nil : origin.asList()) { if (!nil.isSuppressed()) { filtered.add(nil); } } return filtered; } }
ExcludeSuppressed implements Nulls { @Override public List<Null> asList() { final List<Null> filtered = new ArrayList<>(); for (final Null nil : origin.asList()) { if (!nil.isSuppressed()) { filtered.add(nil); } } return filtered; } ExcludeSuppressed(final Nulls origin); }
ExcludeSuppressed implements Nulls { @Override public List<Null> asList() { final List<Null> filtered = new ArrayList<>(); for (final Null nil : origin.asList()) { if (!nil.isSuppressed()) { filtered.add(nil); } } return filtered; } ExcludeSuppressed(final Nulls origin); @Override List<Null> asList(); }
ExcludeSuppressed implements Nulls { @Override public List<Null> asList() { final List<Null> filtered = new ArrayList<>(); for (final Null nil : origin.asList()) { if (!nil.isSuppressed()) { filtered.add(nil); } } return filtered; } ExcludeSuppressed(final Nulls origin); @Override List<Null> asList();  }