}
@Override
- public Notification fromNormalizedNodeNotification(final Absolute path, final ContainerNode data) {
+ public Notification<?> fromNormalizedNodeNotification(final Absolute path, final ContainerNode data) {
return getNotificationContext(path).deserialize(data);
}
@Override
- public Notification fromNormalizedNodeNotification(final Absolute path, final ContainerNode data,
+ public Notification<?> fromNormalizedNodeNotification(final Absolute path, final ContainerNode data,
final Instant eventInstant) {
return eventInstant == null ? fromNormalizedNodeNotification(path, data)
: getNotificationContext(path).deserialize(data, eventInstant);
}
@SuppressWarnings("checkstyle:illegalCatch")
- Notification deserialize(final @NonNull ContainerNode data, final @NonNull Instant eventInstant) {
+ Notification<?> deserialize(final @NonNull ContainerNode data, final @NonNull Instant eventInstant) {
try {
- return (Notification) eventProxy.invokeExact(this, data, eventInstant);
+ return (Notification<?>) eventProxy.invokeExact(this, data, eventInstant);
} catch (final Throwable e) {
Throwables.throwIfUnchecked(e);
throw new IllegalStateException(e);
checkArgument(stmt instanceof NotificationDefinition, "Statement %s is not a notification", stmt);
@SuppressWarnings("unchecked")
- final Class<? extends Notification> clz = (Class<? extends Notification>)
+ final Class<? extends Notification<?>> clz = (Class<? extends Notification<?>>)
factory().getRuntimeContext().getClassForSchema((NotificationDefinition) stmt);
return getNotification(clz);
}
return getOrRethrow(actionsByClass, action);
}
- NotificationCodecContext<?> getNotification(final Class<? extends Notification> notification) {
+ NotificationCodecContext<?> getNotification(final Class<? extends Notification<?>> notification) {
return (NotificationCodecContext<?>) streamChild((Class<? extends DataObject>)notification);
}
@Test
public void testNormalizedToNotification() {
- final Notification bindingDeserialized = codecContext.fromNormalizedNodeNotification(Absolute.of(
+ final Notification<?> bindingDeserialized = codecContext.fromNormalizedNodeNotification(Absolute.of(
TwoLevelListChanged.QNAME), createTestDomData());
assertTrue(bindingDeserialized instanceof TwoLevelListChanged);
assertEquals(createTestBindingData(), bindingDeserialized);
@Test
public void testNormalizedToNotificationWithInstant() {
final Instant instant = Instant.now();
- final Notification bindingDeserialized = codecContext.fromNormalizedNodeNotification(Absolute.of(
+ final Notification<?> bindingDeserialized = codecContext.fromNormalizedNodeNotification(Absolute.of(
TwoLevelListChanged.QNAME), createTestDomData(), instant);
assertTrue(bindingDeserialized instanceof TwoLevelListChanged);
assertEquals(createTestBindingData(), bindingDeserialized);
@Test
public void testNormalizedToNotificationWithNull() {
- final Notification bindingDeserialized = codecContext.fromNormalizedNodeNotification(Absolute.of(
+ final Notification<?> bindingDeserialized = codecContext.fromNormalizedNodeNotification(Absolute.of(
TwoLevelListChanged.QNAME), createTestDomData(), null);
assertTrue(bindingDeserialized instanceof TwoLevelListChanged);
assertEquals(createTestBindingData(), bindingDeserialized);