[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990864#comment-13990864 ] Benedikt Ritter commented on LANG-1008: --- @[~garydgregory]: We're discussing methods that are already there in lang. Removing the math package completely from lang could be part of 4.0. > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990857#comment-13990857 ] Michael Osipov commented on LANG-1008: -- Thiago, he's talking about the methods in general. They should be Math rather than in Lang. > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990810#comment-13990810 ] Thiago Andrade commented on LANG-1008: -- But this problem was found inside commons-lang.. isnt it more appropriate? > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990644#comment-13990644 ] Gary Gregory commented on LANG-1008: I'd rather keep this out of [lang], we have [math] . > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990605#comment-13990605 ] Thiago Andrade commented on LANG-1008: -- [~michael-o] i've just sent the e-mail. Please tell me whether you received > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990334#comment-13990334 ] Michael Osipov commented on LANG-1008: -- [~s...@apache.org], true words. Will do. [~thiagoh1], will you raise this on the dev list or do you want me to do it? > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990042#comment-13990042 ] Sebb commented on LANG-1008: Please raise this on the Commons developer list. JIRA is not a suitable medium for discussion, and the subject is off-topic for this particular JIRA. Depending on the outcome of the discussions, it may be necessary to raise new JIRA issues to make any agreed upon changes. > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989993#comment-13989993 ] Thiago Andrade commented on LANG-1008: -- So [~michael-o] it seems that we have a big problem. The official documentation (Oracle|Sun) says X and [Apache Commons Lang Developer Guide|http://commons.apache.org/proper/commons-lang/developerguide.html#Exception_throwing] says Y. Once the {{NumberUtils}} (and probably many other classes) obey ApacheCommon's guide, what should be done? > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989986#comment-13989986 ] Michael Osipov commented on LANG-1008: -- [~thiagoh1], that book is a bible to me. Moreover, one should read the [contract|http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html] of {{NullPointerException}}, and it pretty gets the point. [~dmjones], I have found [it|http://commons.apache.org/proper/commons-lang/developerguide.html#Exception_throwing]. By the terms of Java and Joshua Bloch, this is plain wrong. > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989981#comment-13989981 ] Thiago Andrade commented on LANG-1008: -- [~dmjones500] I think that throwing a NullPointerException still is the correct way of verify arguments. Please read this: [Unchecked Exceptions — The Controversy|http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html] ??One case where it is common practice to throw a RuntimeException is when the user calls a method incorrectly. For example, a method can check if one of its arguments is incorrectly null. If an argument is null, the method might throw a NullPointerException, which is an unchecked exception.?? > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989966#comment-13989966 ] Duncan Jones commented on LANG-1008: This was a deliberate policy in the past, check the dev guide on the website. However I'm not sure it's in practice any more. There is a mix of behaviour across the classes. > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989961#comment-13989961 ] Thiago Andrade commented on LANG-1008: -- [~michael-o] you are right! I around the web and found this [NullPointerException is a great way to tell, that an argument should not be null|http://books.google.com.br/books?id=ka2VUBqHiWkC&pg=PA248&lpg=PA248&dq=%22Arguably,+all+erroneous+method+invocations+boil+down+to+an+illegal+argument+or+illegal+state,+but+other+exceptions+are+standardly+used+for+certain+kinds+of+illegal+arguments+and+states.+If+a+caller+passes+null+in+some+parameter+for+which+null+values+are+prohibited,+convention+dictates+that+NullPointerException+be+thrown+rather+than+IllegalArgumentException.+Similarly,+if+a+caller+passes+an+out-of-range+value+in+a+parameter+representing+an+index+into+a+sequence,+IndexOutOfBoundsException+should+be+thrown+rather+than+IllegalArgumentException.%22&source=bl&ots=yYLoLgqZT4&sig=2npCOGZcepQ954Cg8LISYc2iGNA&hl=en&sa=X&ei=xvlnU4jSIYHJsQTpg4DIAQ&ved=0CCgQ6AEwAA#v=onepage&q=%22Arguably%2C%20all%20erroneous%20method%20invocations%20boil%20down%20to%20an%20illegal%20argument%20or%20illegal%20state%2C%20but%20other%20exceptions%20are%20standardly%20used%20for%20certain%20kinds%20of%20illegal%20arguments%20and%20states.%20If%20a%20caller%20passes%20null%20in%20some%20parameter%20for%20which%20null%20values%20are%20prohibited%2C%20convention%20dictates%20that%20NullPointerException%20be%20thrown%20rather%20than%20IllegalArgumentException.%20Similarly%2C%20if%20a%20caller%20passes%20an%20out-of-range%20value%20in%20a%20parameter%20representing%20an%20index%20into%20a%20sequence%2C%20IndexOutOfBoundsException%20should%20be%20thrown%20rather%20than%20IllegalArgumentException.%22&f=false] from Effective Java 2nd edition Book from Sun > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989937#comment-13989937 ] Michael Osipov commented on LANG-1008: -- Wow, all max/min methods have the some bug. They all through an {{IllegalArgumentException}} if a null pointer is passed, this is -- wrong. it must be a {{NullPointerException}}. For that reason the {{NullArgumentException}} has been removed in Lang 3. > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989853#comment-13989853 ] Benedikt Ritter commented on LANG-1008: --- [~s...@apache.org]: I've asked the ML about binary compatibility regarding changing for example {code:java} public static long max(long[]) {code} to: {code:java} public static long max(long...) {code} this is probably the way to go. > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989608#comment-13989608 ] Thiago Andrade commented on LANG-1008: -- All these methods have the purpose of being a shorcut for max and min methods but using ´varargs´ instead of creating an regular java array to use the method. For example {code:java|borderStyle=solid} NumberUtils.max(new int[] { 1, 2, 3, 4, 5, 6 }); // returns 6 NumberUtils.maxVA(1, 2, 3, 4, 5, 6); // returns 6 {code} > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (LANG-1008) Adding the maxVA and minVA methods to NumberUtils and test methods
[ https://issues.apache.org/jira/browse/LANG-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989597#comment-13989597 ] Sebb commented on LANG-1008: What is the purpose of the new methods? The pull request does not give any details. > Adding the maxVA and minVA methods to NumberUtils and test methods > -- > > Key: LANG-1008 > URL: https://issues.apache.org/jira/browse/LANG-1008 > Project: Commons Lang > Issue Type: New Feature > Components: lang.*, lang.math.* >Reporter: Thiago Andrade > Labels: github > Fix For: Review Patch > > > Placeholder ticket for github PR 23: > https://github.com/apache/commons-lang/pull/23 -- This message was sent by Atlassian JIRA (v6.2#6252)