[
https://issues.apache.org/jira/browse/JAMES-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15413331#comment-15413331
]
ASF GitHub Bot commented on JAMES-1815:
---------------------------------------
Github user chibenwa commented on a diff in the pull request:
https://github.com/apache/james-project/pull/47#discussion_r74032259
--- Diff:
server/data/data-library/src/main/java/org/apache/james/domainlist/lib/AbstractDomainList.java
---
@@ -118,6 +118,9 @@ public String getDefaultDomain() throws
DomainListException {
List<String> domains = getDomainListInternal();
--- End diff --
I tend to don't like variable re-affectation....
Here I would prefer a variable called "mutableDomains" to be created rather
than seing domains reused.
By the way, nice spot.
> Crash when reading domainlist via JMX
> -------------------------------------
>
> Key: JAMES-1815
> URL: https://issues.apache.org/jira/browse/JAMES-1815
> Project: James Server
> Issue Type: Bug
> Components: JMX
> Affects Versions: 3.0.0-beta5
> Reporter: Tobias Fleig
>
> Reading the list of domains via JMX from:
> ObjectName: "org.apache.james:type=component,name=domainlist", Attribute
> "Domains"
> crashes with:
> java.lang.UnsupportedOperationException
> at
> com.google.common.collect.ImmutableCollection.add(ImmutableCollection.java:96)
> at
> org.apache.james.domainlist.lib.AbstractDomainList.getDomains(AbstractDomainList.java:131)
> at
> org.apache.james.domainlist.lib.DomainListManagement.getDomains(DomainListManagement.java:69)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> Some subclasses (JPADomainList, HBaseDomainList, MemoryDomainList) return an
> ImmutableList in getDomainListInternal(). This list is then modified by
> getDomains() in AbstractDomainList, which causes the crash above.
> We will supply a patch/pull request.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]