[jira] [Created] (DBCP-480) Update Apache Commons Pool from 2.4.2 to 2.4.3
Gary Gregory created DBCP-480: - Summary: Update Apache Commons Pool from 2.4.2 to 2.4.3 Key: DBCP-480 URL: https://issues.apache.org/jira/browse/DBCP-480 Project: Commons Dbcp Issue Type: Improvement Affects Versions: 2.1.1 Reporter: Gary Gregory Fix For: 2.2 Update Apache Commons Pool from 2.4.2 to 2.4.3 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (LANG-1362) Fix tests DateUtilsTest for Java 9 with en_GB locale
[ https://issues.apache.org/jira/browse/LANG-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated LANG-1362: Priority: Minor (was: Major) Component/s: lang.time.* > Fix tests DateUtilsTest for Java 9 with en_GB locale > > > Key: LANG-1362 > URL: https://issues.apache.org/jira/browse/LANG-1362 > Project: Commons Lang > Issue Type: Bug > Components: lang.time.* >Reporter: Stephen Colebourne >Priority: Minor > Fix For: 3.7 > > > On Java 9 I see DateUtilsTest fail. This is because "MST7MDT" zone is not > formatted as "MST". I'm unclear as to why this is, but it is not relevant to > what the test is trying to do. As such, I've changed the zone to > "America/Denver" and changed the format letter from "z" to "XXX" to make it > more reliable. > The PR also uses try-finally when setting the default time-zone to avoid > pollution of global state if a test fails (the pollution here made it look > like 8 test failures when there was only in fact 1). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TEXT-94) Add Damerau option to Levenshtein edit distance
[ https://issues.apache.org/jira/browse/TEXT-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223711#comment-16223711 ] Pascal Schumacher commented on TEXT-94: --- [~arohit] I am obviously not Rob, but Rob has not committed a solution for this in over two months, so I guess he is not currently working on it and you are welcome to give it a try. > Add Damerau option to Levenshtein edit distance > --- > > Key: TEXT-94 > URL: https://issues.apache.org/jira/browse/TEXT-94 > Project: Commons Text > Issue Type: Improvement >Affects Versions: 1.1 >Reporter: Ulf Dittmer >Assignee: Rob Tompkins >Priority: Minor > > Please add support for transpositions of two characters as defined by the > Levenshtein-Damerau edit distance: > https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance > It's not hard to implement, and some code for it can be found as part of > https://issues.apache.org/jira/browse/LUCENE-3662 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Resolved] (DAEMON-328) Tomcat windows service doesn't start when installed in a folder containing non-standard characters.
[ https://issues.apache.org/jira/browse/DAEMON-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Thomas resolved DAEMON-328. Resolution: Not A Problem This is a Java issue, not an Apache Tomcat or Apache Commons Daemon issue. java doesn't seem to be able to handle some characters in the class path command line option. > Tomcat windows service doesn't start when installed in a folder containing > non-standard characters. > --- > > Key: DAEMON-328 > URL: https://issues.apache.org/jira/browse/DAEMON-328 > Project: Commons Daemon > Issue Type: Bug > Components: Procrun >Affects Versions: 1.0.15 > Environment: Windows 7, 64bits, English version >Reporter: Piri Babuscov > > 1. On an English Windows 7, 64bits unzip tomcat7 (7.0.54) in a folder name > containing Japanese characters, like: "C:\TFバッチビルダー" > 2. Call 'service.bat install', worked well, Tomcat7 service appears in > Windows > 3. Trying to start the service failed. Below is the commons-daemon log: > [2014-12-11 15:55:43] [info] [ 2728] Commons Daemon procrun (1.0.15.0 > 64-bit) started > [2014-12-11 15:55:43] [info] [ 2728] Service Tomcat754 name Apache Tomcat > 7.0 Tomcat754 > [2014-12-11 15:55:43] [info] [ 2728] Service 'Tomcat754' installed > [2014-12-11 15:55:43] [info] [ 2728] Commons Daemon procrun finished > [2014-12-11 15:55:52] [info] [ 7596] Commons Daemon procrun (1.0.15.0 > 64-bit) started > [2014-12-11 15:55:52] [info] [ 7596] Running 'Tomcat754' Service... > [2014-12-11 15:55:52] [info] [ 6720] Starting service... > [2014-12-11 15:55:52] [error] [ 7472] FindClass > org/apache/catalina/startup/Bootstrap failed > [2014-12-11 15:55:52] [error] [ 6720] Failed to start Java > [2014-12-11 15:55:52] [error] [ 6720] ServiceStart returned 4 > [2014-12-11 15:55:52] [info] [ 7596] Run service finished. > [2014-12-11 15:55:52] [info] [ 7596] Commons Daemon procrun finished > [2014-12-11 15:56:46] [debug] ( prunsrv.c:1679) [ 3308] Commons Daemon > procrun log initialized > [2014-12-11 15:56:46] [info] ( prunsrv.c:1683) [ 3308] Commons Daemon > procrun (1.0.15.0 64-bit) started > [2014-12-11 15:56:46] [info] ( prunsrv.c:1596) [ 3308] Running 'Tomcat754' > Service... > [2014-12-11 15:56:46] [debug] ( prunsrv.c:1374) [ 5040] Inside ServiceMain... > [2014-12-11 15:56:46] [debug] ( prunsrv.c:844 ) [ 5040] reportServiceStatusE: > 2, 0, 3000, 0 > [2014-12-11 15:56:46] [info] ( prunsrv.c:1127) [ 5040] Starting service... > [2014-12-11 15:56:46] [debug] ( javajni.c:233 ) [ 5040] loading jvm > 'C:\Program Files\Java\jdk1.7.0_02\jre\bin\server\jvm.dll' > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[0] > -Dcatalina.home=c:\TF???\apache-tomcat-7.0.54 > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[1] > -Dcatalina.base=c:\TF???\apache-tomcat-7.0.54 > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[2] > -Djava.endorsed.dirs=c:\TF???\apache-tomcat-7.0.54\endorsed > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[3] > -Djava.io.tmpdir=c:\TF???\apache-tomcat-7.0.54\temp > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[4] > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[5] > -Djava.util.logging.config.file=c:\TF???\apache-tomcat-7.0.54\conf\logging.properties > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[6] > -Djava.class.path=c:\TF???\apache-tomcat-7.0.54\bin\bootstrap.jar;c:\TF???\apache-tomcat-7.0.54\bin\tomcat-juli.jar > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[7] exit > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[8] -Xms128m > [2014-12-11 15:56:46] [debug] ( javajni.c:704 ) [ 5808] Jvm Option[9] -Xmx256m > [2014-12-11 15:56:46] [error] ( javajni.c:863 ) [ 5808] FindClass > org/apache/catalina/startup/Bootstrap failed > [2014-12-11 15:56:46] [debug] ( javajni.c:964 ) [ 5808] Java Worker thread > finished org/apache/catalina/startup/Bootstrap:main with status=3 > [2014-12-11 15:56:46] [error] ( prunsrv.c:1183) [ 5040] Failed to start Java > [2014-12-11 15:56:46] [error] ( prunsrv.c:1536) [ 5040] ServiceStart returned > 4 > [2014-12-11 15:56:46] [debug] ( prunsrv.c:844 ) [ 5040] reportServiceStatusE: > 1, 1066, 0, 4 > [2014-12-11 15:56:46] [info] ( prunsrv.c:1598) [ 3308] Run service finished. > [2014-12-11 15:56:46] [info] ( prunsrv.c:1764) [ 3308] Commons Daemon > procrun finished > [2014-12-11 16:03:15] [info] [ 5348] Commons Daemon procrun (1.0.15.0 > 64-bit) started > [2014-12-11 16:03:15] [info] [ 5348] Deleting service... > [2014-12-11 16:03:15] [info] [ 5348] Delete service
[jira] [Updated] (LANG-1364) ExceptionUtils#getRootCause* inconsistency
[ https://issues.apache.org/jira/browse/LANG-1364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated LANG-1364: Affects Version/s: 3.6 > ExceptionUtils#getRootCause* inconsistency > -- > > Key: LANG-1364 > URL: https://issues.apache.org/jira/browse/LANG-1364 > Project: Commons Lang > Issue Type: Bug >Affects Versions: 3.6 >Reporter: Pascal Schumacher > > {quote} > I have found the design of three root cause related methods inconsistent > when the input Throwable does not wrap up another Throwable. > These three methods are >1. getRootCause(Throwable t) >2. getRootCauseMessage(Throwable t) >3. getRootCauseStackTrace(Throwable t) > When the input t has no lower level cause: >- the first method returns null; >- the second method returns the message of t, which means the input t is >considered as the root cause in this method; >- the third method returns the stack trace of t, which also means this >method considers t as the root cause. > Therefore, I consider the design of the first method is not consistent with > the second and the third. > I usually write a function myself to get the root cause of an exception; > and it makes much better sense to me the root cause of a Throwable is > itself if no more lower level cause exists. > A request: change the first method to return t itself when there is no more > 'causes'. > {quote} > Reported by Zheng Xie in > https://mail-archives.apache.org/mod_mbox/commons-dev/201710.mbox/%3CCAL-LHk7jvQGM9J1SPxLB2qEsXazwwq%2BYKuv29XgWXEcccHUn0w%40mail.gmail.com%3E -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (LANG-1364) ExceptionUtils#getRootCause* inconsistency
Pascal Schumacher created LANG-1364: --- Summary: ExceptionUtils#getRootCause* inconsistency Key: LANG-1364 URL: https://issues.apache.org/jira/browse/LANG-1364 Project: Commons Lang Issue Type: Bug Reporter: Pascal Schumacher {quote} I have found the design of three root cause related methods inconsistent when the input Throwable does not wrap up another Throwable. These three methods are 1. getRootCause(Throwable t) 2. getRootCauseMessage(Throwable t) 3. getRootCauseStackTrace(Throwable t) When the input t has no lower level cause: - the first method returns null; - the second method returns the message of t, which means the input t is considered as the root cause in this method; - the third method returns the stack trace of t, which also means this method considers t as the root cause. Therefore, I consider the design of the first method is not consistent with the second and the third. I usually write a function myself to get the root cause of an exception; and it makes much better sense to me the root cause of a Throwable is itself if no more lower level cause exists. A request: change the first method to return t itself when there is no more 'causes'. {quote} Reported by Zheng Xie in https://mail-archives.apache.org/mod_mbox/commons-dev/201710.mbox/%3CCAL-LHk7jvQGM9J1SPxLB2qEsXazwwq%2BYKuv29XgWXEcccHUn0w%40mail.gmail.com%3E -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (LANG-1362) Fix tests DateUtilsTest for Java 9 with en_GB locale
[ https://issues.apache.org/jira/browse/LANG-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223696#comment-16223696 ] Pascal Schumacher commented on LANG-1362: - To replicated add {code}-Duser.country=GB -Duser.language=en{code} to surefire argLine. > Fix tests DateUtilsTest for Java 9 with en_GB locale > > > Key: LANG-1362 > URL: https://issues.apache.org/jira/browse/LANG-1362 > Project: Commons Lang > Issue Type: Bug >Reporter: Stephen Colebourne > Fix For: 3.7 > > > On Java 9 I see DateUtilsTest fail. This is because "MST7MDT" zone is not > formatted as "MST". I'm unclear as to why this is, but it is not relevant to > what the test is trying to do. As such, I've changed the zone to > "America/Denver" and changed the format letter from "z" to "XXX" to make it > more reliable. > The PR also uses try-finally when setting the default time-zone to avoid > pollution of global state if a test fails (the pollution here made it look > like 8 test failures when there was only in fact 1). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (LANG-1362) Fix tests DateUtilsTest for Java 9 with en_GB locale
[ https://issues.apache.org/jira/browse/LANG-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated LANG-1362: Summary: Fix tests DateUtilsTest for Java 9 with en_GB locale (was: Fix tests for Java 9) > Fix tests DateUtilsTest for Java 9 with en_GB locale > > > Key: LANG-1362 > URL: https://issues.apache.org/jira/browse/LANG-1362 > Project: Commons Lang > Issue Type: Bug >Reporter: Stephen Colebourne > Fix For: 3.7 > > > On Java 9 I see DateUtilsTest fail. This is because "MST7MDT" zone is not > formatted as "MST". I'm unclear as to why this is, but it is not relevant to > what the test is trying to do. As such, I've changed the zone to > "America/Denver" and changed the format letter from "z" to "XXX" to make it > more reliable. > The PR also uses try-finally when setting the default time-zone to avoid > pollution of global state if a test fails (the pollution here made it look > like 8 test failures when there was only in fact 1). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] commons-lang issue #304: Fix DateUtilsTest to work reliably on Java 9
Github user PascalSchumacher commented on the issue: https://github.com/apache/commons-lang/pull/304 @garydgregory For me too and the build on travis with java 9 has been sucessfully running for months now. This seems to be a locale related thing. I can replicated the 8 test failures by adding `-Duser.country=GB -Duser.language=en` to surefire `argLine`. ---
[GitHub] commons-lang pull request #299: Add module-info for Java 9
Github user PascalSchumacher commented on a diff in the pull request: https://github.com/apache/commons-lang/pull/299#discussion_r147560886 --- Diff: .travis.yml --- @@ -21,8 +21,19 @@ jdk: - oraclejdk8 - oraclejdk9 +cache: + directories: +- "$HOME/.m2/repository" + +before_cache: + - rm -rf $HOME/.m2/repository/org/apache/commons/commons-lang3 + +install: + - mvn --version + script: - - mvn + - mvn -e -B after_success: - - mvn clean cobertura:cobertura coveralls:report -Ptravis-cobertura + - if [ $TRAVIS_JDK_VERSION == "openjdk7" ] || [ $TRAVIS_JDK_VERSION == "oraclejdk8" ]; then mvn -e -B clean cobertura:cobertura coveralls:report -Ptravis-cobertura; fi + - if [ $TRAVIS_JDK_VERSION == "oraclejdk9" ]; then mvn -e -B clean cobertura:cobertura -Ptravis-cobertura; fi --- End diff -- Nitpick: I think we can remove this line, because running `cobertura` without uploading to `coveralls` mostly just wastes cpu cycles. ---
[jira] [Updated] (COMMONSRDF-66) JenaDatasetImpl.toString() throws RIOT exception
[ https://issues.apache.org/jira/browse/COMMONSRDF-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christopher Johnson updated COMMONSRDF-66: -- Description: Occurs from this method [https://github.com/apache/commons-rdf/blob/master/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java#L152] on instantiation: The exception message is "No dataset writer for N-Triples/utf-8". The source is RDFWriterRegistry that builds a registryDataset HashMap of 17 +Dataset+ RDFFormats that does not include this serialization. The registryGraph HashMap has 25 RDFFormats that does include "N-Triples/utf-8". No exception is thrown if Lang.NQUADS is set in the toString() method. was: Occurs from this method [https://github.com/apache/commons-rdf/blob/master/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java#L152] on instantiation: The exception message is "No dataset writer for Turtle/pretty". The source is RDFWriterRegistry that builds a registryDataset HashMap of 17 +Dataset+ RDFFormats that does not include this serialization. The registryGraph HashMap has 25 RDFFormats that does include "Turtle/pretty". No exception is thrown if Lang.NQUADS is set in the toString() method. > JenaDatasetImpl.toString() throws RIOT exception > > > Key: COMMONSRDF-66 > URL: https://issues.apache.org/jira/browse/COMMONSRDF-66 > Project: Apache Commons RDF > Issue Type: Bug > Components: jena >Affects Versions: 0.3.0 >Reporter: Christopher Johnson > > Occurs from this method > [https://github.com/apache/commons-rdf/blob/master/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java#L152] > on instantiation: > The exception message is "No dataset writer for N-Triples/utf-8". > The source is RDFWriterRegistry that builds a registryDataset HashMap of 17 > +Dataset+ RDFFormats that does not include this serialization. The > registryGraph HashMap has 25 RDFFormats that does include "N-Triples/utf-8". > No exception is thrown if Lang.NQUADS is set in the toString() method. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (COMMONSRDF-66) JenaDatasetImpl.toString() throws RIOT exception
Christopher Johnson created COMMONSRDF-66: - Summary: JenaDatasetImpl.toString() throws RIOT exception Key: COMMONSRDF-66 URL: https://issues.apache.org/jira/browse/COMMONSRDF-66 Project: Apache Commons RDF Issue Type: Bug Components: jena Affects Versions: 0.3.0 Reporter: Christopher Johnson Occurs from this method [https://github.com/apache/commons-rdf/blob/master/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java#L152] on instantiation: The exception message is "No dataset writer for Turtle/pretty". The source is RDFWriterRegistry that builds a registryDataset HashMap of 17 +Dataset+ RDFFormats that does not include this serialization. The registryGraph HashMap has 25 RDFFormats that does include "Turtle/pretty". No exception is thrown if Lang.NQUADS is set in the toString() method. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (TEXT-106) Exception thrown in ExtendedMessageFormat using quotes with custom registry
[ https://issues.apache.org/jira/browse/TEXT-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223434#comment-16223434 ] Bruno P. Kinoshita edited comment on TEXT-106 at 10/28/17 11:33 AM: Thank you for creating the ticket, and for creating a patch (and big thanks for the unit test!). Created a pull request in GitHub with your patch, so that others can review it too. Code looks good to me, and all tests pass. From your rationale I agree with the suggested patch. Let's just give some time for other to review before merging it. Feel free to create a pull request in GitHub too, if you'd prefer. Whichever works best for you :-) Thanks one again. Bruno was (Author: kinow): Thank you for creating the ticket, and for creating a patch (and big thanks for the unit test!). Created a pull request in GitHub with your patch, so that others can review it too. Code looks good to me, and all tests pass. From your rationale I agree with the suggested patch. Let's just give some time for other to review before merging it. Thanks one again. Bruno > Exception thrown in ExtendedMessageFormat using quotes with custom registry > --- > > Key: TEXT-106 > URL: https://issues.apache.org/jira/browse/TEXT-106 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Benoît Moreau >Assignee: Bruno P. Kinoshita > Attachments: ExtendedMessageFormat.java.patch, > ExtendedMessageFormatTest.java.patch > > > An exception is thrown when a quote is used just before end brace of format > element definition when a custom registry is used. > This exception is not thrown when a blank space is added before the end brace. > {code:java} > public static void main(String[] args) > { > String pattern = "TEST: {0,choice,0#0|0<'1'}"; > String patternWorkaround = "TEST: {0,choice,0#0|0<'1' }"; // a space > after quote > // Works fine > MessageFormat format0 = new MessageFormat(pattern); > System.out.println(format0.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format0.format(new Integer[] { 1 })); // "TEST: 1" > // Works fine > ExtendedMessageFormat format1 = new ExtendedMessageFormat(pattern); > System.out.println(format1.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format1.format(new Integer[] { 1 })); // "TEST: 1" > // Works fine > ExtendedMessageFormat format2 = new > ExtendedMessageFormat(patternWorkaround, new HashMapFormatFactory>()); > System.out.println(format2.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format2.format(new Integer[] { 1 })); // "TEST: 1 " > // Doesn't work > ExtendedMessageFormat format3 = new ExtendedMessageFormat(pattern, new > HashMap ()); > System.out.println(format3.format(new Integer[] { 0 })); // Exception > in thread "main" java.lang.IllegalArgumentException: Unterminated format > element at position 9 > System.out.println(format3.format(new Integer[] { 1 })); > } > {code} > Expected behavior: This exception should not be thrown. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TEXT-106) Exception thrown in ExtendedMessageFormat using quotes with custom registry
[ https://issues.apache.org/jira/browse/TEXT-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223434#comment-16223434 ] Bruno P. Kinoshita commented on TEXT-106: - Thank you for creating the ticket, and for creating a patch (and big thanks for the unit test!). Created a pull request in GitHub with your patch, so that others can review it too. Code looks good to me, and all tests pass. From your rationale I agree with the suggested patch. Let's just give some time for other to review before merging it. Thanks one again. Bruno > Exception thrown in ExtendedMessageFormat using quotes with custom registry > --- > > Key: TEXT-106 > URL: https://issues.apache.org/jira/browse/TEXT-106 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Benoît Moreau >Assignee: Bruno P. Kinoshita > Attachments: ExtendedMessageFormat.java.patch, > ExtendedMessageFormatTest.java.patch > > > An exception is thrown when a quote is used just before end brace of format > element definition when a custom registry is used. > This exception is not thrown when a blank space is added before the end brace. > {code:java} > public static void main(String[] args) > { > String pattern = "TEST: {0,choice,0#0|0<'1'}"; > String patternWorkaround = "TEST: {0,choice,0#0|0<'1' }"; // a space > after quote > // Works fine > MessageFormat format0 = new MessageFormat(pattern); > System.out.println(format0.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format0.format(new Integer[] { 1 })); // "TEST: 1" > // Works fine > ExtendedMessageFormat format1 = new ExtendedMessageFormat(pattern); > System.out.println(format1.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format1.format(new Integer[] { 1 })); // "TEST: 1" > // Works fine > ExtendedMessageFormat format2 = new > ExtendedMessageFormat(patternWorkaround, new HashMapFormatFactory>()); > System.out.println(format2.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format2.format(new Integer[] { 1 })); // "TEST: 1 " > // Doesn't work > ExtendedMessageFormat format3 = new ExtendedMessageFormat(pattern, new > HashMap ()); > System.out.println(format3.format(new Integer[] { 0 })); // Exception > in thread "main" java.lang.IllegalArgumentException: Unterminated format > element at position 9 > System.out.println(format3.format(new Integer[] { 1 })); > } > {code} > Expected behavior: This exception should not be thrown. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TEXT-106) Exception thrown in ExtendedMessageFormat using quotes with custom registry
[ https://issues.apache.org/jira/browse/TEXT-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223432#comment-16223432 ] ASF GitHub Bot commented on TEXT-106: - GitHub user kinow opened a pull request: https://github.com/apache/commons-text/pull/73 Exception thrown in ExtendedMessageFormat using quotes with custom registry Created this pull request from the patch provided by Benoît Moreau in [TEXT-106](https://issues.apache.org/jira/browse/TEXT-106). Thanks for your contribution Benoît! Cheers Bruno You can merge this pull request into a Git repository by running: $ git pull https://github.com/kinow/commons-text TEXT-106 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-text/pull/73.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #73 commit 1596501e610bca7955969bb94fe6c6bad397e361 Author: Bruno P. KinoshitaDate: 2017-10-28T11:28:04Z TEXT-106: Exception thrown in ExtendedMessageFormat using quotes with custom registry Applying patch provided by Benoît Moreau (thanks!). > Exception thrown in ExtendedMessageFormat using quotes with custom registry > --- > > Key: TEXT-106 > URL: https://issues.apache.org/jira/browse/TEXT-106 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Benoît Moreau >Assignee: Bruno P. Kinoshita > Attachments: ExtendedMessageFormat.java.patch, > ExtendedMessageFormatTest.java.patch > > > An exception is thrown when a quote is used just before end brace of format > element definition when a custom registry is used. > This exception is not thrown when a blank space is added before the end brace. > {code:java} > public static void main(String[] args) > { > String pattern = "TEST: {0,choice,0#0|0<'1'}"; > String patternWorkaround = "TEST: {0,choice,0#0|0<'1' }"; // a space > after quote > // Works fine > MessageFormat format0 = new MessageFormat(pattern); > System.out.println(format0.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format0.format(new Integer[] { 1 })); // "TEST: 1" > // Works fine > ExtendedMessageFormat format1 = new ExtendedMessageFormat(pattern); > System.out.println(format1.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format1.format(new Integer[] { 1 })); // "TEST: 1" > // Works fine > ExtendedMessageFormat format2 = new > ExtendedMessageFormat(patternWorkaround, new HashMap FormatFactory>()); > System.out.println(format2.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format2.format(new Integer[] { 1 })); // "TEST: 1 " > // Doesn't work > ExtendedMessageFormat format3 = new ExtendedMessageFormat(pattern, new > HashMap ()); > System.out.println(format3.format(new Integer[] { 0 })); // Exception > in thread "main" java.lang.IllegalArgumentException: Unterminated format > element at position 9 > System.out.println(format3.format(new Integer[] { 1 })); > } > {code} > Expected behavior: This exception should not be thrown. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (TEXT-106) Exception thrown in ExtendedMessageFormat using quotes with custom registry
[ https://issues.apache.org/jira/browse/TEXT-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno P. Kinoshita updated TEXT-106: Assignee: Bruno P. Kinoshita > Exception thrown in ExtendedMessageFormat using quotes with custom registry > --- > > Key: TEXT-106 > URL: https://issues.apache.org/jira/browse/TEXT-106 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Benoît Moreau >Assignee: Bruno P. Kinoshita > Attachments: ExtendedMessageFormat.java.patch, > ExtendedMessageFormatTest.java.patch > > > An exception is thrown when a quote is used just before end brace of format > element definition when a custom registry is used. > This exception is not thrown when a blank space is added before the end brace. > {code:java} > public static void main(String[] args) > { > String pattern = "TEST: {0,choice,0#0|0<'1'}"; > String patternWorkaround = "TEST: {0,choice,0#0|0<'1' }"; // a space > after quote > // Works fine > MessageFormat format0 = new MessageFormat(pattern); > System.out.println(format0.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format0.format(new Integer[] { 1 })); // "TEST: 1" > // Works fine > ExtendedMessageFormat format1 = new ExtendedMessageFormat(pattern); > System.out.println(format1.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format1.format(new Integer[] { 1 })); // "TEST: 1" > // Works fine > ExtendedMessageFormat format2 = new > ExtendedMessageFormat(patternWorkaround, new HashMapFormatFactory>()); > System.out.println(format2.format(new Integer[] { 0 })); // "TEST: 0" > System.out.println(format2.format(new Integer[] { 1 })); // "TEST: 1 " > // Doesn't work > ExtendedMessageFormat format3 = new ExtendedMessageFormat(pattern, new > HashMap ()); > System.out.println(format3.format(new Integer[] { 0 })); // Exception > in thread "main" java.lang.IllegalArgumentException: Unterminated format > element at position 9 > System.out.println(format3.format(new Integer[] { 1 })); > } > {code} > Expected behavior: This exception should not be thrown. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] commons-lang issue #299: Add module-info for Java 9
Github user britter commented on the issue: https://github.com/apache/commons-lang/pull/299 I'll bring this up a last time on the ML to make sure nobody has objections against merging this. ---