[jira] [Commented] (LANG-1397) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Takanobu Asanuma (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481427#comment-16481427
 ] 

Takanobu Asanuma commented on LANG-1397:


I've just closed the PR. Thanks [~garydgregory]!

> 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
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 3.8
>
>
> 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)


[jira] [Commented] (LANG-1397) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481424#comment-16481424
 ] 

ASF GitHub Bot commented on LANG-1397:
--

Github user tasanuma closed the pull request at:

https://github.com/apache/commons-lang/pull/330


> 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
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 3.8
>
>
> 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)


[jira] [Commented] (LANG-1397) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481423#comment-16481423
 ] 

ASF GitHub Bot commented on LANG-1397:
--

Github user tasanuma commented on the issue:

https://github.com/apache/commons-lang/pull/330
  
This pull request is merged by 
https://github.com/apache/commons-lang/commit/09ef69c5b51115300da6df43690cd455d83c8027.
 Thanks for committing it, @garydgregory!


> 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
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 3.8
>
>
> 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 pull request #330: LANG-1397: WordUtils.wrap throws StringIndex...

2018-05-18 Thread tasanuma
Github user tasanuma closed the pull request at:

https://github.com/apache/commons-lang/pull/330


---


[GitHub] commons-lang issue #330: LANG-1397: WordUtils.wrap throws StringIndexOutOfBo...

2018-05-18 Thread tasanuma
Github user tasanuma commented on the issue:

https://github.com/apache/commons-lang/pull/330
  
This pull request is merged by 
https://github.com/apache/commons-lang/commit/09ef69c5b51115300da6df43690cd455d83c8027.
 Thanks for committing it, @garydgregory!


---


[jira] [Commented] (LANG-1380) FastDateParser too strict on abbreviated short month symbols

2018-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481409#comment-16481409
 ] 

ASF GitHub Bot commented on LANG-1380:
--

GitHub user chonton opened a pull request:

https://github.com/apache/commons-lang/pull/331

LANG-1380: FastDateParser too strict on abbreviated short month symbols

I'm interested in feedback.  Particularly from recent committers - 
@garydgregory @britter @PascalSchumacher @sebbASF 
thanks


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/chonton/commons-lang LANG-1380

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/commons-lang/pull/331.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 #331


commit 8c114fa865156fa4341390e66e42ca0cf3c494c8
Author: Chas Honton 
Date:   2018-05-19T01:29:26Z

LANG-1380: FastDateParser too strict on abbreviated short month symbols




> FastDateParser too strict on abbreviated short month symbols
> 
>
> Key: LANG-1380
> URL: https://issues.apache.org/jira/browse/LANG-1380
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.time.*
>Affects Versions: 3.7
>Reporter: Markus Jelsma
>Priority: Minor
> Fix For: 3.8
>
> Attachments: LANG-1380.patch
>
>
> The date format symbols of the French locale adds a . (dot) when short month 
> names are really abbreviated.
> {code}
> janv.
> févr.
> mars
> avr.
> mai
> juin
> juil.
> août
> sept.
> oct.
> nov.
> déc.
> {code}
> But in real world examples, the dot is frequently omitted.
> FastDateParser should be lenient in the case where the dot isn't there, e.g. 
> "14 avr 2014".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] commons-lang pull request #331: LANG-1380: FastDateParser too strict on abbr...

2018-05-18 Thread chonton
GitHub user chonton opened a pull request:

https://github.com/apache/commons-lang/pull/331

LANG-1380: FastDateParser too strict on abbreviated short month symbols

I'm interested in feedback.  Particularly from recent committers - 
@garydgregory @britter @PascalSchumacher @sebbASF 
thanks


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/chonton/commons-lang LANG-1380

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/commons-lang/pull/331.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 #331


commit 8c114fa865156fa4341390e66e42ca0cf3c494c8
Author: Chas Honton 
Date:   2018-05-19T01:29:26Z

LANG-1380: FastDateParser too strict on abbreviated short month symbols




---


[jira] [Resolved] (CSV-224) Some Multi Iterator Parsing Peek Sequences Incorrectly Consume Elements

2018-05-18 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/CSV-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory resolved CSV-224.
--
   Resolution: Fixed
Fix Version/s: 1.6

Patch applied, thank you. Please verify and close this ticket and related PR.

> Some Multi Iterator Parsing Peek Sequences Incorrectly Consume Elements
> ---
>
> Key: CSV-224
> URL: https://issues.apache.org/jira/browse/CSV-224
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.5
>Reporter: David Warshaw
>Priority: Minor
> Fix For: 1.6
>
>
> Repeated calls to CSVParser Iterable return new Iterators that each reference 
> the same underlying parser lexer. Within the scope of a single Iterator, row 
> peeking with Iterator.hasNext() works as intended. When row peeking with 
> Iterator.hasNext() under circumstances that create a new Iterator, an element 
> is consumed by the iterator which cannot be accessed by subsequent, newly 
> created Iterators and Iterator.next()s. Effectively, the record Iterator and 
> the lexer get out of sequence. See snippet below.
> The "right thing" is keeping the Iterator in sequence with the lexer, and 
> since this is reading from a buffer, there seem to me to be only two 
> resolutions:
>  # One lexer, one Iterator.
>  # New Iterators, but peeking with hasNext doesn't advance the lexer.
>  
> If there's a consensus on one of these, I can put up a PR.
>  
> {code:java}
>   @Test
>   public void newIteratorSameLexer() throws Exception {
>     String fiveRows = "1\n2\n3\n4\n5\n";
>     System.out.println("Enhanced for loop, no peeking:");
>     CSVParser parser =
>         new CSVParser(new BufferedReader(new StringReader(fiveRows)), 
> CSVFormat.DEFAULT);
>     int recordNumber = 0;
>     for (CSVRecord record : parser) {
>       recordNumber++;
>       System.out.println(recordNumber + " -> " + record.get(0));
>       if (recordNumber >= 2) {
>         break;
>       }
>     }
>     // CSVParser.iterator() returns a new iterator, but the lexer isn't reset 
> so we can pick up
>     // where we left off.
>     for (CSVRecord record : parser) {
>       recordNumber++;
>       System.out.println(recordNumber + " -> " + record.get(0));
>     }
>     // Enhanced for loop, no peeking:
>     // 1 -> 1
>     // 2 -> 2
>     // 3 -> 3
>     // 4 -> 4
>     // 5 -> 5
>     System.out.println("\nEnhanced for loop, with peek:");
>     parser = new CSVParser(new BufferedReader(new StringReader(fiveRows)), 
> CSVFormat.DEFAULT);
>     recordNumber = 0;
>     for (CSVRecord record : parser) {
>       recordNumber++;
>       System.out.println(recordNumber + " -> " + record.get(0));
>       if (recordNumber >= 2) {
>         break;
>       }
>     }
>     // CSVParser.iterator() returns a new iterator, but we call hasNext 
> before next, so we queue
>     // one element for consumption. This element is discarded by the new 
> iterator, even though the
>     // lexer has advanced a row, so we've consumed an element with the peek!
>     System.out.println("hasNext(): " + parser.iterator().hasNext());
>     for (CSVRecord record : parser) {
>       recordNumber++;
>       System.out.println(recordNumber + " -> " + record.get(0));
>     }
>     // Enhanced for loop, with peek:
>     // 1 -> 1
>     // 2 -> 2
>     // hasNext(): true
>     // 3 -> 4
>     // 4 -> 5
>     System.out.println("\nIterator while, with peek:");
>     parser = new CSVParser(new BufferedReader(new StringReader(fiveRows)), 
> CSVFormat.DEFAULT);
>     recordNumber = 0;
>     Iterator iter = parser.iterator();
>     while (iter.hasNext()) {
>       CSVRecord record = iter.next();
>       recordNumber++;
>       System.out.println(recordNumber + " -> " + record.get(0));
>       if (recordNumber >= 2) {
>         break;
>       }
>     }
>     // When we use the same iterator, iterator and lexer are in sequence.
>     System.out.println("hasNext(): " + iter.hasNext());
>     while (iter.hasNext()) {
>       CSVRecord record = iter.next();
>       recordNumber++;
>       System.out.println(recordNumber + " -> " + record.get(0));
>     }
>     // Iterator while, with peek:
>     // 1 -> 1
>     // 2 -> 2
>     // hasNext(): true
>     // 3 -> 3
>     // 4 -> 4
>     // 5 -> 5
>   }{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (TEXT-123) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/TEXT-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory closed TEXT-123.
-
Resolution: Fixed

In git master.

> WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is 
> Integer.MAX_VALUE
> --
>
> Key: TEXT-123
> URL: https://issues.apache.org/jira/browse/TEXT-123
> Project: Commons Text
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Takanobu Asanuma
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 1.4
>
>
> Cloned from LANG-1397.
> 
> 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)


[jira] [Updated] (TEXT-123) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/TEXT-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory updated TEXT-123:
--
Description: 
Cloned from LANG-1397.

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.

  was:
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.


> WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is 
> Integer.MAX_VALUE
> --
>
> Key: TEXT-123
> URL: https://issues.apache.org/jira/browse/TEXT-123
> Project: Commons Text
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Takanobu Asanuma
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 1.4
>
>
> Cloned from LANG-1397.
> 
> 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)


[jira] [Updated] (TEXT-123) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/TEXT-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory updated TEXT-123:
--
Summary: WordUtils.wrap throws StringIndexOutOfBoundsException when 
wrapLength is Integer.MAX_VALUE  (was: CLONE - WordUtils.wrap throws 
StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE)

> WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is 
> Integer.MAX_VALUE
> --
>
> Key: TEXT-123
> URL: https://issues.apache.org/jira/browse/TEXT-123
> Project: Commons Text
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Takanobu Asanuma
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 1.4
>
>
> 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)


[jira] [Moved] (TEXT-123) CLONE - WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/TEXT-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory moved LANG-1398 to TEXT-123:
-

Fix Version/s: (was: 3.8)
   1.4
Affects Version/s: (was: 3.7)
   1.3
External issue ID:   (was: 330)
 Workflow: jira  (was: Default workflow, editable Closed status)
  Key: TEXT-123  (was: LANG-1398)
  Project: Commons Text  (was: Commons Lang)

> CLONE - WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength 
> is Integer.MAX_VALUE
> --
>
> Key: TEXT-123
> URL: https://issues.apache.org/jira/browse/TEXT-123
> Project: Commons Text
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Takanobu Asanuma
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 1.4
>
>
> 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)


[jira] [Created] (LANG-1398) CLONE - WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Gary Gregory (JIRA)
Gary Gregory created LANG-1398:
--

 Summary: CLONE - WordUtils.wrap throws 
StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE
 Key: LANG-1398
 URL: https://issues.apache.org/jira/browse/LANG-1398
 Project: Commons Lang
  Issue Type: Bug
Affects Versions: 3.7
Reporter: Takanobu Asanuma
Assignee: Gary Gregory
 Fix For: 3.8


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)


[jira] [Resolved] (LANG-1397) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory resolved LANG-1397.

   Resolution: Fixed
 Assignee: Gary Gregory
Fix Version/s: 3.8

In Git master. Please verify and close this ticket and associated PR.


> 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
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 3.8
>
>
> 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)


[jira] [Updated] (LANG-1397) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory updated LANG-1397:
---
External issue URL: https://github.com/apache/commons-lang/pull/330
 External issue ID: 330

> 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
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 3.8
>
>
> 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)


[jira] [Commented] (LANG-1397) WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE

2018-05-18 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480947#comment-16480947
 ] 

Gary Gregory commented on LANG-1397:


Note: I just realized that {{WordUtils}} in Commons Lang is deprecated in favor 
of Commons Text. 

> 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)


[jira] [Commented] (STATISTICS-5) Port codes from Commons Math

2018-05-18 Thread Gilles (JIRA)

[ 
https://issues.apache.org/jira/browse/STATISTICS-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480762#comment-16480762
 ] 

Gilles commented on STATISTICS-5:
-

