[jira] [Commented] (LANG-1397) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE
[ https://issues.apache.org/jira/browse/LANG-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480131#comment-16480131 ] ASF GitHub Bot commented on LANG-1397: -- Github user tasanuma commented on the issue: https://github.com/apache/commons-lang/pull/330 Thanks for your advice, @PascalSchumacher! I updated the pull request addressing it. > WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is > Integer.MAX_VALUE > -- > > Key: LANG-1397 > URL: https://issues.apache.org/jira/browse/LANG-1397 > Project: Commons Lang > Issue Type: Bug >Affects Versions: 3.7 >Reporter: Takanobu Asanuma >Priority: Major > > This is the sample code. > {code:java} > int max = Integer.MAX_VALUE; // 2147483647 > WordUtils.wrap("foobar", max, "\n", true); > {code} > and the error log. > {noformat} > Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String > index out of range: -2147483648 > at java.lang.String.substring(String.java:1967) > at org.apache.commons.lang3.text.WordUtils.wrap(WordUtils.java:291) > at org.apache.commons.lang3.text.WordUtils.wrap(WordUtils.java:179) > {noformat} > Seems WordUtils in commons-text has the same bug. I will file it on > commons-text side later. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] commons-lang issue #330: LANG-1397: WordUtils.wrap throws StringIndexOutOfBo...
Github user tasanuma commented on the issue: https://github.com/apache/commons-lang/pull/330 Thanks for your advice, @PascalSchumacher! I updated the pull request addressing it. ---
[jira] [Commented] (LANG-1238) Add RegexUtils class instead of overloadinh methods in StringUtils that take a regex to take precompiled Pattern
[ https://issues.apache.org/jira/browse/LANG-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480066#comment-16480066 ] ASF GitHub Bot commented on LANG-1238: -- Github user coms closed the pull request at: https://github.com/apache/commons-lang/pull/328 > Add RegexUtils class instead of overloadinh methods in StringUtils that take > a regex to take precompiled Pattern > > > Key: LANG-1238 > URL: https://issues.apache.org/jira/browse/LANG-1238 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Affects Versions: 3.4 >Reporter: Christopher Cordeiro >Priority: Minor > Fix For: 3.8 > > > For performance reasons, it would be nice if the operations in StringUtils > that take a regular expression (removePattern/replacePattern) were overloaded > to optionally take a precompiled Pattern. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] commons-lang pull request #328: [LANG-1238] Add overloaded methods to String...
Github user coms closed the pull request at: https://github.com/apache/commons-lang/pull/328 ---
[jira] [Updated] (CONFIGURATION-700) Issue With backslash(\) and Forwardslash(/)
[ https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gavin updated CONFIGURATION-700: Attachment: (was: forrest-logo.png) > Issue With backslash(\) and Forwardslash(/) > --- > > Key: CONFIGURATION-700 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-700 > Project: Commons Configuration > Issue Type: Bug > Components: Build >Affects Versions: 1.10 >Reporter: Amitabh Pandey >Priority: Major > Fix For: 1.10 > > Attachments: Getting Output.jpg, Original Property File Contenet.jpg > > > Dear Team, > I am using commons-configuration-1.10.jar for updating property file in java. > I have achieve all my requirement(Preserve comment, White space) with this > API.But stuck at one point.It is not working as per my expectations with > slash.Below is one example. > I have below url in my properties file. > *C\:ABC.net/wsdl* > Now it is getting change to below after modification > *C:ABC.net\/wsdl* > Means it is removing the backslash and changing forwardslash to \/.I know it > is escaping character. But is there any way to prevent this. I cant not > change any thing in property file. I have to handle through code only. > Because of only this issue I again moved to Java util API. > Please check fix of this. Rest is excellent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CONFIGURATION-700) Issue With backslash(\) and Forwardslash(/)
[ https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gavin updated CONFIGURATION-700: Attachment: forrest-logo.png > Issue With backslash(\) and Forwardslash(/) > --- > > Key: CONFIGURATION-700 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-700 > Project: Commons Configuration > Issue Type: Bug > Components: Build >Affects Versions: 1.10 >Reporter: Amitabh Pandey >Priority: Major > Fix For: 1.10 > > Attachments: Getting Output.jpg, Original Property File Contenet.jpg, > forrest-logo.png > > > Dear Team, > I am using commons-configuration-1.10.jar for updating property file in java. > I have achieve all my requirement(Preserve comment, White space) with this > API.But stuck at one point.It is not working as per my expectations with > slash.Below is one example. > I have below url in my properties file. > *C\:ABC.net/wsdl* > Now it is getting change to below after modification > *C:ABC.net\/wsdl* > Means it is removing the backslash and changing forwardslash to \/.I know it > is escaping character. But is there any way to prevent this. I cant not > change any thing in property file. I have to handle through code only. > Because of only this issue I again moved to Java util API. > Please check fix of this. Rest is excellent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (LANG-1238) Add RegexUtils class instead of overloadinh methods in StringUtils that take a regex to take precompiled Pattern
[ https://issues.apache.org/jira/browse/LANG-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory resolved LANG-1238. Resolution: Fixed Fix Version/s: (was: Patch Needed) 3.8 [~oleg.chubaryov]: Thank you for your patch. I've applied it to git master and followed up with a couple of tweaks. Please verify and close this issue and the PR. > Add RegexUtils class instead of overloadinh methods in StringUtils that take > a regex to take precompiled Pattern > > > Key: LANG-1238 > URL: https://issues.apache.org/jira/browse/LANG-1238 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Affects Versions: 3.4 >Reporter: Christopher Cordeiro >Priority: Minor > Fix For: 3.8 > > > For performance reasons, it would be nice if the operations in StringUtils > that take a regular expression (removePattern/replacePattern) were overloaded > to optionally take a precompiled Pattern. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (LANG-1238) Add RegexUtils class instead of overloadinh methods in StringUtils that take a regex to take precompiled Pattern
[ https://issues.apache.org/jira/browse/LANG-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory updated LANG-1238: --- Summary: Add RegexUtils class instead of overloadinh methods in StringUtils that take a regex to take precompiled Pattern (was: Overload Operations in StringUtils that take a regex to take precompiled Pattern) > Add RegexUtils class instead of overloadinh methods in StringUtils that take > a regex to take precompiled Pattern > > > Key: LANG-1238 > URL: https://issues.apache.org/jira/browse/LANG-1238 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Affects Versions: 3.4 >Reporter: Christopher Cordeiro >Priority: Minor > Fix For: Patch Needed > > > For performance reasons, it would be nice if the operations in StringUtils > that take a regular expression (removePattern/replacePattern) were overloaded > to optionally take a precompiled Pattern. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (STATISTICS-1) Set up project repository
[ https://issues.apache.org/jira/browse/STATISTICS-1?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gilles updated STATISTICS-1: Description: Populate the "git" repository. * (/) [Web site directory|http://commons.apache.org/commons-statistics/] * (/) Link on "Commons" [web site|http://commons.apache.org/components.html] * (/) Fix redirection from http://commons.apache.org/statistics to http://commons.apache.org/proper/commons-statistics * (x) License * (/) Maven project files (from "Commons" templates) * (x) Scope description * (/) [GitHub|https://github.com/apache/commons-statistics] * (x) Travis * (/) [Jenkins|https://builds.apache.org/view/A-D/view/Commons/job/commons-statistics/] * (/) Create a logo * ... was: Populate the "git" repository. * (/) [Web site directory|http://commons.apache.org/commons-statistics/] * (/) Link on "Commons" [web site|http://commons.apache.org/components.html] * (x) Fix redirection from http://commons.apache.org/statistics to http://commons.apache.org/proper/commons-statistics * (x) License * (/) Maven project files (from "Commons" templates) * (x) Scope description * (/) [GitHub|https://github.com/apache/commons-statistics] * (x) Travis * (/) [Jenkins|https://builds.apache.org/view/A-D/view/Commons/job/commons-statistics/] * (/) Create a logo * ... > Set up project repository > - > > Key: STATISTICS-1 > URL: https://issues.apache.org/jira/browse/STATISTICS-1 > Project: Apache Commons Statistics > Issue Type: Task >Reporter: Gilles >Priority: Minor > Labels: git, maven > > Populate the "git" repository. > * (/) [Web site directory|http://commons.apache.org/commons-statistics/] > * (/) Link on "Commons" [web site|http://commons.apache.org/components.html] > * (/) Fix redirection from http://commons.apache.org/statistics to > http://commons.apache.org/proper/commons-statistics > * (x) License > * (/) Maven project files (from "Commons" templates) > * (x) Scope description > * (/) [GitHub|https://github.com/apache/commons-statistics] > * (x) Travis > * (/) > [Jenkins|https://builds.apache.org/view/A-D/view/Commons/job/commons-statistics/] > * (/) Create a logo > * ... -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (CONFIGURATION-701) Add support to CompositeConfiguration to allow Configurations to be prepend to the LinkedList
[ https://issues.apache.org/jira/browse/CONFIGURATION-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oliver Heger resolved CONFIGURATION-701. Resolution: Fixed Fix Version/s: 2.3 Patch applied in SVN revision 1831807. Many thanks again. If you want to be added to the contributors section in pom.xml, please send us the data you want to have included. > Add support to CompositeConfiguration to allow Configurations to be prepend > to the LinkedList > - > > Key: CONFIGURATION-701 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-701 > Project: Commons Configuration > Issue Type: Improvement >Affects Versions: 2.2 >Reporter: Nicholas Verbeck >Priority: Minor > Fix For: 2.3 > > Attachments: CONFIGURATION-701.patch, CONFIGURATION-701.patch > > > Create methods like addFirstConfiguration with similar signatures as > addConfiguration but instead of appending them to the LinkedList add them to > the start of the list. This would allow for support of inserting new override > configs post initial construction without needing to rebuild a new > CompositeConfiguration. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CONFIGURATION-701) Add support to CompositeConfiguration to allow Configurations to be prepend to the LinkedList
[ https://issues.apache.org/jira/browse/CONFIGURATION-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicholas Verbeck updated CONFIGURATION-701: --- Attachment: CONFIGURATION-701.patch > Add support to CompositeConfiguration to allow Configurations to be prepend > to the LinkedList > - > > Key: CONFIGURATION-701 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-701 > Project: Commons Configuration > Issue Type: Improvement >Affects Versions: 2.2 >Reporter: Nicholas Verbeck >Priority: Minor > Attachments: CONFIGURATION-701.patch, CONFIGURATION-701.patch > > > Create methods like addFirstConfiguration with similar signatures as > addConfiguration but instead of appending them to the LinkedList add them to > the start of the list. This would allow for support of inserting new override > configs post initial construction without needing to rebuild a new > CompositeConfiguration. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CONFIGURATION-701) Add support to CompositeConfiguration to allow Configurations to be prepend to the LinkedList
[ https://issues.apache.org/jira/browse/CONFIGURATION-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479627#comment-16479627 ] Nicholas Verbeck commented on CONFIGURATION-701: Changes made and attached > Add support to CompositeConfiguration to allow Configurations to be prepend > to the LinkedList > - > > Key: CONFIGURATION-701 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-701 > Project: Commons Configuration > Issue Type: Improvement >Affects Versions: 2.2 >Reporter: Nicholas Verbeck >Priority: Minor > Attachments: CONFIGURATION-701.patch, CONFIGURATION-701.patch > > > Create methods like addFirstConfiguration with similar signatures as > addConfiguration but instead of appending them to the LinkedList add them to > the start of the list. This would allow for support of inserting new override > configs post initial construction without needing to rebuild a new > CompositeConfiguration. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CONFIGURATION-701) Add support to CompositeConfiguration to allow Configurations to be prepend to the LinkedList
[ https://issues.apache.org/jira/browse/CONFIGURATION-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479601#comment-16479601 ] Oliver Heger commented on CONFIGURATION-701: Patch looks good to me. I have the following minor nits: * The @since tag on the new method should be for version 2.3. * It is probably not necessary to change the type of the _configList_ field from _List_ to _LinkedList_. To add an element at the beginning, just use {{[add|https://docs.oracle.com/javase/8/docs/api/java/util/List.html#add-int-E-](int index, [E|https://docs.oracle.com/javase/8/docs/api/java/util/List.html] element). }}I think that _LinkedList_ will handle this efficiently. When this is done, I am happy to apply the patch. > Add support to CompositeConfiguration to allow Configurations to be prepend > to the LinkedList > - > > Key: CONFIGURATION-701 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-701 > Project: Commons Configuration > Issue Type: Improvement >Affects Versions: 2.2 >Reporter: Nicholas Verbeck >Priority: Minor > Attachments: CONFIGURATION-701.patch > > > Create methods like addFirstConfiguration with similar signatures as > addConfiguration but instead of appending them to the LinkedList add them to > the start of the list. This would allow for support of inserting new override > configs post initial construction without needing to rebuild a new > CompositeConfiguration. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (TEXT-118) JSON escaping incorrect for the delete control character
[ https://issues.apache.org/jira/browse/TEXT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479579#comment-16479579 ] Pascal Schumacher commented on TEXT-118: Pull request welcome! :-) > JSON escaping incorrect for the delete control character > > > Key: TEXT-118 > URL: https://issues.apache.org/jira/browse/TEXT-118 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.2 > Environment: JDK8u162, Mac OS X 13.something. >Reporter: Dan Wallach >Priority: Minor > > Here's a simple unit test. The assertion about backspace succeeds. The > assertion about the delete character fails. Instead, the delete character > shows up in the escaped text. This violates the JSON spec, which forbids > "control characters" in strings. > {code:java} > @Test > public void testDeleteCharacter() { > String backspaceString = "Backspace: \b"; > String deleteString = "Delete: \u007F"; > assertEquals("Backspace: \\b", > StringEscapeUtils.escapeJson(backspaceString)); > assertEquals("Delete: \\u007F", StringEscapeUtils.escapeJson(deleteString)); > } > {code} > > The JSON spec doesn't have a specific escape for a delete character, but it > does explicitly exclude control characters from passing through. I'd > recommend behavior as in the above unit test. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (TEXT-120) StringEscapeUtils#unescapeJson does not unescape double quotes and forward slash
[ https://issues.apache.org/jira/browse/TEXT-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated TEXT-120: --- Affects Version/s: 1.3 > StringEscapeUtils#unescapeJson does not unescape double quotes and forward > slash > > > Key: TEXT-120 > URL: https://issues.apache.org/jira/browse/TEXT-120 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.2, 1.3 >Reporter: Pedro Robles >Assignee: Pascal Schumacher >Priority: Major > Fix For: 1.4 > > > Here's a unit test to show how the escape/unescape cycle doesn't return > expected String. > > {code:java} > @Test > public void testUnscape() { > String unscapeString = "double quote: \" and a forward slash: /"; > String escapeString = StringEscapeUtils.escapeJson(unscapeString); > assertEquals("double quote: \" and a forward slash: \/", escapeString); > assertEquals(unscapeString, StringEscapeUtils.unescapeJson(escapeString)); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (TEXT-16) Make HumanNameParser configurable
[ https://issues.apache.org/jira/browse/TEXT-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed TEXT-16. - Resolution: Won't Fix Assignee: (was: Benedikt Ritter) Fix Version/s: (was: 1.x) As HumanNameParser was removed from commons-text I am closing this. > Make HumanNameParser configurable > - > > Key: TEXT-16 > URL: https://issues.apache.org/jira/browse/TEXT-16 > Project: Commons Text > Issue Type: Improvement >Reporter: Bruno P. Kinoshita >Priority: Minor > Labels: Refactoring > > From http://markmail.org/thread/da7ayocit2dl4otv > - The constructor of the parser takes configuration options which can be > reused for several names to parse > - the parse method takes a string as parameter, containing a name > - the parse method returns an immutable Name objects which has getters for > firstName, lastName etc. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LANG-1397) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE
[ https://issues.apache.org/jira/browse/LANG-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479538#comment-16479538 ] ASF GitHub Bot commented on LANG-1397: -- Github user PascalSchumacher commented on the issue: https://github.com/apache/commons-lang/pull/330 Thanks for the pull request! I would be nice if you could amend the commit to add the issue id and description at the beginning of the commit message. Thanks! > WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is > Integer.MAX_VALUE > -- > > Key: LANG-1397 > URL: https://issues.apache.org/jira/browse/LANG-1397 > Project: Commons Lang > Issue Type: Bug >Affects Versions: 3.7 >Reporter: Takanobu Asanuma >Priority: Major > > This is the sample code. > {code:java} > int max = Integer.MAX_VALUE; // 2147483647 > WordUtils.wrap("foobar", max, "\n", true); > {code} > and the error log. > {noformat} > Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String > index out of range: -2147483648 > at java.lang.String.substring(String.java:1967) > at org.apache.commons.lang3.text.WordUtils.wrap(WordUtils.java:291) > at org.apache.commons.lang3.text.WordUtils.wrap(WordUtils.java:179) > {noformat} > Seems WordUtils in commons-text has the same bug. I will file it on > commons-text side later. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] commons-lang issue #330: LANG-1397: WordUtils.wrap throws StringIndexOutOfBo...
Github user PascalSchumacher commented on the issue: https://github.com/apache/commons-lang/pull/330 Thanks for the pull request! I would be nice if you could amend the commit to add the issue id and description at the beginning of the commit message. Thanks! ---
[jira] [Resolved] (TEXT-120) StringEscapeUtils#unescapeJson does not unescape double quotes and forward slash
[ https://issues.apache.org/jira/browse/TEXT-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved TEXT-120. Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 1.4 Fixed. Thanks for reporting! > StringEscapeUtils#unescapeJson does not unescape double quotes and forward > slash > > > Key: TEXT-120 > URL: https://issues.apache.org/jira/browse/TEXT-120 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.2 >Reporter: Pedro Robles >Assignee: Pascal Schumacher >Priority: Major > Fix For: 1.4 > > > Here's a unit test to show how the escape/unescape cycle doesn't return > expected String. > > {code:java} > @Test > public void testUnscape() { > String unscapeString = "double quote: \" and a forward slash: /"; > String escapeString = StringEscapeUtils.escapeJson(unscapeString); > assertEquals("double quote: \" and a forward slash: \/", escapeString); > assertEquals(unscapeString, StringEscapeUtils.unescapeJson(escapeString)); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (TEXT-120) StringEscapeUtils UnescapeJson does not unescape double quotes and forward slash
[ https://issues.apache.org/jira/browse/TEXT-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated TEXT-120: --- Summary: StringEscapeUtils UnescapeJson does not unescape double quotes and forward slash (was: StringEscapeUtils UnescapeJson does not unescape) > StringEscapeUtils UnescapeJson does not unescape double quotes and forward > slash > > > Key: TEXT-120 > URL: https://issues.apache.org/jira/browse/TEXT-120 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.2 >Reporter: Pedro Robles >Priority: Major > > Here's a unit test to show how the escape/unescape cycle doesn't return > expected String. > > {code:java} > @Test > public void testUnscape() { > String unscapeString = "double quote: \" and a forward slash: /"; > String escapeString = StringEscapeUtils.escapeJson(unscapeString); > assertEquals("double quote: \" and a forward slash: \/", escapeString); > assertEquals(unscapeString, StringEscapeUtils.unescapeJson(escapeString)); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (TEXT-120) StringEscapeUtils#unescapeJson does not unescape double quotes and forward slash
[ https://issues.apache.org/jira/browse/TEXT-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated TEXT-120: --- Summary: StringEscapeUtils#unescapeJson does not unescape double quotes and forward slash (was: StringEscapeUtils UnescapeJson does not unescape double quotes and forward slash) > StringEscapeUtils#unescapeJson does not unescape double quotes and forward > slash > > > Key: TEXT-120 > URL: https://issues.apache.org/jira/browse/TEXT-120 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.2 >Reporter: Pedro Robles >Priority: Major > > Here's a unit test to show how the escape/unescape cycle doesn't return > expected String. > > {code:java} > @Test > public void testUnscape() { > String unscapeString = "double quote: \" and a forward slash: /"; > String escapeString = StringEscapeUtils.escapeJson(unscapeString); > assertEquals("double quote: \" and a forward slash: \/", escapeString); > assertEquals(unscapeString, StringEscapeUtils.unescapeJson(escapeString)); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] commons-lang issue #328: [LANG-1238] Add overloaded methods to StringUtils w...
Github user coms commented on the issue: https://github.com/apache/commons-lang/pull/328 I've just included this refactoring to this PR. Please check it out. Let me know if everything is ok. ---
[jira] [Commented] (LANG-1238) Overload Operations in StringUtils that take a regex to take precompiled Pattern
[ https://issues.apache.org/jira/browse/LANG-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479484#comment-16479484 ] ASF GitHub Bot commented on LANG-1238: -- Github user coms commented on the issue: https://github.com/apache/commons-lang/pull/328 I've just included this refactoring to this PR. Please check it out. Let me know if everything is ok. > Overload Operations in StringUtils that take a regex to take precompiled > Pattern > > > Key: LANG-1238 > URL: https://issues.apache.org/jira/browse/LANG-1238 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Affects Versions: 3.4 >Reporter: Christopher Cordeiro >Priority: Minor > Fix For: Patch Needed > > > For performance reasons, it would be nice if the operations in StringUtils > that take a regular expression (removePattern/replacePattern) were overloaded > to optionally take a precompiled Pattern. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (COMMONSSITE-115) "mvn site" fails with commons-parent 46
Gilles created COMMONSSITE-115: -- Summary: "mvn site" fails with commons-parent 46 Key: COMMONSSITE-115 URL: https://issues.apache.org/jira/browse/COMMONSSITE-115 Project: Commons All Issue Type: Bug Reporter: Gilles Attachments: OUT_CP46 {noformat} mvn -Pcommons-rng-examples site site:stage {noformat} fails (see attached console output). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (COMMONSSITE-114) "mvn deploy" fails with commons-parent 46
Gilles created COMMONSSITE-114: -- Summary: "mvn deploy" fails with commons-parent 46 Key: COMMONSSITE-114 URL: https://issues.apache.org/jira/browse/COMMONSSITE-114 Project: Commons All Issue Type: Bug Reporter: Gilles Attachments: OUT_CP46 {noformat} mvn -Duser.name=apache_id -Dcommons.release.dryRun=true -Ptest-deploy -Prelease -Pcommons-rng-examples clean test site deploy {noformat} fails (see attached console output). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (COMMONSSITE-114) "mvn deploy" fails with commons-parent 46
[ https://issues.apache.org/jira/browse/COMMONSSITE-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gilles updated COMMONSSITE-114: --- Attachment: OUT_CP46 > "mvn deploy" fails with commons-parent 46 > - > > Key: COMMONSSITE-114 > URL: https://issues.apache.org/jira/browse/COMMONSSITE-114 > Project: Commons All > Issue Type: Bug >Reporter: Gilles >Priority: Blocker > Attachments: OUT_CP46 > > > {noformat} > mvn -Duser.name=apache_id -Dcommons.release.dryRun=true -Ptest-deploy > -Prelease -Pcommons-rng-examples clean test site deploy > {noformat} > fails (see attached console output). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (EMAIL-133) Problem reading datasource name of inner email-message
[ https://issues.apache.org/jira/browse/EMAIL-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478822#comment-16478822 ] Ankur Garg commented on EMAIL-133: -- It is still not fixed in 1.3.3 version, is there any plans to fix this in future ? > Problem reading datasource name of inner email-message > -- > > Key: EMAIL-133 > URL: https://issues.apache.org/jira/browse/EMAIL-133 > Project: Commons Email > Issue Type: Bug >Affects Versions: 1.3.1 > Environment: Outlook 2007, James 3.0 beta4 >Reporter: Olaf K. >Priority: Major > Attachments: Parent EMail.msg > > > Situation: > - Create EMail in Outlook and attach an other EMail (via Drag) > e.g parent email subject: "Parent EMail", inner email subject: "Inner > Email" > - after parsing this email I try to acces the attachmentname, but the result > is a null-value. I acpected "Inner Email" as the attachmentname. > {code} > mimeMessageParser.parse(); > List attachAsDataSource = mimeMessageParser.getAttachmentList(); > for (DataSource dataSource : attachAsDataSource) { > String filename = dataSource.getName(); > // filename == null > {code} > To resolve this behavior I patched the Methode "getDataSourceName" in > "MimeMessageParser" as follows. > {code} > .. > if ("message/rfc822".equalsIgnoreCase(contentType)) { > result = ((Message) part.getContent()).getSubject(); > // START: Optional > if (StringUtils.isNotBlank(result)) { > // Add eml-prefix, because binary data is in eml-format and I can use > OUTLOOK.EXE /eml "filename" > result += ".eml"; > } else { > result = "unknown.eml"; > } > // END: Optional > } > ... > {code} > Now the inner email is recognized as an email-message and the subject is used > for the name. > Is there an other way to receive the subject as the attachment-name (without > patching)? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (EMAIL-133) Problem reading datasource name of inner email-message
[ https://issues.apache.org/jira/browse/EMAIL-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478821#comment-16478821 ] Ankur Garg commented on EMAIL-133: -- [~tn] this seems to be very generic issue. > Problem reading datasource name of inner email-message > -- > > Key: EMAIL-133 > URL: https://issues.apache.org/jira/browse/EMAIL-133 > Project: Commons Email > Issue Type: Bug >Affects Versions: 1.3.1 > Environment: Outlook 2007, James 3.0 beta4 >Reporter: Olaf K. >Priority: Major > Attachments: Parent EMail.msg > > > Situation: > - Create EMail in Outlook and attach an other EMail (via Drag) > e.g parent email subject: "Parent EMail", inner email subject: "Inner > Email" > - after parsing this email I try to acces the attachmentname, but the result > is a null-value. I acpected "Inner Email" as the attachmentname. > {code} > mimeMessageParser.parse(); > List attachAsDataSource = mimeMessageParser.getAttachmentList(); > for (DataSource dataSource : attachAsDataSource) { > String filename = dataSource.getName(); > // filename == null > {code} > To resolve this behavior I patched the Methode "getDataSourceName" in > "MimeMessageParser" as follows. > {code} > .. > if ("message/rfc822".equalsIgnoreCase(contentType)) { > result = ((Message) part.getContent()).getSubject(); > // START: Optional > if (StringUtils.isNotBlank(result)) { > // Add eml-prefix, because binary data is in eml-format and I can use > OUTLOOK.EXE /eml "filename" > result += ".eml"; > } else { > result = "unknown.eml"; > } > // END: Optional > } > ... > {code} > Now the inner email is recognized as an email-message and the subject is used > for the name. > Is there an other way to receive the subject as the attachment-name (without > patching)? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IO-468) Avoid allocating memory for method internal buffers, use threadlocal memory instead
[ https://issues.apache.org/jira/browse/IO-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478803#comment-16478803 ] ASF GitHub Bot commented on IO-468: --- Github user berndhopp closed the pull request at: https://github.com/apache/commons-io/pull/6 > Avoid allocating memory for method internal buffers, use threadlocal memory > instead > --- > > Key: IO-468 > URL: https://issues.apache.org/jira/browse/IO-468 > Project: Commons IO > Issue Type: Improvement > Components: Utilities >Affects Versions: 2.4 > Environment: all environments >Reporter: Bernd Hopp >Priority: Minor > Labels: newbie, performance > Attachments: PerfTest.java, micro-benchmark.zip, > monitoring_with_threadlocals.png, monitoring_without_threadlocals.png, > performancetest.ods, performancetest_weakreference.ods > > Original Estimate: 12h > Remaining Estimate: 12h > > In a lot of places, we allocate new buffers dynamically via new byte[]. This > is a performance drawback since many of these allocations could be avoided if > we would use threadlocal buffers that can be reused. For example, consider > the following code from IOUtils.java, ln 2177: > return copyLarge(input, output, inputOffset, length, new > byte[DEFAULT_BUFFER_SIZE]); > This code allocates new memory for every copy-process, that is not used > outside of the method and could easily and safely reused, as long as is is > thread-local. So instead of allocating new memory, a new utility-class could > provide a thread-local bytearray like this: > byte[] buffer = ThreadLocalByteArray.ofSize(DEFAULT_BUFFER_SIZE); > return copyLarge(input, output, inputOffset, length, buffer); > I have not measured the performance-benefits yet, but I would expect them to > be significant, especially when the streams itself are not the performance > bottleneck. > Git PR is at https://github.com/apache/commons-io/pull/6/files -- This message was sent by Atlassian JIRA (v7.6.3#76005)