diff --git a/xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-filters/xwiki-platform-notifications-filters-default/src/main/java/org/xwiki/notifications/filters/migration/R160000001XWIKI21738DataMigration.java b/xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-filters/xwiki-platform-notifications-filters-default/src/main/java/org/xwiki/notifications/filters/migration/R160000001XWIKI21738DataMigration.java index dfdc95ca3b25..141714f65a20 100644 --- a/xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-filters/xwiki-platform-notifications-filters-default/src/main/java/org/xwiki/notifications/filters/migration/R160000001XWIKI21738DataMigration.java +++ b/xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-filters/xwiki-platform-notifications-filters-default/src/main/java/org/xwiki/notifications/filters/migration/R160000001XWIKI21738DataMigration.java @@ -171,10 +171,10 @@ private void migrateFilters(List filters) try { if (entityReference.getType() == EntityType.DOCUMENT) { this.filterPreferenceStore - .saveFilterPreferences((DocumentReference) entityReference, entry.getValue()); + .saveFilterPreferences(new DocumentReference(entityReference), entry.getValue()); } else { this.filterPreferenceStore - .saveFilterPreferences((WikiReference) entityReference, entry.getValue()); + .saveFilterPreferences(new WikiReference(entityReference.getName()), entry.getValue()); } } catch (NotificationException e) { throw new DataMigrationException(