Please create sub-tasks as I [suggested on the 
ML|https://markmail.org/message/wbvw5jcpmouazyxc]; there will be too many 
different discussions for a single sequence of comments.

Already showing in these few classes, there is room for much redesign. For 
every such PR, you should post a summary to the ML (with at least the names of 
the involved classes), so that we can discuss current shortcomings and new 
ideas, and decide how to proceed.

> Port codes from Commons Math
> 
>
> Key: STATISTICS-5
> URL: https://issues.apache.org/jira/browse/STATISTICS-5
> Project: Apache Commons Statistics
>  Issue Type: Task
>Reporter: Gilles
>Priority: Major
>  Labels: api, design, gsoc2018, port
>
> The "Commons Statistics" component is intended to contain statistical 
> utilities ported from the now unsupported "Commons Math" library.
> Codes are mainly located in package {{org.apache.commons.math4.stat}} in the 
> "master" branch of the 
> [repository|https://git1-us-west.apache.org/repos/asf?p=commons-math.git;a=tree;f=src/main/java/org/apache/commons/math4/stat].
> The port is a good opportunity to review a design that is dating back to the 
> origin of the library and has sometimes hit its limits (cf. reports on 
> [JIRA|https://issues.apache.org/jira/projects/MATH/issues], a.o. MATH-1228, 
> MATH-1281, ...).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (STATISTICS-5) Port codes from Commons Math

2018-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/STATISTICS-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480619#comment-16480619
 ] 

ASF GitHub Bot commented on STATISTICS-5:
-

GitHub user NGimhana opened a pull request:

https://github.com/apache/commons-statistics/pull/1

STATISTICS-5: Migrate "o.a.c.math4.stats" from Commons Math( Interval 
Module )



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/NGimhana/commons-statistics task_STATISTICS-5

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/commons-statistics/pull/1.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 #1


commit c85b1a79c66442daa8fa7b5e5c57c4cdb04df6e0
Author: NGimhana 
Date:   2018-05-18T12:58:53Z

STATISTICS-5: Migrate "o.a.c.math4.stats" from Commons Math-Interval Module.




> Port codes from Commons Math
> 
>
> Key: STATISTICS-5
> URL: https://issues.apache.org/jira/browse/STATISTICS-5
> Project: Apache Commons Statistics
>  Issue Type: Task
>Reporter: Gilles
>Priority: Major
>  Labels: api, design, gsoc2018, port
>
> The "Commons Statistics" component is intended to contain statistical 
> utilities ported from the now unsupported "Commons Math" library.
> Codes are mainly located in package {{org.apache.commons.math4.stat}} in the 
> "master" branch of the 
> [repository|https://git1-us-west.apache.org/repos/asf?p=commons-math.git;a=tree;f=src/main/java/org/apache/commons/math4/stat].
> The port is a good opportunity to review a design that is dating back to the 
> origin of the library and has sometimes hit its limits (cf. reports on 
> [JIRA|https://issues.apache.org/jira/projects/MATH/issues], a.o. MATH-1228, 
> MATH-1281, ...).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (CONFIGURATION-702) Test issue to see if attachments are broken here

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb resolved CONFIGURATION-702.

Resolution: Duplicate

Attachments now also on issue 700

> Test issue to see if attachments are broken here
> 
>
> Key: CONFIGURATION-702
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-702
> Project: Commons Configuration
>  Issue Type: Test
>Reporter: Sebb
>Priority: Major
> Attachments: Read.java, Test-input.properties, 
> Test-output.properties, Update.java
>
>
> Attachments don't work on CONFIGURATION-700; try here



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CONFIGURATION-700) Issue With backslash(\) and Forwardslash(/)

2018-05-18 Thread Sebb (JIRA)

[ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480485#comment-16480485
 ] 

Sebb commented on CONFIGURATION-700:


Attachments seem to be working again, so copied the files from CONFIGURATION-702

> 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, 
> Read.java, Test-input.properties, Test-output.properties, Update.java
>
>
> 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(/)

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated CONFIGURATION-700:
---
Attachment: Test-output.properties

> 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, 
> Read.java, Test-input.properties, Test-output.properties, Update.java
>
>
> 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(/)

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated CONFIGURATION-700:
---
Attachment: Test-input.properties

> 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, 
> Read.java, Test-input.properties, Test-output.properties, Update.java
>
>
> 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(/)

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated CONFIGURATION-700:
---
Attachment: Read.java

> 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, 
> Read.java, Update.java
>
>
> 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(/)

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated CONFIGURATION-700:
---
Attachment: Update.java

> 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, 
> Read.java, Update.java
>
>
> 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(/)

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated CONFIGURATION-700:
---
Attachment: (was: date.txt)

> 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(/)

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated CONFIGURATION-700:
---
Attachment: date.txt

> 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(/)

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated CONFIGURATION-700:
---
Attachment: (was: favicon.ico)

> 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(/)

2018-05-18 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONFIGURATION-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated CONFIGURATION-700:
---
Attachment: favicon.ico

> 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)