Re: Re: [lang]

2014-05-06 Thread Paul Benedict
When you dereference a null pointer, you get an NPE. We can agree to that. We can also agree it's not inherently wrong to throw IAE on a null argument check, but this discussion has never been about that. The discussion has always centered on what the trend setters are doing -- and they say go with

Re: Re: [lang]

2014-05-06 Thread sebb
On 6 May 2014 22:54, Paul Benedict wrote: > This is not a matter of law. If Oracle/Sun set a direction on how to use > NPE, it's a really good idea to follow them -- even if you don't agree, do > it for the sake of consistency. I don't think using IAE is somehow "better" > Java than what they are

Re: [QUESTION] Is switching from array parameter to varargs binary compatible?

2014-05-06 Thread sebb
On 6 May 2014 18:43, Benedikt Ritter wrote: > 2014-05-06 9:39 GMT+02:00 Benedikt Ritter : > >> >> >> 2014-05-06 5:06 GMT+02:00 Julien Aymé : >> >> Hi, >>> >>> >>> How can the compiler know whether max(1,2,3) is max(a,b,c) or max(a...) ? >>> >>> >>> max(1,2,3) is compiled to max(a,b,c). The compi

Re: Re: [lang]

2014-05-06 Thread Paul Benedict
This is not a matter of law. If Oracle/Sun set a direction on how to use NPE, it's a really good idea to follow them -- even if you don't agree, do it for the sake of consistency. I don't think using IAE is somehow "better" Java than what they are doing. And I give weight to what Joshua said becaus

Re: Re: [lang]

2014-05-06 Thread Duncan Jones
On 6 May 2014 22:27, "Michael Osipov" <1983-01...@gmx.net> wrote: > > Am 2014-05-06 15:27, schrieb Benedikt Ritter: > >> Hi Thiago, >> >> >> 2014-05-06 14:53 GMT+02:00 Thiago Andrade : >> >>> Hello people, >>> >>> Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-1008the >>> contr

Re: [lang]

2014-05-06 Thread Paul Benedict
Yes, it's supposed to throw NPE for the reasons stated a couple times in this thread. That's by design, not accident. The "official" version in java.lang.Objects (JDK 7+) does the same thing. Cheers, Paul On Tue, May 6, 2014 at 4:00 PM, Duncan Jones wrote: > On 6 May 2014 20:41, Phil Steitz

Re: [lang]

2014-05-06 Thread Paul Benedict
It's an old debate but the "official" Java coding style has become NPE for null arguments and IAE for invalid non-null arguments. Lang3 was supposed to go down that path because that's how the stewards of Java (Oracle/Sun) are coding and it's part of the best practices found in Joshua Bloch's book.

[continuum] BUILD FAILURE: Apache Commons Email - Apache Commons (Group (shared) Maven 3 Build Definition (Java 1.6))

2014-05-06 Thread Apache Continuum
Online report : https://continuum-ci.apache.org/continuum/buildResult.action?buildId=30324&projectId=79 Build statistics: State: Failed Previous State: Ok Started at: Tue 6 May 2014 21:22:55 + Finished at: Tue 6 May 2014 21:23:44 + Total time: 48s Build Trigger: Schedule Bui

Re: [lang]

2014-05-06 Thread Duncan Jones
On 6 May 2014 20:41, Phil Steitz wrote: > On 5/6/14, 10:09 AM, sebb wrote: >> On 6 May 2014 14:27, Benedikt Ritter wrote: >>> Hi Thiago, >>> >>> >>> 2014-05-06 14:53 GMT+02:00 Thiago Andrade : >>> Hello people, Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-100

Re: [lang]

2014-05-06 Thread Duncan Jones
On 6 May 2014 19:19, Paul Benedict wrote: > NPE is implicit if the method does not allow an argument to be null. This > doesn't have to be the case. This has nothing to do with the JDK vs. 3rd > party source. It's just about the contract. As long as you document which > arguments can be null, then

Re: [jcs] What's next?

2014-05-06 Thread Romain Manni-Bucau
That's my experience too. So let's go for the concurrenthashmap impl (patch on jira) and then see how we do the invalidation stuff in a 2.1? Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/

Re: Re: [lang]

2014-05-06 Thread Michael-O
Am 2014-05-06 15:27, schrieb Benedikt Ritter: Hi Thiago, 2014-05-06 14:53 GMT+02:00 Thiago Andrade : Hello people, Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-1008the contributors noticed that NumberUtils.max/min methods all have the same problem: They all throw an Il

Re: How to run unit test ProviderRenameTests?

2014-05-06 Thread Bernd Eckenfels
Hello, I tried several times to understand how the testconfiguration and suite building is working but I failed. I noticed that most of the tests have totally unrelated class-names when run in Eclipse JUnit runner (but can be used). So I typically do the same as you did, make standalone tests or

Re: Re: [lang]

2014-05-06 Thread Michael Osipov
Am 2014-05-06 15:27, schrieb Benedikt Ritter: Hi Thiago, 2014-05-06 14:53 GMT+02:00 Thiago Andrade : Hello people, Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-1008the contributors noticed that NumberUtils.max/min methods all have the same problem: They all throw an Il

Re: [lang]

2014-05-06 Thread Phil Steitz
On 5/6/14, 10:09 AM, sebb wrote: > On 6 May 2014 14:27, Benedikt Ritter wrote: >> Hi Thiago, >> >> >> 2014-05-06 14:53 GMT+02:00 Thiago Andrade : >> >>> Hello people, >>> >>> Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-1008the >>> contributors noticed that NumberUtils.max/m

Re: [configuration] Get all properties in a configuration

2014-05-06 Thread Oliver Heger
Hi Petar, Am 06.05.2014 15:45, schrieb Petar Tahchiev: > Hi Gary, > > actually I found this: > > final Properties props = > ConfigurationConverter.getProperties(configuration); > > which does the job. I also would have pointed you to this method, but was not 100% sure what you meant. My first

Re: [lang]

2014-05-06 Thread Paul Benedict
NPE is implicit if the method does not allow an argument to be null. This doesn't have to be the case. This has nothing to do with the JDK vs. 3rd party source. It's just about the contract. As long as you document which arguments can be null, then you're good -- otherwise throw an NPE to capture t

[GitHub] commons-lang pull request: Update ImmutablePair to be not final

2014-05-06 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/commons-lang/pull/13 --- 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

Re: [jcs] What's next?

2014-05-06 Thread Mark Struberg
Well my personal experience only: 1.) I barely use distributed caches. I use ehcache in most of my projects as of today, but do not use the distribution feature much. Way too complicated 2.) What actually IS useful is distributed cache invalidation. The caching side is fine to just select any

[GitHub] commons-lang pull request: Fixing NumberUtils JAVADoc comments for...

2014-05-06 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/commons-lang/pull/22 --- 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

[GitHub] commons-lang pull request: Add wrap (with String or char) to Strin...

2014-05-06 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/commons-lang/pull/21 --- 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

Re: [QUESTION] Is switching from array parameter to varargs binary compatible?

2014-05-06 Thread Benedikt Ritter
2014-05-06 9:39 GMT+02:00 Benedikt Ritter : > > > 2014-05-06 5:06 GMT+02:00 Julien Aymé : > > Hi, >> >> >> How can the compiler know whether max(1,2,3) is max(a,b,c) or max(a...) ? >> >> >> max(1,2,3) is compiled to max(a,b,c). The compiler will use the finer >> method instead of using the more

Re: [lang]

2014-05-06 Thread sebb
On 6 May 2014 14:27, Benedikt Ritter wrote: > Hi Thiago, > > > 2014-05-06 14:53 GMT+02:00 Thiago Andrade : > >> Hello people, >> >> Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-1008the >> contributors noticed that NumberUtils.max/min methods all have the same >> problem: >>

[VFS] How to run unit test ProviderRenameTests?

2014-05-06 Thread Woonsan Ko
Hi, I'm trying to reproduce VFS-298 with the unit test (in trunk) because I met a similar exception in my application, but I can't execute the unit test, ProviderRenameTests. When I run `mvn clean install' in the root folder, I can't find 'core/target/surefire-reports/*ProviderRenameTests*.txt'

How to run unit test ProviderRenameTests?

2014-05-06 Thread Woonsan Ko
Hi, I'm trying to reproduce VFS-298 with the unit test (in trunk) because I met a similar exception in my application, but I can't execute the unit test, ProviderRenameTests. When I run `mvn clean install' in the root folder, I can't find 'core/target/surefire-reports/*ProviderRenameTests*.txt'

Re: [configuration] Get all properties in a configuration

2014-05-06 Thread Petar Tahchiev
Hi Gary, actually I found this: final Properties props = ConfigurationConverter.getProperties(configuration); which does the job. 2014-05-06 16:21 GMT+03:00 Gary Gregory : > Hi Petar, good to see you here. > > Feel free to provide a patch to move the ball forward. The next question > would b

Re: [lang]

2014-05-06 Thread Benedikt Ritter
Hi Thiago, 2014-05-06 14:53 GMT+02:00 Thiago Andrade : > Hello people, > > Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-1008the > contributors noticed that NumberUtils.max/min methods all have the same > problem: > They all throw an IllegalArgumentException when according

Re: [configuration] Get all properties in a configuration

2014-05-06 Thread Gary Gregory
Hi Petar, good to see you here. Feel free to provide a patch to move the ball forward. The next question would be should the returned object be a safe copy or should changes in the object be reflected in the config? Gary On Tue, May 6, 2014 at 7:45 AM, Petar Tahchiev wrote: > Hi guys, > > I'm

[lang]

2014-05-06 Thread Thiago Andrade
Hello people, Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-1008 the contributors noticed that NumberUtils.max/min methods all have the same problem: They all throw an IllegalArgumentException when according to the official documentation (Oracle|Sun) says that a NullPointerEx

[configuration] Get all properties in a configuration

2014-05-06 Thread Petar Tahchiev
Hi guys, I'm looking at the API and I can't seem to find a method that returns all the Properties in a Configuration object. I know I can access the keys and then iterate and get the property with that key, but is there any method like getAllProperties? If not is there any reason not to add one?

Re: [jcs] What's next?

2014-05-06 Thread Romain Manni-Bucau
Here some pseudo-core details about my first mail: New internals: * NetworkTopology * EntryRepartitor: compute the index of the * Node (LocalNode which is current impl and RemoteNode which is just a remote facade relying Network) NetworkTopology { // impl using udp/tcp/or whatever Node[] fin

Re: [jcs] What's next?

2014-05-06 Thread Romain Manni-Bucau
FYI I attached a patch using a ConcurrentHashMap here https://issues.apache.org/jira/browse/JCS-127 It is pretty fast compared to previous impl. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github

[continuum] BUILD FAILURE: Apache Commons JCS - Apache Commons ()

2014-05-06 Thread Apache Continuum
Online report : https://continuum-ci.apache.org/continuum/buildResult.action?buildId=30288&projectId=286 Build statistics: State: Failed Previous State: Failed Started at: Tue 6 May 2014 08:00:04 + Finished at: Tue 6 May 2014 08:04:16 + Total time: 4m 12s Build Trigger: Schedu

Re: [QUESTION] Is switching from array parameter to varargs binary compatible?

2014-05-06 Thread Benedikt Ritter
2014-05-06 5:06 GMT+02:00 Julien Aymé : > Hi, > > > How can the compiler know whether max(1,2,3) is max(a,b,c) or max(a...) ? > > > max(1,2,3) is compiled to max(a,b,c). The compiler will use the finer > method instead of using the more generic one. > > This is used for example in logging framew

[continuum] BUILD FAILURE: Apache Commons JCS - Apache Commons (Group (shared) Maven 3 Build Definition (Java 1.6))

2014-05-06 Thread Apache Continuum
Online report : https://continuum-ci.apache.org/continuum/buildResult.action?buildId=30287&projectId=286 Build statistics: State: Failed Previous State: Failed Started at: Tue 6 May 2014 07:20:39 + Finished at: Tue 6 May 2014 07:24:27 + Total time: 3m 48s Build Trigger: Schedu