[jira] [Commented] (SANDBOX-492) Create StringDistanceFrom class that contains a StringMetric and the left side string. This would have a method that accepts the right side string to test.
[ https://issues.apache.org/jira/browse/SANDBOX-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347578#comment-14347578 ] Jonathan Baker commented on SANDBOX-492: WIP: https://github.com/j--baker/commons-text/tree/SANDBOX-492 I'll create a pull request when SANDBOX-491 has been merged into master. Then I'll be able to add a few more unit tests for FuzzyScore and LevenshteinDistance. Create StringDistanceFrom class that contains a StringMetric and the left side string. This would have a method that accepts the right side string to test. Key: SANDBOX-492 URL: https://issues.apache.org/jira/browse/SANDBOX-492 Project: Commons Sandbox Issue Type: Improvement Components: Commons Text Reporter: Jonathan Baker Priority: Minor -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (EMAIL-150) Proxy support
[ https://issues.apache.org/jira/browse/EMAIL-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347649#comment-14347649 ] Thomas Neidhart commented on EMAIL-150: --- According to http://www.oracle.com/technetwork/java/javamail/faq/index.html#proxy and https://javamail.java.net/nonav/docs/api/com/sun/mail/smtp/package-summary.html the preferred way to set the socks server is via the mail.smtp.socks.host property which requires at least JDK 1.5. The minimum JDK for email is 1.5 so this should be fine. btw. to use a socks server with the latest release you can still do: {code} Email mail = mail.getSession().getProperties().setProperty(mail.smtp.socks.host, my.socks.host); ... mail.send(); {code} Proxy support - Key: EMAIL-150 URL: https://issues.apache.org/jira/browse/EMAIL-150 Project: Commons Email Issue Type: Improvement Reporter: Perriman Labels: proxy Support to use socket proxy. In javamail it can be done with: props.setProperty(proxySet, true); props.setProperty(socksProxyHost, proxyHost); props.setProperty(socksProxyPort, proxyPort); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (EMAIL-149) EmailConstants.MAIL_SMTP_FROM value is incorrect
[ https://issues.apache.org/jira/browse/EMAIL-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347655#comment-14347655 ] Thomas Neidhart edited comment on EMAIL-149 at 3/4/15 10:10 PM: The mail.smtp.from property defines the bounce address and is only set when one is defined. What do you mean with by an EE container that properly sets the from address? Edit: did you test with debug enabled and can you provide the output of it? was (Author: tn): The mail.smtp.from property defines the bounce address and is only set when one is defined. What do you mean with by an EE container that properly sets the from address? EmailConstants.MAIL_SMTP_FROM value is incorrect Key: EMAIL-149 URL: https://issues.apache.org/jira/browse/EMAIL-149 Project: Commons Email Issue Type: Bug Affects Versions: 1.3.3 Reporter: Richard DiCroce Per the JavaMail Javadoc (https://javamail.java.net/nonav/docs/api/), the standard property for the from address is mail.from, not mail.smtp.from. This incorrect value causes sending emails to fail if using a Session provided by an EE container that properly sets the from address. Observed on WildFly 8.2.0.Final. Workaround: add the mail.smtp.from value to the session properties. You don't need to set the actual value, the fact that it's there is enough: session.getProperties().setProperty(EmailConstants.MAIL_SMTP_FROM, ); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (EMAIL-149) EmailConstants.MAIL_SMTP_FROM value is incorrect
[ https://issues.apache.org/jira/browse/EMAIL-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347655#comment-14347655 ] Thomas Neidhart commented on EMAIL-149: --- The mail.smtp.from property defines the bounce address and is only set when one is defined. What do you mean with by an EE container that properly sets the from address? EmailConstants.MAIL_SMTP_FROM value is incorrect Key: EMAIL-149 URL: https://issues.apache.org/jira/browse/EMAIL-149 Project: Commons Email Issue Type: Bug Affects Versions: 1.3.3 Reporter: Richard DiCroce Per the JavaMail Javadoc (https://javamail.java.net/nonav/docs/api/), the standard property for the from address is mail.from, not mail.smtp.from. This incorrect value causes sending emails to fail if using a Session provided by an EE container that properly sets the from address. Observed on WildFly 8.2.0.Final. Workaround: add the mail.smtp.from value to the session properties. You don't need to set the actual value, the fact that it's there is enough: session.getProperties().setProperty(EmailConstants.MAIL_SMTP_FROM, ); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MATH-1196) FastMath.round (like Math.round) returns surprising results for some arguments
[ https://issues.apache.org/jira/browse/MATH-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347685#comment-14347685 ] Thomas Neidhart commented on MATH-1196: --- The implemented change in the jdk is very simple: {code} if (a != 0x1.fp-2) // greatest double value less than 0.5 return (long)floor(a + 0.5d); else return 0; {code} we could easily do the same. FastMath.round (like Math.round) returns surprising results for some arguments -- Key: MATH-1196 URL: https://issues.apache.org/jira/browse/MATH-1196 Project: Commons Math Issue Type: Bug Affects Versions: 3.4.1 Reporter: Phil Steitz The first assertion in the test case below succeeds, but the second fails {code} /* * http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6430675 */ @Test public void testRoundDown() { final double x = 0x1.fp-2; Assert.assertTrue(x 0.5d); Assert.assertEquals(0, FastMath.round(x)); } {code} This is being tracked as a JDK (actually spec) bug here: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6430675 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (EMAIL-149) EmailConstants.MAIL_SMTP_FROM value is incorrect
[ https://issues.apache.org/jira/browse/EMAIL-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347764#comment-14347764 ] Richard DiCroce commented on EMAIL-149: --- It's been a while since I filed this so I might not have all the details straight anymore. I don't have any debug output but the problem isn't hard to understand. I configure a mail Session in WildFly, including the from attribute in WildFly's configuration. WildFly creates the mail Session and binds it in JNDI. When creating the Session, WildFly notices the from attribute and sets the value of mail.from in the Session, which is the correct attribute to use according to the JavaMail Javadoc. I obtain the Session from JNDI and provide it to the Email object. The idea here is that all of the necessary configuration should have occurred when WildFly created the Session, so I should not need to call Email#setFrom(). But when I try to send the Email, I get an exception saying From address required. This occurs because of the checks in Email#buildMimeMessage() at lines 1315 to 1325. It first checks if the fromAddress field in the Email itself is set. It isn't because I shouldn't need to set it, as WildFly has already set the property in the session. Because fromAddress is null, the code then checks whether the mail.smtp.from property is set in the session. It isn't set because that is a non-standard property. And so an exception is thrown and the message is not sent. It looks to me like mail.from and mail.smtp.from are trying to do the same thing, hence why I said the value of the MAIL_SMTP_FROM constant is incorrect. If they're not doing the same thing, then the code should at least be adjusted to check mail.from in addition to mail.smtp.from before throwing an exception. EmailConstants.MAIL_SMTP_FROM value is incorrect Key: EMAIL-149 URL: https://issues.apache.org/jira/browse/EMAIL-149 Project: Commons Email Issue Type: Bug Affects Versions: 1.3.3 Reporter: Richard DiCroce Per the JavaMail Javadoc (https://javamail.java.net/nonav/docs/api/), the standard property for the from address is mail.from, not mail.smtp.from. This incorrect value causes sending emails to fail if using a Session provided by an EE container that properly sets the from address. Observed on WildFly 8.2.0.Final. Workaround: add the mail.smtp.from value to the session properties. You don't need to set the actual value, the fact that it's there is enough: session.getProperties().setProperty(EmailConstants.MAIL_SMTP_FROM, ); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CONFIGURATION-597) Periods in INI file keys not parsed correctly
Ryan Fox created CONFIGURATION-597: -- Summary: Periods in INI file keys not parsed correctly Key: CONFIGURATION-597 URL: https://issues.apache.org/jira/browse/CONFIGURATION-597 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.10 Reporter: Ryan Fox Priority: Minor I am using HierarchicalINIConfiguration. When I try to parse an INI file with periods in the key definitions, something goes wrong, and the periods are parsed incorrectly. For example, my INI file looks like [foods] breakfast.drink=oj lunch.drink=milk dinner.drink=beer And my java code looks like File configFile = new File(path/to/the/file.ini); HierarchicalINIConfiguration config = new HierarchichalINIConfiguration(configFile); config.getSection(foods).getString(breakfast.drink, null); // null config.getSection(foods).getString(breakfast..drink, null); // oj Note the double period in the second one. Is this something I'm doing wrong, or is there a bug in the parser? Are periods such as this even allowed in INI files? I can't find anything explicitly saying either way. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (EMAIL-149) EmailConstants.MAIL_SMTP_FROM value is incorrect
[ https://issues.apache.org/jira/browse/EMAIL-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14348247#comment-14348247 ] Thomas Neidhart commented on EMAIL-149: --- ok now it is clear, the case that you outlined should be handled correctly. EmailConstants.MAIL_SMTP_FROM value is incorrect Key: EMAIL-149 URL: https://issues.apache.org/jira/browse/EMAIL-149 Project: Commons Email Issue Type: Bug Affects Versions: 1.3.3 Reporter: Richard DiCroce Per the JavaMail Javadoc (https://javamail.java.net/nonav/docs/api/), the standard property for the from address is mail.from, not mail.smtp.from. This incorrect value causes sending emails to fail if using a Session provided by an EE container that properly sets the from address. Observed on WildFly 8.2.0.Final. Workaround: add the mail.smtp.from value to the session properties. You don't need to set the actual value, the fact that it's there is enough: session.getProperties().setProperty(EmailConstants.MAIL_SMTP_FROM, ); -- This message was sent by Atlassian JIRA (v6.3.4#6332)