[
https://issues.apache.org/jira/browse/MAILET-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Knecht closed MAILET-37.
------------------------------
Resolution: Fixed
Fix Version/s: 2.5
When enabled, test cases are passing again.
> Java doesn't pass method arguments by reference; it passes them by value
> ------------------------------------------------------------------------
>
> Key: MAILET-37
> URL: https://issues.apache.org/jira/browse/MAILET-37
> Project: Mailet
> Issue Type: Bug
> Components: Core API
> Affects Versions: 2.5
> Environment: all
> Reporter: Felix Knecht
> Assignee: Felix Knecht
> Priority: Critical
> Fix For: 2.5
>
>
> MailAddress [1] seems to defines "int pos = 0" in c'tor and never increments
> it. This will throw the Exception at line 132 in almost every case (throw
> new AddressException("Did not find @ between local-part and domain at
> position " + (pos + 1) + " in '" + address + "'",address,pos+1);), because
> 'pos' will be 0 in this place! Updates of pos seem to be done in various
> methods called within c'tor and it looks like 'pos' is overgiven to these
> methods as parameter by reference (e.g.
> localPartSB.append(parseUnquotedLocalPart(address, pos));). This will not
> work (see title)
> [1]
> http://svn.apache.org/repos/asf/james/mailet/api/trunk/src/main/java/org/apache/mailet/MailAddress.java
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira