@Test void blameNullRevision() { assertThat(blameManager.blame(null, null, null), nullValue()); assertThat(blameManager.blame(null, null, Collections.<String>emptyList()), nullValue()); assertThat(blameManager.blame(null, new Object(), null), nullValue()); }
@Override public <R, E> AnnotatedContent<R, E> blame(AnnotatedContent<R, E> content, R revision, List<E> previous) { if (content == null) { if (previous == null || revision == null) { return null; } return new DefaultAnnotatedContent<>(revision, previous); } if (!(content instanceof DefaultAnnotatedContent)) { throw new IllegalArgumentException("Incompatible annotated content type provided"); } ((DefaultAnnotatedContent<R, E>) content).analyseRevision(revision, previous); return content; }
DefaultBlameManager implements BlameManager { @Override public <R, E> AnnotatedContent<R, E> blame(AnnotatedContent<R, E> content, R revision, List<E> previous) { if (content == null) { if (previous == null || revision == null) { return null; } return new DefaultAnnotatedContent<>(revision, previous); } if (!(content instanceof DefaultAnnotatedContent)) { throw new IllegalArgumentException("Incompatible annotated content type provided"); } ((DefaultAnnotatedContent<R, E>) content).analyseRevision(revision, previous); return content; } }
DefaultBlameManager implements BlameManager { @Override public <R, E> AnnotatedContent<R, E> blame(AnnotatedContent<R, E> content, R revision, List<E> previous) { if (content == null) { if (previous == null || revision == null) { return null; } return new DefaultAnnotatedContent<>(revision, previous); } if (!(content instanceof DefaultAnnotatedContent)) { throw new IllegalArgumentException("Incompatible annotated content type provided"); } ((DefaultAnnotatedContent<R, E>) content).analyseRevision(revision, previous); return content; }  }
DefaultBlameManager implements BlameManager { @Override public <R, E> AnnotatedContent<R, E> blame(AnnotatedContent<R, E> content, R revision, List<E> previous) { if (content == null) { if (previous == null || revision == null) { return null; } return new DefaultAnnotatedContent<>(revision, previous); } if (!(content instanceof DefaultAnnotatedContent)) { throw new IllegalArgumentException("Incompatible annotated content type provided"); } ((DefaultAnnotatedContent<R, E>) content).analyseRevision(revision, previous); return content; }  @Override AnnotatedContent<R, E> blame(AnnotatedContent<R, E> content, R revision, List<E> previous); }
DefaultBlameManager implements BlameManager { @Override public <R, E> AnnotatedContent<R, E> blame(AnnotatedContent<R, E> content, R revision, List<E> previous) { if (content == null) { if (previous == null || revision == null) { return null; } return new DefaultAnnotatedContent<>(revision, previous); } if (!(content instanceof DefaultAnnotatedContent)) { throw new IllegalArgumentException("Incompatible annotated content type provided"); } ((DefaultAnnotatedContent<R, E>) content).analyseRevision(revision, previous); return content; }  @Override AnnotatedContent<R, E> blame(AnnotatedContent<R, E> content, R revision, List<E> previous);  }