Description
@Inject
private UserManager userManager;
...
userManager.exists(CurrentUserReference.INSTANCE);
Leads to:
Caused by: java.lang.ClassCastException: org.xwiki.user.CurrentUserReference cannot be cast to org.xwiki.user.internal.document.DocumentUserReference at org.xwiki.user.internal.document.DocumentUserManager.exists(DocumentUserManager.java:48) at org.xwiki.user.internal.document.CurrentUserManager.exists(CurrentUserManager.java:69) at org.xwiki.user.internal.DefaultUserManager.exists(DefaultUserManager.java:65)