[jira] [Commented] (BCEL-173) ClassParser fails to parse JDK classes in Java 8: ClassFormatException: Invalid byte tag in constant pool

2015-05-05 Thread Dave Brosius (JIRA)

[ 
https://issues.apache.org/jira/browse/BCEL-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528370#comment-14528370
 ] 

Dave Brosius commented on BCEL-173:
---

Sorry for your frustation, in the interim, if you choose you can use 
this jar which should fix things till a release is out

http://search.maven.org/#artifactdetails|com.google.code.findbugs|bcel-findbugs|6.0|jar






 ClassParser fails to parse JDK classes in Java 8: ClassFormatException: 
 Invalid byte tag in constant pool
 -

 Key: BCEL-173
 URL: https://issues.apache.org/jira/browse/BCEL-173
 Project: Commons BCEL
  Issue Type: Bug
Affects Versions: 5.0, 5.1, 5.2
Reporter: David Carr
 Fix For: 6.0

 Attachments: bcel-bug.tgz, bceltestcase.zip


 See attached sample project that reproduces the failure.  On Java 7, it 
 prints info about the ConcurrentMap class.  On Java 8, it encounters the 
 following exception:
 {code}
 Exception in thread main org.apache.bcel.classfile.ClassFormatException: 
 Invalid byte tag in constant pool: 18
   at org.apache.bcel.classfile.Constant.readConstant(Constant.java:146)
   at org.apache.bcel.classfile.ConstantPool.init(ConstantPool.java:67)
   at 
 org.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:222)
   at org.apache.bcel.classfile.ClassParser.parse(ClassParser.java:136)
   at TestMain.main(TestMain.java:11)
 {code}
 To use the sample project, extract it and then run ./gradlew clean run.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1127) Create a base test for the time package, which sets and resets default Locales and TimeZones

2015-05-05 Thread Charles Honton (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529818#comment-14529818
 ] 

Charles Honton commented on LANG-1127:
--

Yes, as the default system values change, the cache will fill up with 
additional formats. However, the key to the cache is always some actual 
timezone/locale pair (not nulls). The proper format will be returned 
irregardless of the current system defaults. I believe there is even a unit 
test that covers this case. 

Chas



 Create a base test for the time package, which sets and resets default 
 Locales and TimeZones
 

 Key: LANG-1127
 URL: https://issues.apache.org/jira/browse/LANG-1127
 Project: Commons Lang
  Issue Type: Test
  Components: lang.time.*
Reporter: Benedikt Ritter
Assignee: Charles Honton
 Fix For: Patch Needed


 We have a lot of problems due to Locale dependent tests. I propose to create 
 a base test class with a setup and teardown method which set and reset 
 default locale and time zone. All other tests should inherit from this base 
 test class so that they don't have to fiddle around with default settings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: ReflectionToStringBuilder doesn't throw...

2015-05-05 Thread jacktan1991
GitHub user jacktan1991 opened a pull request:

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

ReflectionToStringBuilder doesn't throw IllegalArgumentException when the 
constructor's object param is null

As described in it's 
[javadoc](http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/builder/ReflectionToStringBuilder.html#ReflectionToStringBuilder(java.lang.Object)),
 ReflectionToStringBuilder constructor will throw IllegalArgumentException if 
the Object to build a toStringfor is null, while in fact it won't.

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

$ git pull https://github.com/jacktan1991/commons-lang master

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

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


commit 474a837858a8e7a98316f97e9ed387d0161015f2
Author: Jack 792626...@qq.com
Date:   2015-05-06T03:10:11Z

add testConstructorWithNullObject case in ReflectionToStringBuilderTest.java




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (LANG-1132) ReflectionToStringBuilder doesn't throw IllegalArgumentException when the constructor's object param is null

2015-05-05 Thread Jack Tan (JIRA)

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

Jack Tan updated LANG-1132:
---
Description: 
Placeholder for https://github.com/apache/commons-lang/pull/85
{quote}
As described in it's 
[javadoc|http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/builder/ReflectionToStringBuilder.html#ReflectionToStringBuilder(java.lang.Object)],
 ReflectionToStringBuilder constructor will throw IllegalArgumentException if 
the Object to build a toStringfor is null, while in fact it won't.
{quote}

  was:
Placeholder for https://github.com/apache/commons-lang/pull/85

 As described in it's 
 [javadoc](http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/builder/ReflectionToStringBuilder.html#ReflectionToStringBuilder(java.lang.Object)),
  ReflectionToStringBuilder constructor will throw IllegalArgumentException if 
 the Object to build a toStringfor is null, while in fact it won't.


 ReflectionToStringBuilder doesn't throw IllegalArgumentException when the 
 constructor's object param is null
 

 Key: LANG-1132
 URL: https://issues.apache.org/jira/browse/LANG-1132
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.builder.*
Affects Versions: 3.4
Reporter: Jack Tan
  Labels: github, github-pullrequest

 Placeholder for https://github.com/apache/commons-lang/pull/85
 {quote}
 As described in it's 
 [javadoc|http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/builder/ReflectionToStringBuilder.html#ReflectionToStringBuilder(java.lang.Object)],
  ReflectionToStringBuilder constructor will throw IllegalArgumentException if 
 the Object to build a toStringfor is null, while in fact it won't.
 {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (LANG-1132) ReflectionToStringBuilder doesn't throw IllegalArgumentException when the constructor's object param is null

2015-05-05 Thread Jack Tan (JIRA)
Jack Tan created LANG-1132:
--

 Summary: ReflectionToStringBuilder doesn't throw 
IllegalArgumentException when the constructor's object param is null
 Key: LANG-1132
 URL: https://issues.apache.org/jira/browse/LANG-1132
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.builder.*
Affects Versions: 3.4
Reporter: Jack Tan


Placeholder for https://github.com/apache/commons-lang/pull/85

 As described in it's 
 [javadoc](http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/builder/ReflectionToStringBuilder.html#ReflectionToStringBuilder(java.lang.Object)),
  ReflectionToStringBuilder constructor will throw IllegalArgumentException if 
 the Object to build a toStringfor is null, while in fact it won't.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (COMPRESS-314) TarArchiveInputStream rejects uid or gid = 0x80000000

2015-05-05 Thread Stefan Bodewig (JIRA)

[ 
https://issues.apache.org/jira/browse/COMPRESS-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529883#comment-14529883
 ] 

Stefan Bodewig commented on COMPRESS-314:
-

I'll create a separate issue for the ability to write entries with group ids  
0777 and fix that first so I can create a unit test for this one :-)

 TarArchiveInputStream rejects uid or gid = 0x8000
 --

 Key: COMPRESS-314
 URL: https://issues.apache.org/jira/browse/COMPRESS-314
 Project: Commons Compress
  Issue Type: Bug
  Components: Archivers
Affects Versions: 1.10
Reporter: Jonathan Nieder
Priority: Minor

 A POSIX-format archive that came from sysdiagnose produces 
 NumberFormatException[1] when I try to read it with TarArchiveInputStream.
 The relevant part of the .tar file looks like this:
18 uid=429496729
 That's the uid of 'nobody' on Mac OS (on Mac OS, uid_t is 'unsigned int').
 POSIX doesn't say anything about the width of the uid extended header[2], so 
 I assume the tar file is okay. GNU tar doesn't have trouble with it.
 The relevant code, in applyPaxHeadersToCurrentEntry:
 } else if (gid.equals(key)){
 currEntry.setGroupId(Integer.parseInt(val));
 ...
 } else if (uid.equals(key)){
 currEntry.setUserId(Integer.parseInt(val));
 uid_t and gid_t are typically unsigned 32-bit integers, so these should 
 presumably use Long.parseLong to handle integers with the top bit set (and 
 TarArchiveEntry would need some modifications to handle large uid and gid, 
 too).
 [1] java.lang.NumberFormatException: For input string: 4294967294
 at 
 java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
 at java.lang.Integer.parseInt(Integer.java:495)
 at java.lang.Integer.parseInt(Integer.java:527)
 at 
 org.apache.commons.compress.archivers.tar.TarArchiveInputStream.applyPaxHeadersToCurrentEntry(TarArchiveInputStream.java:488)
 at 
 org.apache.commons.compress.archivers.tar.TarArchiveInputStream.paxHeaders(TarArchiveInputStream.java:415)
 at 
 org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:295)
 [2] 
 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_03
 uid
 The user ID of the file owner, expressed as a decimal number using digits 
 from the ISO/IEC 646:1991 standard. This record shall override the uid field 
 in the following header block(s). When used in write or copy mode, pax shall 
 include a uid extended header record for each file whose owner ID is greater 
 than 2097151 (octal 777).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (COMPRESS-315) tar can not write uid or gid = 0x80000000

2015-05-05 Thread Stefan Bodewig (JIRA)
Stefan Bodewig created COMPRESS-315:
---

 Summary: tar can not write uid or gid = 0x8000
 Key: COMPRESS-315
 URL: https://issues.apache.org/jira/browse/COMPRESS-315
 Project: Commons Compress
  Issue Type: Bug
Affects Versions: 1.9
Reporter: Stefan Bodewig
 Fix For: 1.10


This is related to COMPRESS-314 - TarArchiveEntry doesn't allow gid/uid bigger 
than a signed 32bit int - the POSIX spec does.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: @SuppressWarnings(deprecation) to joi...

2015-05-05 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/84#discussion_r29735276
  
--- Diff: src/main/java/org/apache/commons/lang3/StringUtils.java ---
@@ -4196,7 +4196,8 @@ public static String join(final Iterable? iterable, 
final String separator) {
  * @return the joined String.
  * @throws java.lang.IllegalArgumentException if a null varargs is 
provided
  */
-public static String joinWith(final String separator, final Object... 
objects) {
+@SuppressWarnings(deprecation)
--- End diff --

It's better to keep the scope of this annotation as small as possible. I'd 
rather assign the result of {{ObjectUtils.toString(iterator.next())}} and add 
the annotation there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: ReflectionToStringBuilder doesn't throw...

2015-05-05 Thread jacktan1991
Github user jacktan1991 commented on the pull request:

https://github.com/apache/commons-lang/pull/85#issuecomment-99330648
  
Have fixed it. But `ToStringBuilderTest.testReflectionNull` is desigined 
like

```java
@Test(expected=IllegalArgumentException.class)
public void testReflectionNull() {
assertEquals(null, ReflectionToStringBuilder.toString(null));
}
```

so now I'm really confused wether ReflectionToStringBuilder constructor 
should throw IllegalArgumentException when Object passed in is null.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (LANG-1127) Create a base test for the time package, which sets and resets default Locales and TimeZones

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter updated LANG-1127:
--
Fix Version/s: (was: Patch Needed)
   Discussion

 Create a base test for the time package, which sets and resets default 
 Locales and TimeZones
 

 Key: LANG-1127
 URL: https://issues.apache.org/jira/browse/LANG-1127
 Project: Commons Lang
  Issue Type: Test
  Components: lang.time.*
Reporter: Benedikt Ritter
Assignee: Charles Honton
 Fix For: Discussion


 We have a lot of problems due to Locale dependent tests. I propose to create 
 a base test class with a setup and teardown method which set and reset 
 default locale and time zone. All other tests should inherit from this base 
 test class so that they don't have to fiddle around with default settings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Reopened] (LANG-1127) Create a base test for the time package, which sets and resets default Locales and TimeZones

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter reopened LANG-1127:
---

Reopening this issue, since we're still working on the implementation.

 Create a base test for the time package, which sets and resets default 
 Locales and TimeZones
 

 Key: LANG-1127
 URL: https://issues.apache.org/jira/browse/LANG-1127
 Project: Commons Lang
  Issue Type: Test
  Components: lang.time.*
Reporter: Benedikt Ritter
Assignee: Charles Honton
 Fix For: Discussion


 We have a lot of problems due to Locale dependent tests. I propose to create 
 a base test class with a setup and teardown method which set and reset 
 default locale and time zone. All other tests should inherit from this base 
 test class so that they don't have to fiddle around with default settings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (COMPRESS-314) TarArchiveInputStream rejects uid or gid = 0x80000000

2015-05-05 Thread Stefan Bodewig (JIRA)

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

Stefan Bodewig updated COMPRESS-314:

Affects Version/s: (was: 1.10)
   1.9
Fix Version/s: 1.10

 TarArchiveInputStream rejects uid or gid = 0x8000
 --

 Key: COMPRESS-314
 URL: https://issues.apache.org/jira/browse/COMPRESS-314
 Project: Commons Compress
  Issue Type: Bug
  Components: Archivers
Affects Versions: 1.9
Reporter: Jonathan Nieder
Priority: Minor
 Fix For: 1.10


 A POSIX-format archive that came from sysdiagnose produces 
 NumberFormatException[1] when I try to read it with TarArchiveInputStream.
 The relevant part of the .tar file looks like this:
18 uid=429496729
 That's the uid of 'nobody' on Mac OS (on Mac OS, uid_t is 'unsigned int').
 POSIX doesn't say anything about the width of the uid extended header[2], so 
 I assume the tar file is okay. GNU tar doesn't have trouble with it.
 The relevant code, in applyPaxHeadersToCurrentEntry:
 } else if (gid.equals(key)){
 currEntry.setGroupId(Integer.parseInt(val));
 ...
 } else if (uid.equals(key)){
 currEntry.setUserId(Integer.parseInt(val));
 uid_t and gid_t are typically unsigned 32-bit integers, so these should 
 presumably use Long.parseLong to handle integers with the top bit set (and 
 TarArchiveEntry would need some modifications to handle large uid and gid, 
 too).
 [1] java.lang.NumberFormatException: For input string: 4294967294
 at 
 java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
 at java.lang.Integer.parseInt(Integer.java:495)
 at java.lang.Integer.parseInt(Integer.java:527)
 at 
 org.apache.commons.compress.archivers.tar.TarArchiveInputStream.applyPaxHeadersToCurrentEntry(TarArchiveInputStream.java:488)
 at 
 org.apache.commons.compress.archivers.tar.TarArchiveInputStream.paxHeaders(TarArchiveInputStream.java:415)
 at 
 org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:295)
 [2] 
 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_03
 uid
 The user ID of the file owner, expressed as a decimal number using digits 
 from the ISO/IEC 646:1991 standard. This record shall override the uid field 
 in the following header block(s). When used in write or copy mode, pax shall 
 include a uid extended header record for each file whose owner ID is greater 
 than 2097151 (octal 777).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (COMPRESS-315) tar can not write uid or gid = 0x80000000

2015-05-05 Thread Stefan Bodewig (JIRA)

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

Stefan Bodewig resolved COMPRESS-315.
-
Resolution: Fixed

fixed with svn revision 1677921

 tar can not write uid or gid = 0x8000
 --

 Key: COMPRESS-315
 URL: https://issues.apache.org/jira/browse/COMPRESS-315
 Project: Commons Compress
  Issue Type: Bug
Affects Versions: 1.9
Reporter: Stefan Bodewig
 Fix For: 1.10


 This is related to COMPRESS-314 - TarArchiveEntry doesn't allow gid/uid 
 bigger than a signed 32bit int - the POSIX spec does.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1127) Create a base test for the time package, which sets and resets default Locales and TimeZones

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529957#comment-14529957
 ] 

ASF GitHub Bot commented on LANG-1127:
--

Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/76#issuecomment-99328066
  

[![Coverage 
Status](https://coveralls.io/builds/2496885/badge)](https://coveralls.io/builds/2496885)

Coverage increased (+0.06%) to 93.37% when pulling 
**3dbf1eedd93565481f8b5d3c9678a5e9234cb91a on britter:LANG-1127** into 
**8e7ea70a33ecb8db5207849ea6371b4a5a8ffd26 on apache:master**.



 Create a base test for the time package, which sets and resets default 
 Locales and TimeZones
 

 Key: LANG-1127
 URL: https://issues.apache.org/jira/browse/LANG-1127
 Project: Commons Lang
  Issue Type: Test
  Components: lang.time.*
Reporter: Benedikt Ritter
Assignee: Charles Honton
 Fix For: Patch Needed


 We have a lot of problems due to Locale dependent tests. I propose to create 
 a base test class with a setup and teardown method which set and reset 
 default locale and time zone. All other tests should inherit from this base 
 test class so that they don't have to fiddle around with default settings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: ReflectionToStringBuilder doesn't throw...

2015-05-05 Thread britter
Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/85#issuecomment-99327946
  
Please fix test failures.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: LANG-1127: Use JUnit rules to set and r...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/76#issuecomment-99328066
  

[![Coverage 
Status](https://coveralls.io/builds/2496885/badge)](https://coveralls.io/builds/2496885)

Coverage increased (+0.06%) to 93.37% when pulling 
**3dbf1eedd93565481f8b5d3c9678a5e9234cb91a on britter:LANG-1127** into 
**8e7ea70a33ecb8db5207849ea6371b4a5a8ffd26 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: ReflectionToStringBuilder doesn't throw...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/85#issuecomment-99330681
  

[![Coverage 
Status](https://coveralls.io/builds/2496945/badge)](https://coveralls.io/builds/2496945)

Coverage increased (+0.0%) to 93.35% when pulling 
**0e266204f535aa48f74d4f2480b2268c13e26b22 on jacktan1991:master** into 
**d6dd2b4cd4a337c5517952680c3714e5d08e9cb8 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (MATH-1222) Use Double.isNaN(double) instead of x != x in FastMath

2015-05-05 Thread Benedikt Ritter (JIRA)
Benedikt Ritter created MATH-1222:
-

 Summary: Use Double.isNaN(double) instead of x != x in FastMath
 Key: MATH-1222
 URL: https://issues.apache.org/jira/browse/MATH-1222
 Project: Commons Math
  Issue Type: Task
Reporter: Benedikt Ritter


As discussed in http://markmail.org/thread/f6juilawhswblnve we should use 
Double.isNaN(double) for checking whether a double is NaN in FastMath instead 
of using the odd looking x != x comparison.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-740) Add a Memoizer class

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529474#comment-14529474
 ] 

ASF GitHub Bot commented on LANG-740:
-

Github user peteryhwong commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29721658
  
--- Diff: src/main/java/org/apache/commons/lang3/concurrent/Memoizer.java 
---
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.lang3.concurrent;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+
+/**
+ * pDefinition of an interface for a wrapper around a calculation that 
takes a single parameter and returns a result.
+ * The results for the calculation will be cached for future requests./p
+ * p/
+ * pThis is not a fully functional cache, there is no way of limiting or 
removing results once they have been generated.
+ * However, it is possible to get the implementation to regenerate the 
result for a given parameter, if an error was
+ * thrown during the previous calculation, by setting the option during 
the construction of the class. If this is not
+ * set the class will return the cached exception./p
+ * p/
+ * pThanks should go to Brian Goetz, Tim Peierls and the members of JCP 
JSR-166 Expert Group for coming up with the
+ * original implementation of the class. It was also published within Java 
Concurreny in Practice as a sample./p
+ *
+ * @param A the type of the input to the calculation
+ * @param V the type of the output of the calculation
+ */
+public class MemoizerA, V implements ComputableA, V {
+   private final ConcurrentMapA, FutureV cache
+   = new ConcurrentHashMapA, FutureV();
+   private final ComputableA, V c;
+   private final boolean recalculate;
+
+   /**
+* pConstructs a Memoizer for the provided Computable calculation./p
+* p/
+* pIf a calculation is thrown an exception for any reason, this 
exception will be cached and returned for
+* all future calls with the provided parameter./p
+*
+* @param c the computation whose results should be memorized
+*/
+   public Memoizer(ComputableA, V c) {
+   this(c, false);
+   }
+
+   /**
+* pConstructs a Memoizer for the provided Computable calculation, 
with the option of whether a Computation
+* that experiences an error should recalculate on subsequent calls or 
return the same cached exception./p
+*
+* @param c   the computation whose results should be memorized
+* @param recalculate determines whether the computation should be 
recalculated on subsequent calls if the previous
+*call failed
+*/
+   public Memoizer(ComputableA, V c, boolean recalculate) {
+   this.c = c;
+   this.recalculate = recalculate;
+   }
+
+   /**
+* pThis method will return the result of the calculation and cache 
it, if it has not previously been calculated./p
+* p/
+* pThis cache will also cache exceptions that occur during the 
computation if the {@code recalculate} parameter is
+* the constructor was set to {@code false}, or not set. Otherwise, if 
an exception happened on the previous
+* calculation, the method will attempt again to generate a value./p
+*
+* @param arg the argument for the calculation
+* @return the result of the calculation
+* @throws InterruptedException  thrown if the calculation is 
interrupted
+* @throws IllegalStateException a wrapper around any checked exception 
that occurs during the computation of 

[GitHub] commons-lang pull request: LANG-740 - Implementation of a Memomize...

2015-05-05 Thread peteryhwong
Github user peteryhwong commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29721658
  
--- Diff: src/main/java/org/apache/commons/lang3/concurrent/Memoizer.java 
---
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.lang3.concurrent;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+
+/**
+ * pDefinition of an interface for a wrapper around a calculation that 
takes a single parameter and returns a result.
+ * The results for the calculation will be cached for future requests./p
+ * p/
+ * pThis is not a fully functional cache, there is no way of limiting or 
removing results once they have been generated.
+ * However, it is possible to get the implementation to regenerate the 
result for a given parameter, if an error was
+ * thrown during the previous calculation, by setting the option during 
the construction of the class. If this is not
+ * set the class will return the cached exception./p
+ * p/
+ * pThanks should go to Brian Goetz, Tim Peierls and the members of JCP 
JSR-166 Expert Group for coming up with the
+ * original implementation of the class. It was also published within Java 
Concurreny in Practice as a sample./p
+ *
+ * @param A the type of the input to the calculation
+ * @param V the type of the output of the calculation
+ */
+public class MemoizerA, V implements ComputableA, V {
+   private final ConcurrentMapA, FutureV cache
+   = new ConcurrentHashMapA, FutureV();
+   private final ComputableA, V c;
+   private final boolean recalculate;
+
+   /**
+* pConstructs a Memoizer for the provided Computable calculation./p
+* p/
+* pIf a calculation is thrown an exception for any reason, this 
exception will be cached and returned for
+* all future calls with the provided parameter./p
+*
+* @param c the computation whose results should be memorized
+*/
+   public Memoizer(ComputableA, V c) {
+   this(c, false);
+   }
+
+   /**
+* pConstructs a Memoizer for the provided Computable calculation, 
with the option of whether a Computation
+* that experiences an error should recalculate on subsequent calls or 
return the same cached exception./p
+*
+* @param c   the computation whose results should be memorized
+* @param recalculate determines whether the computation should be 
recalculated on subsequent calls if the previous
+*call failed
+*/
+   public Memoizer(ComputableA, V c, boolean recalculate) {
+   this.c = c;
+   this.recalculate = recalculate;
+   }
+
+   /**
+* pThis method will return the result of the calculation and cache 
it, if it has not previously been calculated./p
+* p/
+* pThis cache will also cache exceptions that occur during the 
computation if the {@code recalculate} parameter is
+* the constructor was set to {@code false}, or not set. Otherwise, if 
an exception happened on the previous
+* calculation, the method will attempt again to generate a value./p
+*
+* @param arg the argument for the calculation
+* @return the result of the calculation
+* @throws InterruptedException  thrown if the calculation is 
interrupted
+* @throws IllegalStateException a wrapper around any checked exception 
that occurs during the computation of the result
+*/
+   public V compute(final A arg) throws InterruptedException, 
IllegalStateException {
--- End diff --

Please use Overrides annotation. Moreover, IlegalStateException is a 
runtime (unchecked) exception and 

[jira] [Commented] (LANG-701) StringUtils join with var args

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529016#comment-14529016
 ] 

ASF GitHub Bot commented on LANG-701:
-

Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/79#issuecomment-99172436
  
Thank you!


 StringUtils join with var args
 --

 Key: LANG-701
 URL: https://issues.apache.org/jira/browse/LANG-701
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.*
Reporter: Gabriele Kahlout
Assignee: Benedikt Ritter
Priority: Minor
 Fix For: 3.5

 Attachments: VarArgJoinTest.java


 {code:java}
 final String apple = apple;
 final String banana = banana;
 final String orange = orange;
 final String expected = apple +  SPACE + banana + SPACE + orange;
 final String  actual = join(SPACE, apple, banana, orange);
 final int expLength = expected.length();
 final int actLength = actual.length();
 assertEquals(expLength, actLength);
 assertEquals(expected, actual);
 {code}
 I missed the functionality of joining strings with the space separator in one 
 line. BTW, why space ' ' not a constant field anywhere?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: @SuppressWarnings(deprecation) to joi...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/84#issuecomment-99235241
  

[![Coverage 
Status](https://coveralls.io/builds/2494346/badge)](https://coveralls.io/builds/2494346)

Coverage increased (+0.0%) to 93.35% when pulling 
**823d2a0b957393f200fb33a87caff13fc231a78c on 
PascalSchumacher:supress_compiler_warning** into 
**d6dd2b4cd4a337c5517952680c3714e5d08e9cb8 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: remove compiler warnings of joinWith te...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/82#issuecomment-99235865
  

[![Coverage 
Status](https://coveralls.io/builds/2494237/badge)](https://coveralls.io/builds/2494237)

Coverage decreased (-0.01%) to 93.35% when pulling 
**5f9e0851da9e74c12e04f5a62cb7aeb1a8ab7589 on 
PascalSchumacher:StringUtilsTest_compiler_warnings** into 
**d6dd2b4cd4a337c5517952680c3714e5d08e9cb8 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (COMPRESS-314) TarArchiveInputStream rejects uid or gid = 0x80000000

2015-05-05 Thread Jonathan Nieder (JIRA)
Jonathan Nieder created COMPRESS-314:


 Summary: TarArchiveInputStream rejects uid or gid = 0x8000
 Key: COMPRESS-314
 URL: https://issues.apache.org/jira/browse/COMPRESS-314
 Project: Commons Compress
  Issue Type: Bug
  Components: Archivers
Affects Versions: 1.10
Reporter: Jonathan Nieder
Priority: Minor


A POSIX-format archive that came from sysdiagnose produces 
NumberFormatException[1] when I try to read it with TarArchiveInputStream.

The relevant part of the .tar file looks like this:

   18 uid=429496729

That's the uid of 'nobody' on Mac OS (on Mac OS, uid_t is 'unsigned int').

POSIX doesn't say anything about the width of the uid extended header[2], so I 
assume the tar file is okay. GNU tar doesn't have trouble with it.

The relevant code, in applyPaxHeadersToCurrentEntry:

} else if (gid.equals(key)){
currEntry.setGroupId(Integer.parseInt(val));
...
} else if (uid.equals(key)){
currEntry.setUserId(Integer.parseInt(val));

uid_t and gid_t are typically unsigned 32-bit integers, so these should 
presumably use Long.parseLong to handle integers with the top bit set (and 
TarArchiveEntry would need some modifications to handle large uid and gid, too).

[1] java.lang.NumberFormatException: For input string: 4294967294
at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:495)
at java.lang.Integer.parseInt(Integer.java:527)
at 
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.applyPaxHeadersToCurrentEntry(TarArchiveInputStream.java:488)
at 
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.paxHeaders(TarArchiveInputStream.java:415)
at 
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:295)

[2] 
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_03
uid
The user ID of the file owner, expressed as a decimal number using digits from 
the ISO/IEC 646:1991 standard. This record shall override the uid field in the 
following header block(s). When used in write or copy mode, pax shall include a 
uid extended header record for each file whose owner ID is greater than 2097151 
(octal 777).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LANG-1130) Fix Sonar warnings

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter updated LANG-1130:
--
Description: 
The Apache SonarQube instance shows five major warnings for Commons Lang: 
https://analysis.apache.org/dashboard/index/72046

We should try to fix those.

  was:The Apache SonarQube instance shows five major warnings for Commons Lang. 
We should try to fix those.


 Fix Sonar warnings
 --

 Key: LANG-1130
 URL: https://issues.apache.org/jira/browse/LANG-1130
 Project: Commons Lang
  Issue Type: Task
Affects Versions: 3.5
Reporter: Benedikt Ritter
Assignee: Benedikt Ritter
 Fix For: 3.5


 The Apache SonarQube instance shows five major warnings for Commons Lang: 
 https://analysis.apache.org/dashboard/index/72046
 We should try to fix those.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LANG-1130) Fix Sonar warnings

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter updated LANG-1130:
--
Description: 
The Apache SonarQube instance shows five critical warnings for Commons Lang: 
https://analysis.apache.org/dashboard/index/72046

We should try to fix those.

  was:
The Apache SonarQube instance shows five major warnings for Commons Lang: 
https://analysis.apache.org/dashboard/index/72046

We should try to fix those.


 Fix Sonar warnings
 --

 Key: LANG-1130
 URL: https://issues.apache.org/jira/browse/LANG-1130
 Project: Commons Lang
  Issue Type: Task
Affects Versions: 3.5
Reporter: Benedikt Ritter
Assignee: Benedikt Ritter
 Fix For: 3.5


 The Apache SonarQube instance shows five critical warnings for Commons Lang: 
 https://analysis.apache.org/dashboard/index/72046
 We should try to fix those.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (LANG-1131) StrBuilder.equals(StrBuilder) doesn't check for null inputs

2015-05-05 Thread Benedikt Ritter (JIRA)
Benedikt Ritter created LANG-1131:
-

 Summary: StrBuilder.equals(StrBuilder) doesn't check for null 
inputs
 Key: LANG-1131
 URL: https://issues.apache.org/jira/browse/LANG-1131
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.text.*
Reporter: Benedikt Ritter
 Fix For: 3.5


The following test will fail because the {{equals(StrBuilder)}} overload in 
{{StrBuilder}} does not check for null inputs:

{code:java}
@Test
public void testEqualsWithNullStrBuilder() throws Exception {
final StrBuilder sb = new StrBuilder();
final StrBuilder other = null;
assertFalse(sb.equals(other));
}
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1130) Fix Sonar warnings

2015-05-05 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528840#comment-14528840
 ] 

Benedikt Ritter commented on LANG-1130:
---

I've fixed two of the five warnings:

* org.apache.commons.lang3.ClassUtils.static initializer for ClassUtils() 
makes inefficient use of keySet iterator instead of entrySet iterator.
* TypeUtils: The user-supplied array 'typeArguments' is stored directly.

Three issues remain: 
* in ObjectUtils we have the method {{public static boolean equals(Object, 
Object)}} which is suspiciously close to equals(Object). The same is true for 
the {{equals(StrBuilder)}} method overload in StrBuilder. Both cases are 
implemented intentionally.
* The third warning is in FastDatePrinter, where is complains, that the inner 
class TextField  stores the user-supplied array 'values' directly. Looking at 
the code which initialized new instances one can see, that only arrays 
retrieved from the various getters of {{java.util.DateFormatSymbols}} are 
passed to the constructor. The getters all make copies of their internal 
arrays. So my assessment is, that this is not a problem either.

 Fix Sonar warnings
 --

 Key: LANG-1130
 URL: https://issues.apache.org/jira/browse/LANG-1130
 Project: Commons Lang
  Issue Type: Task
Affects Versions: 3.5
Reporter: Benedikt Ritter
Assignee: Benedikt Ritter
 Fix For: 3.5


 The Apache SonarQube instance shows five critical warnings for Commons Lang: 
 https://analysis.apache.org/dashboard/index/72046
 We should try to fix those.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MATH-1222) Use Double.isNaN(double) instead of x != x in FastMath

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter updated MATH-1222:
--
Labels: github  (was: )

 Use Double.isNaN(double) instead of x != x in FastMath
 --

 Key: MATH-1222
 URL: https://issues.apache.org/jira/browse/MATH-1222
 Project: Commons Math
  Issue Type: Task
Reporter: Benedikt Ritter
  Labels: github

 As discussed in http://markmail.org/thread/f6juilawhswblnve we should use 
 Double.isNaN(double) for checking whether a double is NaN in FastMath instead 
 of using the odd looking x != x comparison.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (LANG-1130) Fix Sonar warnings

2015-05-05 Thread Benedikt Ritter (JIRA)
Benedikt Ritter created LANG-1130:
-

 Summary: Fix Sonar warnings
 Key: LANG-1130
 URL: https://issues.apache.org/jira/browse/LANG-1130
 Project: Commons Lang
  Issue Type: Task
Affects Versions: 3.5
Reporter: Benedikt Ritter
Assignee: Benedikt Ritter
 Fix For: 3.5


The Apache SonarQube instance shows five major warnings for Commons Lang. We 
should try to fix those.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LANG-1130) Fix critical issues reported by SonarQube

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter updated LANG-1130:
--
Summary: Fix critical issues reported by SonarQube  (was: Fix Sonar 
warnings)

 Fix critical issues reported by SonarQube
 -

 Key: LANG-1130
 URL: https://issues.apache.org/jira/browse/LANG-1130
 Project: Commons Lang
  Issue Type: Task
Affects Versions: 3.5
Reporter: Benedikt Ritter
Assignee: Benedikt Ritter
 Fix For: 3.5


 The Apache SonarQube instance shows five critical warnings for Commons Lang: 
 https://analysis.apache.org/dashboard/index/72046
 We should try to fix those.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (LANG-1131) StrBuilder.equals(StrBuilder) doesn't check for null inputs

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter resolved LANG-1131.
---
Resolution: Fixed
  Assignee: Benedikt Ritter

Fixed in fc73151cfca36ea2641f340700dbe339b9e1f103

 StrBuilder.equals(StrBuilder) doesn't check for null inputs
 ---

 Key: LANG-1131
 URL: https://issues.apache.org/jira/browse/LANG-1131
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.text.*
Reporter: Benedikt Ritter
Assignee: Benedikt Ritter
 Fix For: 3.5


 The following test will fail because the {{equals(StrBuilder)}} overload in 
 {{StrBuilder}} does not check for null inputs:
 {code:java}
 @Test
 public void testEqualsWithNullStrBuilder() throws Exception {
 final StrBuilder sb = new StrBuilder();
 final StrBuilder other = null;
 assertFalse(sb.equals(other));
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MATH-1222) Use Double.isNaN(double) instead of x != x in FastMath

2015-05-05 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/MATH-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528717#comment-14528717
 ] 

Benedikt Ritter commented on MATH-1222:
---

Creates a PR https://github.com/apache/commons-math/pull/5

 Use Double.isNaN(double) instead of x != x in FastMath
 --

 Key: MATH-1222
 URL: https://issues.apache.org/jira/browse/MATH-1222
 Project: Commons Math
  Issue Type: Task
Reporter: Benedikt Ritter
  Labels: github

 As discussed in http://markmail.org/thread/f6juilawhswblnve we should use 
 Double.isNaN(double) for checking whether a double is NaN in FastMath instead 
 of using the odd looking x != x comparison.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread eduardomartins-luizalabs
GitHub user eduardomartins-luizalabs opened a pull request:

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

DOC: StringUtils.containsAny. ADD: containsAllWords to StringUtils

Checks if the String contains all words.
```java
StringUtils.containsAllWords(lorem ipsum dolor sit amet, ipsum, 
lorem, dolor) == true
StringUtils.containsAllWords(lorem ipsum dolor sit amet, ipsum, null, 
lorem, dolor) == false
StringUtils.containsAllWords(ab, b) == false
```

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

$ git pull https://github.com/eduardomartins-luizalabs/commons-lang master

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

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


commit 6ee22b46f5e0d8ae48e79be486a603513fbbaa10
Author: Eduardo Martins eduardo.mart...@luizalabs.com
Date:   2015-05-05T18:32:46Z

FIX: Javadoc issue on StringUtils.containsAny. ADD: containsAllWords to 
StringUtils




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread eduardomartins-luizalabs
Github user eduardomartins-luizalabs commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99185054
  
@britter i didn't saw this class, my bad.
Should I send another commit or amend this?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread britter
Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99186498
  
Usually we make additional commit so that the development of a feature can 
be tracked afterwards. Since in this case the commit would change the whole PR, 
I think amending is appropriate in this case. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread eduardomartins-luizalabs
Github user eduardomartins-luizalabs commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99187699
  
Ok


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Closed] (LANG-1129) Remove svn keywords

2015-05-05 Thread Henri Yandell (JIRA)

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

Henri Yandell closed LANG-1129.
---
   Resolution: Fixed
Fix Version/s: (was: Patch Needed)

Done.

 Remove svn keywords
 ---

 Key: LANG-1129
 URL: https://issues.apache.org/jira/browse/LANG-1129
 Project: Commons Lang
  Issue Type: Task
Reporter: Benedikt Ritter
 Fix For: 3.5


 After the git migration all our java files still reference the svn id keyword:
 {code}
  * @versions $Id$
 {code} 
 We should drop this from the JavaDocs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SCXML-231) Create Git / GitHub Mirror

2015-05-05 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/SCXML-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529115#comment-14529115
 ] 

Benedikt Ritter commented on SCXML-231:
---

It should be no problem to get a GitHub mirror up an running. However I've 
brought up the question, whether SCXML should be migrated to git completely 
instead of just being mirrored: http://markmail.org/message/ybqptmeop5dyxwtb

 Create Git / GitHub Mirror
 --

 Key: SCXML-231
 URL: https://issues.apache.org/jira/browse/SCXML-231
 Project: Commons SCXML
  Issue Type: Improvement
Reporter: Adam Bien

 The sources are currently maintained in SVN, what makes the contributions 
 harder. 
 Please introduce a github mirror (would be the best) or expose the sources to 
 git repo.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SCXML-228) Push current snapshot to maven central

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter resolved SCXML-228.
---
Resolution: Won't Fix

 Push current snapshot to maven central
 --

 Key: SCXML-228
 URL: https://issues.apache.org/jira/browse/SCXML-228
 Project: Commons SCXML
  Issue Type: Improvement
Reporter: Adam Bien

 I'm using SCXML v2 in https://github.com/AdamBien/stateful and it works well. 
 However, there are no snapshot builds in maven, so I had to build it from 
 sources.
 Please push frequently snapshots to maven central.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread eduardomartins-luizalabs
Github user eduardomartins-luizalabs commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/81#discussion_r29704041
  
--- Diff: 
src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java ---
@@ -16,21 +16,16 @@
  */
 package org.apache.commons.lang3;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Locale;
-
 import org.apache.commons.lang3.test.DefaultLocale;
 import org.hamcrest.core.IsNot;
 import org.junit.Test;
 
+import java.util.Locale;
--- End diff --

Sorry about that, Ide issue.
I will fix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (SCXML-228) Push current snapshot to maven central

2015-05-05 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/SCXML-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529117#comment-14529117
 ] 

Benedikt Ritter commented on SCXML-228:
---

We don't push snapshots to maven central. There is a separat snapshot 
repository which provides snapshot builds:

{code:xml}
repository
  idapache.snapshots/id
  nameApache Development Snapshot Repository/name
  urlhttps://repository.apache.org/content/repositories/snapshots//url
  releases
enabledfalse/enabled
  /releases
  snapshots
enabledtrue/enabled
  /snapshots
/repository 
{code}

 Push current snapshot to maven central
 --

 Key: SCXML-228
 URL: https://issues.apache.org/jira/browse/SCXML-228
 Project: Commons SCXML
  Issue Type: Improvement
Reporter: Adam Bien

 I'm using SCXML v2 in https://github.com/AdamBien/stateful and it works well. 
 However, there are no snapshot builds in maven, so I had to build it from 
 sources.
 Please push frequently snapshots to maven central.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread eduardomartins-luizalabs
Github user eduardomartins-luizalabs commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99198225
  
@britter updated.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (BCEL-173) ClassParser fails to parse JDK classes in Java 8: ClassFormatException: Invalid byte tag in constant pool

2015-05-05 Thread Jon Freedman (JIRA)

[ 
https://issues.apache.org/jira/browse/BCEL-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528160#comment-14528160
 ] 

Jon Freedman commented on BCEL-173:
---

Java 7 is now in end-of-life  no-longer recommended for production use.  If 
there is no 6.0 relesae forthcoming I see no alternative but to find 
replacements for any libraries dependent on BCEL.  I don't know how up to date 
your Used by link is but if it's not possible to get a build out within the 
next month or so I don't see much future for the project.

 ClassParser fails to parse JDK classes in Java 8: ClassFormatException: 
 Invalid byte tag in constant pool
 -

 Key: BCEL-173
 URL: https://issues.apache.org/jira/browse/BCEL-173
 Project: Commons BCEL
  Issue Type: Bug
Affects Versions: 5.0, 5.1, 5.2
Reporter: David Carr
 Fix For: 6.0

 Attachments: bcel-bug.tgz, bceltestcase.zip


 See attached sample project that reproduces the failure.  On Java 7, it 
 prints info about the ConcurrentMap class.  On Java 8, it encounters the 
 following exception:
 {code}
 Exception in thread main org.apache.bcel.classfile.ClassFormatException: 
 Invalid byte tag in constant pool: 18
   at org.apache.bcel.classfile.Constant.readConstant(Constant.java:146)
   at org.apache.bcel.classfile.ConstantPool.init(ConstantPool.java:67)
   at 
 org.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:222)
   at org.apache.bcel.classfile.ClassParser.parse(ClassParser.java:136)
   at TestMain.main(TestMain.java:11)
 {code}
 To use the sample project, extract it and then run ./gradlew clean run.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99202424
  

[![Coverage 
Status](https://coveralls.io/builds/2493010/badge)](https://coveralls.io/builds/2493010)

Coverage increased (+0.01%) to 93.36% when pulling 
**54facb4fd93c2ff59b3096c6e64b9be1b3c9cd88 on eduardomartins-luizalabs:master** 
into **d6dd2b4cd4a337c5517952680c3714e5d08e9cb8 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99207396
  

[![Coverage 
Status](https://coveralls.io/builds/2493019/badge)](https://coveralls.io/builds/2493019)

Coverage increased (+0.01%) to 93.36% when pulling 
**54facb4fd93c2ff59b3096c6e64b9be1b3c9cd88 on eduardomartins-luizalabs:master** 
into **d6dd2b4cd4a337c5517952680c3714e5d08e9cb8 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99201966
  

[![Coverage 
Status](https://coveralls.io/builds/2492985/badge)](https://coveralls.io/builds/2492985)

Coverage increased (+0.0%) to 93.35% when pulling 
**54facb4fd93c2ff59b3096c6e64b9be1b3c9cd88 on eduardomartins-luizalabs:master** 
into **d6dd2b4cd4a337c5517952680c3714e5d08e9cb8 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99202623
  

[![Coverage 
Status](https://coveralls.io/builds/2493014/badge)](https://coveralls.io/builds/2493014)

Coverage decreased (-0.0%) to 93.35% when pulling 
**54facb4fd93c2ff59b3096c6e64b9be1b3c9cd88 on eduardomartins-luizalabs:master** 
into **d6dd2b4cd4a337c5517952680c3714e5d08e9cb8 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (LANG-740) Add a Memoizer class

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528975#comment-14528975
 ] 

ASF GitHub Bot commented on LANG-740:
-

Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/80#issuecomment-99165036
  
Hello @jamessawle,

thank you for this PR. It looks very good to me. However there are a few 
this we need to adjust before I can apply it. Please have a look at my inline 
comments.

Thank you!


 Add a Memoizer class
 

 Key: LANG-740
 URL: https://issues.apache.org/jira/browse/LANG-740
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.concurrent.*
Reporter: Gary Gregory
Assignee: Gary Gregory
 Fix For: Review Patch, 3.5

 Attachments: LANG-740.patch


 I am currently using a class like the Memoizer class [1] from Java
 Concurrency in Practice [2], a great book.
 It would fit perfectly in org.apache.commons.lang3.concurrent.
 [1] http://jcip.net/listings/Memoizer.java
 [2] http://jcip.net/
 There is no licensing issue because the code is in the public domain:
 {noformat}
 -- Forwarded message --
 From: Brian Goetz br...@briangoetz.com
 Date: Tue, Aug 9, 2011 at 5:40 PM
 Subject: Re: Apache Commons Lang and Memoizer
 To: Gary Gregory ggreg...@apache.org, Tim Peierls t...@peierls.net
 No license issues -- the code is in the public domain:
Written by Brian Goetz and Tim Peierls with assistance from members of
JCP JSR-166 Expert Group and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain
 Code for the samples can be downloaded from http://www.jcip.net/listings.html.
 Cheers,
 -Brian
 On 8/9/2011 5:38 PM, Gary Gregory wrote:
 
  Hi Brian,
 
  I would like to include a Memoizer in the next release of Apache
  Commons Lang [1].
 
  Can we use the Memoizer pattern from Java Concurrency in Practice? I
  think I would reuse the code from the class Memoizer and change names,
  things like that.
 
  We are talking about this on the Lang mailing list and are wondering
  if there are any licensing issues.
 
  [1] https://commons.apache.org/lang/
 
 -- 
 Thank you,
 Gary
 http://garygregory.wordpress.com/
 http://garygregory.com/
 http://people.apache.org/~ggregory/
 http://twitter.com/GaryGregory
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-740) Add a Memoizer class

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528976#comment-14528976
 ] 

ASF GitHub Bot commented on LANG-740:
-

Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29696821
  
--- Diff: src/main/java/org/apache/commons/lang3/concurrent/Computable.java 
---
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.lang3.concurrent;
+
+/**
+ * pDefinition of an interface for a wrapper around a calculation that 
takes a single parameter and returns a result./p
+ * p/
+ * pThis interface allows for wrapping a calculation into a class so 
that it maybe passed around an application./p
+ *
+ * @param A the type of the input to the calculation
+ * @param V the type of the output of the calculation
+ */
+public interface ComputableA, V {
+
+   /**
--- End diff --

Please only use spaces for indentation


 Add a Memoizer class
 

 Key: LANG-740
 URL: https://issues.apache.org/jira/browse/LANG-740
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.concurrent.*
Reporter: Gary Gregory
Assignee: Gary Gregory
 Fix For: Review Patch, 3.5

 Attachments: LANG-740.patch


 I am currently using a class like the Memoizer class [1] from Java
 Concurrency in Practice [2], a great book.
 It would fit perfectly in org.apache.commons.lang3.concurrent.
 [1] http://jcip.net/listings/Memoizer.java
 [2] http://jcip.net/
 There is no licensing issue because the code is in the public domain:
 {noformat}
 -- Forwarded message --
 From: Brian Goetz br...@briangoetz.com
 Date: Tue, Aug 9, 2011 at 5:40 PM
 Subject: Re: Apache Commons Lang and Memoizer
 To: Gary Gregory ggreg...@apache.org, Tim Peierls t...@peierls.net
 No license issues -- the code is in the public domain:
Written by Brian Goetz and Tim Peierls with assistance from members of
JCP JSR-166 Expert Group and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain
 Code for the samples can be downloaded from http://www.jcip.net/listings.html.
 Cheers,
 -Brian
 On 8/9/2011 5:38 PM, Gary Gregory wrote:
 
  Hi Brian,
 
  I would like to include a Memoizer in the next release of Apache
  Commons Lang [1].
 
  Can we use the Memoizer pattern from Java Concurrency in Practice? I
  think I would reuse the code from the class Memoizer and change names,
  things like that.
 
  We are talking about this on the Lang mailing list and are wondering
  if there are any licensing issues.
 
  [1] https://commons.apache.org/lang/
 
 -- 
 Thank you,
 Gary
 http://garygregory.wordpress.com/
 http://garygregory.com/
 http://people.apache.org/~ggregory/
 http://twitter.com/GaryGregory
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: LANG-740 - Implementation of a Memomize...

2015-05-05 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29696865
  
--- Diff: 
src/test/java/org/apache/commons/lang3/concurrent/MemoizerTest.java ---
@@ -0,0 +1,112 @@
+package org.apache.commons.lang3.concurrent;
+
+import org.easymock.EasyMockRunner;
+import org.easymock.Mock;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+@RunWith(EasyMockRunner.class)
+public class MemoizerTest {
+
+   @Mock
+   private ComputableInteger, Integer computable;
+
+   @Test
+   public void testOnlyCallComputableOnceIfDoesNotThrowException() throws 
Exception {
+   Integer input = 1;
+   MemoizerInteger, Integer memoizer = new MemoizerInteger, 
Integer(computable);
+   expect(computable.compute(input)).andReturn(input);
+   replay(computable);
+
+   assertEquals(Should call computable first time, input, 
memoizer.compute(input));
+   assertEquals(Should not call the computable the second time, 
input, memoizer.compute(input));
+   }
+
+   @Test(expected = IllegalStateException.class)
+   public void testDefaultBehaviourNotToRecalculateExecutionExceptions() 
throws Exception {
+   Integer input = 1;
+   Integer answer = 3;
--- End diff --

answer is unused


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: LANG-740 - Implementation of a Memomize...

2015-05-05 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29696927
  
--- Diff: 
src/test/java/org/apache/commons/lang3/concurrent/MemoizerTest.java ---
@@ -0,0 +1,112 @@
+package org.apache.commons.lang3.concurrent;
--- End diff --

Apache license header is missing


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: LANG-740 - Implementation of a Memomize...

2015-05-05 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29696898
  
--- Diff: 
src/test/java/org/apache/commons/lang3/concurrent/MemoizerTest.java ---
@@ -0,0 +1,112 @@
+package org.apache.commons.lang3.concurrent;
+
+import org.easymock.EasyMockRunner;
+import org.easymock.Mock;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+@RunWith(EasyMockRunner.class)
+public class MemoizerTest {
+
+   @Mock
+   private ComputableInteger, Integer computable;
+
+   @Test
+   public void testOnlyCallComputableOnceIfDoesNotThrowException() throws 
Exception {
+   Integer input = 1;
+   MemoizerInteger, Integer memoizer = new MemoizerInteger, 
Integer(computable);
+   expect(computable.compute(input)).andReturn(input);
+   replay(computable);
+
+   assertEquals(Should call computable first time, input, 
memoizer.compute(input));
+   assertEquals(Should not call the computable the second time, 
input, memoizer.compute(input));
+   }
+
+   @Test(expected = IllegalStateException.class)
+   public void testDefaultBehaviourNotToRecalculateExecutionExceptions() 
throws Exception {
+   Integer input = 1;
+   Integer answer = 3;
+   MemoizerInteger, Integer memoizer = new MemoizerInteger, 
Integer(computable);
+   InterruptedException interruptedException = new 
InterruptedException();
+   
expect(computable.compute(input)).andThrow(interruptedException);
+   replay(computable);
+
+   try {
+   memoizer.compute(input);
+   fail();
+   }
+   catch (Throwable ex) {
+   //Should always be thrown the first time
+   }
+
+   memoizer.compute(input);
+   }
+
+   @Test(expected = IllegalStateException.class)
+   public void testDoesNotRecalculateWhenSetToFalse() throws Exception {
+   Integer input = 1;
+   Integer answer = 3;
--- End diff --

answer is unused


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (LANG-740) Add a Memoizer class

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528977#comment-14528977
 ] 

ASF GitHub Bot commented on LANG-740:
-

Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29696865
  
--- Diff: 
src/test/java/org/apache/commons/lang3/concurrent/MemoizerTest.java ---
@@ -0,0 +1,112 @@
+package org.apache.commons.lang3.concurrent;
+
+import org.easymock.EasyMockRunner;
+import org.easymock.Mock;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+@RunWith(EasyMockRunner.class)
+public class MemoizerTest {
+
+   @Mock
+   private ComputableInteger, Integer computable;
+
+   @Test
+   public void testOnlyCallComputableOnceIfDoesNotThrowException() throws 
Exception {
+   Integer input = 1;
+   MemoizerInteger, Integer memoizer = new MemoizerInteger, 
Integer(computable);
+   expect(computable.compute(input)).andReturn(input);
+   replay(computable);
+
+   assertEquals(Should call computable first time, input, 
memoizer.compute(input));
+   assertEquals(Should not call the computable the second time, 
input, memoizer.compute(input));
+   }
+
+   @Test(expected = IllegalStateException.class)
+   public void testDefaultBehaviourNotToRecalculateExecutionExceptions() 
throws Exception {
+   Integer input = 1;
+   Integer answer = 3;
--- End diff --

answer is unused


 Add a Memoizer class
 

 Key: LANG-740
 URL: https://issues.apache.org/jira/browse/LANG-740
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.concurrent.*
Reporter: Gary Gregory
Assignee: Gary Gregory
 Fix For: Review Patch, 3.5

 Attachments: LANG-740.patch


 I am currently using a class like the Memoizer class [1] from Java
 Concurrency in Practice [2], a great book.
 It would fit perfectly in org.apache.commons.lang3.concurrent.
 [1] http://jcip.net/listings/Memoizer.java
 [2] http://jcip.net/
 There is no licensing issue because the code is in the public domain:
 {noformat}
 -- Forwarded message --
 From: Brian Goetz br...@briangoetz.com
 Date: Tue, Aug 9, 2011 at 5:40 PM
 Subject: Re: Apache Commons Lang and Memoizer
 To: Gary Gregory ggreg...@apache.org, Tim Peierls t...@peierls.net
 No license issues -- the code is in the public domain:
Written by Brian Goetz and Tim Peierls with assistance from members of
JCP JSR-166 Expert Group and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain
 Code for the samples can be downloaded from http://www.jcip.net/listings.html.
 Cheers,
 -Brian
 On 8/9/2011 5:38 PM, Gary Gregory wrote:
 
  Hi Brian,
 
  I would like to include a Memoizer in the next release of Apache
  Commons Lang [1].
 
  Can we use the Memoizer pattern from Java Concurrency in Practice? I
  think I would reuse the code from the class Memoizer and change names,
  things like that.
 
  We are talking about this on the Lang mailing list and are wondering
  if there are any licensing issues.
 
  [1] https://commons.apache.org/lang/
 
 -- 
 Thank you,
 Gary
 http://garygregory.wordpress.com/
 http://garygregory.com/
 http://people.apache.org/~ggregory/
 http://twitter.com/GaryGregory
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-740) Add a Memoizer class

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528978#comment-14528978
 ] 

ASF GitHub Bot commented on LANG-740:
-

Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29696898
  
--- Diff: 
src/test/java/org/apache/commons/lang3/concurrent/MemoizerTest.java ---
@@ -0,0 +1,112 @@
+package org.apache.commons.lang3.concurrent;
+
+import org.easymock.EasyMockRunner;
+import org.easymock.Mock;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+@RunWith(EasyMockRunner.class)
+public class MemoizerTest {
+
+   @Mock
+   private ComputableInteger, Integer computable;
+
+   @Test
+   public void testOnlyCallComputableOnceIfDoesNotThrowException() throws 
Exception {
+   Integer input = 1;
+   MemoizerInteger, Integer memoizer = new MemoizerInteger, 
Integer(computable);
+   expect(computable.compute(input)).andReturn(input);
+   replay(computable);
+
+   assertEquals(Should call computable first time, input, 
memoizer.compute(input));
+   assertEquals(Should not call the computable the second time, 
input, memoizer.compute(input));
+   }
+
+   @Test(expected = IllegalStateException.class)
+   public void testDefaultBehaviourNotToRecalculateExecutionExceptions() 
throws Exception {
+   Integer input = 1;
+   Integer answer = 3;
+   MemoizerInteger, Integer memoizer = new MemoizerInteger, 
Integer(computable);
+   InterruptedException interruptedException = new 
InterruptedException();
+   
expect(computable.compute(input)).andThrow(interruptedException);
+   replay(computable);
+
+   try {
+   memoizer.compute(input);
+   fail();
+   }
+   catch (Throwable ex) {
+   //Should always be thrown the first time
+   }
+
+   memoizer.compute(input);
+   }
+
+   @Test(expected = IllegalStateException.class)
+   public void testDoesNotRecalculateWhenSetToFalse() throws Exception {
+   Integer input = 1;
+   Integer answer = 3;
--- End diff --

answer is unused


 Add a Memoizer class
 

 Key: LANG-740
 URL: https://issues.apache.org/jira/browse/LANG-740
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.concurrent.*
Reporter: Gary Gregory
Assignee: Gary Gregory
 Fix For: Review Patch, 3.5

 Attachments: LANG-740.patch


 I am currently using a class like the Memoizer class [1] from Java
 Concurrency in Practice [2], a great book.
 It would fit perfectly in org.apache.commons.lang3.concurrent.
 [1] http://jcip.net/listings/Memoizer.java
 [2] http://jcip.net/
 There is no licensing issue because the code is in the public domain:
 {noformat}
 -- Forwarded message --
 From: Brian Goetz br...@briangoetz.com
 Date: Tue, Aug 9, 2011 at 5:40 PM
 Subject: Re: Apache Commons Lang and Memoizer
 To: Gary Gregory ggreg...@apache.org, Tim Peierls t...@peierls.net
 No license issues -- the code is in the public domain:
Written by Brian Goetz and Tim Peierls with assistance from members of
JCP JSR-166 Expert Group and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain
 Code for the samples can be downloaded from http://www.jcip.net/listings.html.
 Cheers,
 -Brian
 On 8/9/2011 5:38 PM, Gary Gregory wrote:
 
  Hi Brian,
 
  I would like to include a Memoizer in the next release of Apache
  Commons Lang [1].
 
  Can we use the Memoizer pattern from Java Concurrency in Practice? I
  think I would reuse the code from the class Memoizer and change names,
  things like that.
 
  We are talking about this on the Lang mailing list and are wondering
  if there are any licensing issues.
 
  [1] https://commons.apache.org/lang/
 
 -- 
 Thank you,
 Gary
 http://garygregory.wordpress.com/
 http://garygregory.com/
 http://people.apache.org/~ggregory/
 http://twitter.com/GaryGregory
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-740) Add a Memoizer class

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528980#comment-14528980
 ] 

ASF GitHub Bot commented on LANG-740:
-

Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29696927
  
--- Diff: 
src/test/java/org/apache/commons/lang3/concurrent/MemoizerTest.java ---
@@ -0,0 +1,112 @@
+package org.apache.commons.lang3.concurrent;
--- End diff --

Apache license header is missing


 Add a Memoizer class
 

 Key: LANG-740
 URL: https://issues.apache.org/jira/browse/LANG-740
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.concurrent.*
Reporter: Gary Gregory
Assignee: Gary Gregory
 Fix For: Review Patch, 3.5

 Attachments: LANG-740.patch


 I am currently using a class like the Memoizer class [1] from Java
 Concurrency in Practice [2], a great book.
 It would fit perfectly in org.apache.commons.lang3.concurrent.
 [1] http://jcip.net/listings/Memoizer.java
 [2] http://jcip.net/
 There is no licensing issue because the code is in the public domain:
 {noformat}
 -- Forwarded message --
 From: Brian Goetz br...@briangoetz.com
 Date: Tue, Aug 9, 2011 at 5:40 PM
 Subject: Re: Apache Commons Lang and Memoizer
 To: Gary Gregory ggreg...@apache.org, Tim Peierls t...@peierls.net
 No license issues -- the code is in the public domain:
Written by Brian Goetz and Tim Peierls with assistance from members of
JCP JSR-166 Expert Group and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain
 Code for the samples can be downloaded from http://www.jcip.net/listings.html.
 Cheers,
 -Brian
 On 8/9/2011 5:38 PM, Gary Gregory wrote:
 
  Hi Brian,
 
  I would like to include a Memoizer in the next release of Apache
  Commons Lang [1].
 
  Can we use the Memoizer pattern from Java Concurrency in Practice? I
  think I would reuse the code from the class Memoizer and change names,
  things like that.
 
  We are talking about this on the Lang mailing list and are wondering
  if there are any licensing issues.
 
  [1] https://commons.apache.org/lang/
 
 -- 
 Thank you,
 Gary
 http://garygregory.wordpress.com/
 http://garygregory.com/
 http://people.apache.org/~ggregory/
 http://twitter.com/GaryGregory
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (LANG-701) StringUtils join with var args

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter resolved LANG-701.
--
   Resolution: Fixed
Fix Version/s: (was: Review Patch)
   3.5
 Assignee: Benedikt Ritter

Fixed by merging https://github.com/apache/commons-lang/pull/79/. Merge commit 
hash is 7fae5b0b17dbfa46236243cc53f0ea853ed89f5c.

 StringUtils join with var args
 --

 Key: LANG-701
 URL: https://issues.apache.org/jira/browse/LANG-701
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.*
Reporter: Gabriele Kahlout
Assignee: Benedikt Ritter
Priority: Minor
 Fix For: 3.5

 Attachments: VarArgJoinTest.java


 {code:java}
 final String apple = apple;
 final String banana = banana;
 final String orange = orange;
 final String expected = apple +  SPACE + banana + SPACE + orange;
 final String  actual = join(SPACE, apple, banana, orange);
 final int expLength = expected.length();
 final int actLength = actual.length();
 assertEquals(expLength, actLength);
 assertEquals(expected, actual);
 {code}
 I missed the functionality of joining strings with the space separator in one 
 line. BTW, why space ' ' not a constant field anywhere?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: LANG-701 - Added new joinWith method to...

2015-05-05 Thread britter
Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/79#issuecomment-99172436
  
Thank you!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread agrava-luizalabs
Github user agrava-luizalabs commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/81#discussion_r29700273
  
--- Diff: src/main/java/org/apache/commons/lang3/StringUtils.java ---
@@ -1685,7 +1685,7 @@ public static boolean containsAny(final CharSequence 
cs, final CharSequence sear
  * StringUtils.containsAny(, *)  = false
  * StringUtils.containsAny(*, null)= false
  * StringUtils.containsAny(*, [])  = false
- * StringUtils.containsAny(abcd, ab, cd) = false
+ * StringUtils.containsAny(abcd, ab, cd) = true
--- End diff --

It is good to point out that the documentation was wrong in this case


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: DOC: StringUtils.containsAny. ADD: cont...

2015-05-05 Thread britter
Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/81#issuecomment-99181116
  
This would better fit into ```org.apache.commons.lang3.text.WordUtils```, 
because it deals with words. I could imagine having a 
StringUtils.containsAll(CharSequence, CharSequence...) method that just checks 
if all of the given CharSequences are all contained in the first CharSequence, 
but without handling word boundaries.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (LANG-1130) Fix critical issues reported by SonarQube

2015-05-05 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter resolved LANG-1130.
---
Resolution: Fixed

Fixed in 98220ad03e4b620a98ca355317c9da6c6ac765d1

 Fix critical issues reported by SonarQube
 -

 Key: LANG-1130
 URL: https://issues.apache.org/jira/browse/LANG-1130
 Project: Commons Lang
  Issue Type: Task
Affects Versions: 3.5
Reporter: Benedikt Ritter
Assignee: Benedikt Ritter
 Fix For: 3.5


 The Apache SonarQube instance shows five critical warnings for Commons Lang: 
 https://analysis.apache.org/dashboard/index/72046
 We should try to fix those.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: LANG-740 - Implementation of a Memomize...

2015-05-05 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29696821
  
--- Diff: src/main/java/org/apache/commons/lang3/concurrent/Computable.java 
---
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.lang3.concurrent;
+
+/**
+ * pDefinition of an interface for a wrapper around a calculation that 
takes a single parameter and returns a result./p
+ * p/
+ * pThis interface allows for wrapping a calculation into a class so 
that it maybe passed around an application./p
+ *
+ * @param A the type of the input to the calculation
+ * @param V the type of the output of the calculation
+ */
+public interface ComputableA, V {
+
+   /**
--- End diff --

Please only use spaces for indentation


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: LANG-740 - Implementation of a Memomize...

2015-05-05 Thread britter
Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/80#issuecomment-99165036
  
Hello @jamessawle,

thank you for this PR. It looks very good to me. However there are a few 
this we need to adjust before I can apply it. Please have a look at my inline 
comments.

Thank you!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: LANG-740 - Implementation of a Memomize...

2015-05-05 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29697345
  
--- Diff: 
src/test/java/org/apache/commons/lang3/concurrent/MemoizerTest.java ---
@@ -0,0 +1,112 @@
+package org.apache.commons.lang3.concurrent;
+
+import org.easymock.EasyMockRunner;
+import org.easymock.Mock;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+@RunWith(EasyMockRunner.class)
+public class MemoizerTest {
--- End diff --

Wouldn't it make sense to create a test that uses an executor service to 
let several threads in parallel access the same Memoizer instance?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (LANG-740) Add a Memoizer class

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14528982#comment-14528982
 ] 

ASF GitHub Bot commented on LANG-740:
-

Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/80#discussion_r29697345
  
--- Diff: 
src/test/java/org/apache/commons/lang3/concurrent/MemoizerTest.java ---
@@ -0,0 +1,112 @@
+package org.apache.commons.lang3.concurrent;
+
+import org.easymock.EasyMockRunner;
+import org.easymock.Mock;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+@RunWith(EasyMockRunner.class)
+public class MemoizerTest {
--- End diff --

Wouldn't it make sense to create a test that uses an executor service to 
let several threads in parallel access the same Memoizer instance?


 Add a Memoizer class
 

 Key: LANG-740
 URL: https://issues.apache.org/jira/browse/LANG-740
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.concurrent.*
Reporter: Gary Gregory
Assignee: Gary Gregory
 Fix For: Review Patch, 3.5

 Attachments: LANG-740.patch


 I am currently using a class like the Memoizer class [1] from Java
 Concurrency in Practice [2], a great book.
 It would fit perfectly in org.apache.commons.lang3.concurrent.
 [1] http://jcip.net/listings/Memoizer.java
 [2] http://jcip.net/
 There is no licensing issue because the code is in the public domain:
 {noformat}
 -- Forwarded message --
 From: Brian Goetz br...@briangoetz.com
 Date: Tue, Aug 9, 2011 at 5:40 PM
 Subject: Re: Apache Commons Lang and Memoizer
 To: Gary Gregory ggreg...@apache.org, Tim Peierls t...@peierls.net
 No license issues -- the code is in the public domain:
Written by Brian Goetz and Tim Peierls with assistance from members of
JCP JSR-166 Expert Group and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain
 Code for the samples can be downloaded from http://www.jcip.net/listings.html.
 Cheers,
 -Brian
 On 8/9/2011 5:38 PM, Gary Gregory wrote:
 
  Hi Brian,
 
  I would like to include a Memoizer in the next release of Apache
  Commons Lang [1].
 
  Can we use the Memoizer pattern from Java Concurrency in Practice? I
  think I would reuse the code from the class Memoizer and change names,
  things like that.
 
  We are talking about this on the Lang mailing list and are wondering
  if there are any licensing issues.
 
  [1] https://commons.apache.org/lang/
 
 -- 
 Thank you,
 Gary
 http://garygregory.wordpress.com/
 http://garygregory.com/
 http://people.apache.org/~ggregory/
 http://twitter.com/GaryGregory
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: LANG-701 - Added new joinWith method to...

2015-05-05 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (LANG-701) StringUtils join with var args

2015-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529006#comment-14529006
 ] 

ASF GitHub Bot commented on LANG-701:
-

Github user asfgit closed the pull request at:

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


 StringUtils join with var args
 --

 Key: LANG-701
 URL: https://issues.apache.org/jira/browse/LANG-701
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.*
Reporter: Gabriele Kahlout
Priority: Minor
 Fix For: Review Patch

 Attachments: VarArgJoinTest.java


 {code:java}
 final String apple = apple;
 final String banana = banana;
 final String orange = orange;
 final String expected = apple +  SPACE + banana + SPACE + orange;
 final String  actual = join(SPACE, apple, banana, orange);
 final int expLength = expected.length();
 final int actLength = actual.length();
 assertEquals(expLength, actLength);
 assertEquals(expected, actual);
 {code}
 I missed the functionality of joining strings with the space separator in one 
 line. BTW, why space ' ' not a constant field anywhere?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] commons-lang pull request: remove compiler warnings from ThreadUti...

2015-05-05 Thread PascalSchumacher
GitHub user PascalSchumacher opened a pull request:

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

remove compiler warnings from ThreadUtils



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

$ git pull https://github.com/PascalSchumacher/commons-lang 
remove_ThreadUtils_compiler_warnings

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

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


commit 7d5a61ed64315bd6570c5cb55c1f53853a3fffa5
Author: Pascal Schumacher pascalschumac...@gmx.net
Date:   2015-05-05T21:31:20Z

remove compiler warnings from ThreadUtils




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: remove compiler warnings of joinWith te...

2015-05-05 Thread PascalSchumacher
GitHub user PascalSchumacher opened a pull request:

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

remove compiler warnings of joinWith tests



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

$ git pull https://github.com/PascalSchumacher/commons-lang 
StringUtilsTest_compiler_warnings

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

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


commit 5f9e0851da9e74c12e04f5a62cb7aeb1a8ab7589
Author: Pascal Schumacher pascalschumac...@gmx.net
Date:   2015-05-05T21:25:12Z

remove compiler warnings of joinWith tests




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: @SuppressWarnings(deprecation) to joi...

2015-05-05 Thread PascalSchumacher
GitHub user PascalSchumacher opened a pull request:

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

@SuppressWarnings(deprecation) to joinWith, because it uses the

deprecated ObjectUtils.toString(Object) method (which is o.k. to use as
long as commons-lang3 does not require java 7 or greater)

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

$ git pull https://github.com/PascalSchumacher/commons-lang 
supress_compiler_warning

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

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


commit 823d2a0b957393f200fb33a87caff13fc231a78c
Author: Pascal Schumacher pascalschumac...@gmx.net
Date:   2015-05-05T21:38:35Z

@SuppressWarnings(deprecation) to joinWith, because it uses the
deprecated ObjectUtils.toString(Object) method (which is o.k. to use as
long as commons-lang3 does not require java 7 or greater)




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] commons-lang pull request: remove compiler warnings from ThreadUti...

2015-05-05 Thread coveralls
Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/83#issuecomment-99234742
  

[![Coverage 
Status](https://coveralls.io/builds/2494291/badge)](https://coveralls.io/builds/2494291)

Coverage decreased (-0.01%) to 93.35% when pulling 
**7d5a61ed64315bd6570c5cb55c1f53853a3fffa5 on 
PascalSchumacher:remove_ThreadUtils_compiler_warnings** into 
**d6dd2b4cd4a337c5517952680c3714e5d08e9cb8 on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---