Skip to content
Snippets Groups Projects
Commit f250bb5c authored by Thomas Mortagne's avatar Thomas Mortagne
Browse files

XWIKI-19123: Possible java.lang.IllegalArgumentException:...

XWIKI-19123: Possible java.lang.IllegalArgumentException: java.io.NotSerializableException: org.xwiki.eventstream.store.internal.LegacyEvent when marking a user notification as read
parent a3a3321a
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ protected Optional<Event> syncDeleteEvent(String eventId) throws EventStreamExce
}
@Override
public Optional<Event> syncDeleteEvent(Event event) throws EventStreamException
protected Optional<Event> syncDeleteEvent(Event event) throws EventStreamException
{
Optional<Event> existingEvent = getEvent(event.getId());
......@@ -85,7 +85,7 @@ public Optional<Event> syncDeleteEvent(Event event) throws EventStreamException
}
@Override
public EventStatus syncSaveEventStatus(EventStatus status) throws EventStreamException
protected EventStatus syncSaveEventStatus(EventStatus status) throws EventStreamException
{
try {
this.eventStatusManager.saveEventStatus(status);
......@@ -97,14 +97,14 @@ public EventStatus syncSaveEventStatus(EventStatus status) throws EventStreamExc
}
@Override
public EntityEvent syncSaveMailEntityEvent(EntityEvent event) throws EventStreamException
protected EntityEvent syncSaveMailEntityEvent(EntityEvent event) throws EventStreamException
{
// Unsupported
return event;
}
@Override
public Optional<EventStatus> syncDeleteEventStatus(EventStatus status) throws EventStreamException
protected Optional<EventStatus> syncDeleteEventStatus(EventStatus status) throws EventStreamException
{
try {
this.eventStatusManager.deleteEventStatus(status);
......
......@@ -23,8 +23,6 @@
import org.xwiki.eventstream.EventStatus;
import org.xwiki.text.StringUtils;
import java.io.Serializable;
/**
* A Legacy Event Status is the equivalent of {@link EventStatus} for {@link LegacyEvent}.
*
......@@ -33,7 +31,7 @@
* @since 11.1RC1
* @version $Id$
*/
public class LegacyEventStatus implements Serializable
public class LegacyEventStatus
{
private LegacyEvent activityEvent;
......
......@@ -37,10 +37,7 @@
import org.xwiki.eventstream.EventStatusManager;
import org.xwiki.eventstream.EventStreamException;
import org.xwiki.eventstream.internal.DefaultEventStatus;
import org.xwiki.eventstream.internal.events.EventStatusAddOrUpdatedEvent;
import org.xwiki.eventstream.internal.events.EventStatusDeletedEvent;
import org.xwiki.model.namespace.WikiNamespace;
import org.xwiki.observation.ObservationManager;
import org.xwiki.query.Query;
import org.xwiki.query.QueryManager;
import org.xwiki.wiki.descriptor.WikiDescriptorManager;
......@@ -74,9 +71,6 @@ public class LegacyEventStatusManager implements EventStatusManager
@Inject
private WikiDescriptorManager wikiDescriptorManager;
@Inject
private ObservationManager observation;
@Inject
private NamespaceContextExecutor namespaceContextExecutor;
......@@ -201,7 +195,6 @@ private void saveEventStatusInStore(LegacyEventStatus eventStatus, String wikiId
throw new EventStreamException(e);
}
this.observation.notify(new EventStatusAddOrUpdatedEvent(), eventStatus);
return null;
});
}
......@@ -222,7 +215,6 @@ private void deleteEventStatusFromStore(LegacyEventStatus eventStatus, String wi
throw new EventStreamException(e);
}
this.observation.notify(new EventStatusAddOrUpdatedEvent(), eventStatus);
return null;
});
}
......@@ -259,7 +251,6 @@ private void deleteAllForEntityInStore(Date startDate, String entityId, String w
throw new EventStreamException(e);
}
this.observation.notify(new EventStatusDeletedEvent(), null);
return null;
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment