[jira] [Commented] (LANG-1386) Ambiguous method call error when using BooleanUtils.and

2019-06-21 Thread JIRA


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

Tomáš Mrázek commented on LANG-1386:


SO answer does provide easy workaround, but that's no longer true for Java 9 
and higher, where Boolean constructor is deprecated. Static alternative 
Boolean.valueOf() does raise ambiguous errors. We can use deprecated object 
constructor or primitive constructor. Either way there is no need for keeping 
both method calls. Autoboxing was introduced in Java 1.5, so removing primitive 
or object method call for and / xor / or operations would break backwards 
compatibility for Java 1.4 and lower.

> Ambiguous method call error when using BooleanUtils.and
> ---
>
> Key: LANG-1386
> URL: https://issues.apache.org/jira/browse/LANG-1386
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.4
>Reporter: Kapil Koju
>Priority: Minor
> Attachments: BooleanUtils.and javadoc.png, Wrapper Boolean and.png, 
> literal boolean and.png, possible use case.png
>
>
> When using `BooleanUtils.and` as per described in the method's javadoc, 
> ambiguous method call error is thrown. I'm using version 3.4 with Java 8.
> Here's a StackOverflow question related to this issue. 
> [https://stackoverflow.com/q/49252638/1433665]



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


[jira] [Commented] (LANG-1386) Ambiguous method call error when using BooleanUtils.and

2018-03-14 Thread Sebb (JIRA)

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

Sebb commented on LANG-1386:


The StackOverflow question has an answer that explains it all in great detail.
It also explains how to avoid the warning by using a suitably typed array.

AFAICT the only way that Commons Lang could avoid this problem is to remove and 
replace one or both of the methods.
This will break compatibility.

Given that there is an easy work-round, I don't think that is warranted.

It might be worth adding some Javadoc to show how avoid the warning.

> Ambiguous method call error when using BooleanUtils.and
> ---
>
> Key: LANG-1386
> URL: https://issues.apache.org/jira/browse/LANG-1386
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.4
>Reporter: Kapil Koju
>Priority: Minor
> Attachments: BooleanUtils.and javadoc.png, Wrapper Boolean and.png, 
> literal boolean and.png, possible use case.png
>
>
> When using `BooleanUtils.and` as per described in the method's javadoc, 
> ambiguous method call error is thrown. I'm using version 3.4 with Java 8.
> Here's a StackOverflow question related to this issue. 
> [https://stackoverflow.com/q/49252638/1433665]



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


[jira] [Commented] (LANG-1386) Ambiguous method call error when using BooleanUtils.and

2018-03-13 Thread Kapil Koju (JIRA)

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

Kapil Koju commented on LANG-1386:
--

[~garydgregory] I am using version 3.4 with Java 8. Updated the ticket.

 

Thank you,

> Ambiguous method call error when using BooleanUtils.and
> ---
>
> Key: LANG-1386
> URL: https://issues.apache.org/jira/browse/LANG-1386
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.4
>Reporter: Kapil Koju
>Priority: Critical
> Attachments: BooleanUtils.and javadoc.png, Wrapper Boolean and.png, 
> literal boolean and.png, possible use case.png
>
>
> When using `BooleanUtils.and` as per described in the method's javadoc, 
> ambiguous method call error is thrown. I'm using version 3.4 with Java 8.
> Here's a StackOverflow question related to this issue. 
> [https://stackoverflow.com/q/49252638/1433665]



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


[jira] [Commented] (LANG-1386) Ambiguous method call error when using BooleanUtils.and

2018-03-13 Thread Gary Gregory (JIRA)

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

Gary Gregory commented on LANG-1386:


Please specify which version of Commons Lang you are using.

> Ambiguous method call error when using BooleanUtils.and
> ---
>
> Key: LANG-1386
> URL: https://issues.apache.org/jira/browse/LANG-1386
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Reporter: Kapil Koju
>Priority: Critical
> Attachments: BooleanUtils.and javadoc.png, Wrapper Boolean and.png, 
> literal boolean and.png, possible use case.png
>
>
> When using `BooleanUtils.and` as per described in the method's javadoc, 
> ambiguous method call error is thrown.
> Here's a StackOverflow question related to this issue. 
> [https://stackoverflow.com/q/49252638/1433665]



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