[ 
https://issues.apache.org/jira/browse/LANG-1674?focusedWorklogId=666042&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-666042
 ]

ASF GitHub Bot logged work on LANG-1674:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Oct/21 14:30
            Start Date: 17/Oct/21 14:30
    Worklog Time Spent: 10m 
      Work Description: garydgregory edited a comment on pull request #810:
URL: https://github.com/apache/commons-lang/pull/810#issuecomment-945125094


   Hi @singhbaljit 
   Thank you for the PR but it breaks the build. Please run `mvn` from the 
command line -- this runs the default Maven goal -- before submitting a PR to 
discover any such issues.
   
   I brought in the `Range` generic changes, fixed the build issue, along with 
adding an expanded unit test based on your PR to cover all the factory methods. 
   
   May you please see git master and verify your use case? You can close this 
PR if all is well.
   
   TY!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 666042)
    Time Spent: 1h 50m  (was: 1h 40m)

> Range construction with abstract/derived classes
> ------------------------------------------------
>
>                 Key: LANG-1674
>                 URL: https://issues.apache.org/jira/browse/LANG-1674
>             Project: Commons Lang
>          Issue Type: Improvement
>            Reporter: Baljit Singh
>            Priority: Minor
>             Fix For: 3.13.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> The constructors for {{org.apache.commons.lang3.Range}} don't play nicely 
> with abstract/derived classes. Example:
> {quote}
> abstract class AbstractComparable implements Comparable<AbstractComparable> { 
>   @Override public int compareTo(AbstractComparable o) {}
> }
> class DerivedA extends AbstractComparable {}
> class DerivedB extends AbstractComparable {}
> // compiles, and reasonable since AbstractComparable is the common parent
>  static final Range<AbstractComparable> RANGE_MIXED = Range.between(new 
> DerivedA(), new DerivedB());
> // compiles, but unreasonable to force usage of parent class
>  static final Range<AbstractComparable> RANGE_SAME_CLASS = Range.between(new 
> DerivedA(), new DerivedA());
> // compiler error
>  static final Range<DerivedA> RANGE_A = Range.between(new DerivedA(), new 
> DerivedA());
> // compiler error
> static final Range<DerivedB> RANGE_B = Range.is(new DerivedB());
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to