[
https://issues.apache.org/jira/browse/JAMES-1840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16504365#comment-16504365
]
ASF GitHub Bot commented on JAMES-1840:
---------------------------------------
Github user chibenwa commented on a diff in the pull request:
https://github.com/apache/james-project/pull/117#discussion_r193655459
--- Diff:
mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolver.java
---
@@ -55,6 +55,7 @@ public QuotaRoot createQuotaRoot(String quotaRootValue) {
@Override
public QuotaRoot getQuotaRoot(MailboxPath mailboxPath) throws
MailboxException {
Preconditions.checkArgument(!mailboxPath.getNamespace().contains(SEPARATOR),
"Namespace should not contain " + SEPARATOR);
+ Preconditions.checkArgument(mailboxPath.getUser() != null,
"Username should not be null");
--- End diff --
The ticket states that null user values should be accepted (and not
rejected). Though I agree this ticket is hardly readable.... I hope I made
progress at writing tickets since 2016 ^^
Sorry for the inconvenience.
> NPE on quota update when performed with null user
> -------------------------------------------------
>
> Key: JAMES-1840
> URL: https://issues.apache.org/jira/browse/JAMES-1840
> Project: James Server
> Issue Type: Bug
> Components: mailbox
> Reporter: Tellier Benoit
> Priority: Major
> Labels: easyfix
>
> When using a null user on a mailbox path...
> {code:java}
> java.lang.NullPointerException: null
> at
> DefaultQuotaRootResolver.getQuotaRoot(DefaultQuotaRootResolver.java:58)
> at
> ListeningCurrentQuotaUpdater.event(ListeningCurrentQuotaUpdater.java:59)
> at createMailbox(StoreMailboxManager.java:474)
> {code}
> Answer *DefaultQuotaRootResolver* accepts mailboxPaths with null users. Also
> add test cases regarding this in *DefaultQuotaRootResolverTest*.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]