GH-754 - Rename EventPublication.isPublicationCompleted() to ….isCompleted().
This commit is contained in:
@@ -76,9 +76,19 @@ public interface EventPublication {
|
||||
/**
|
||||
* Returns whether the publication of the event has completed.
|
||||
*
|
||||
* @return will never be {@literal null}.
|
||||
* @deprecated since 1.3, use {@link #isCompleted()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
default boolean isPublicationCompleted() {
|
||||
return isCompleted();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the publication of the event has completed.
|
||||
*
|
||||
* @since 1.3
|
||||
*/
|
||||
default boolean isCompleted() {
|
||||
return getCompletionDate().isPresent();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class TargetEventPublicationUnitTests {
|
||||
var publication = TargetEventPublication.of(new Object(),
|
||||
PublicationTargetIdentifier.of("foo"));
|
||||
|
||||
assertThat(publication.isPublicationCompleted()).isFalse();
|
||||
assertThat(publication.isCompleted()).isFalse();
|
||||
assertThat(publication.getCompletionDate()).isNotPresent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class JdbcEventPublicationRepositoryPerformance {
|
||||
|
||||
var candidate = publications.get(new Random().nextInt(number));
|
||||
|
||||
if (!candidate.isPublicationCompleted()) {
|
||||
if (!candidate.isCompleted()) {
|
||||
toComplete = candidate;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user