Skip to content

LANG-1603: Deprecate Fraction class#935

Closed
rednikeeg wants to merge 3 commits intoapache:masterfrom
rednikeeg:LANG-1603
Closed

LANG-1603: Deprecate Fraction class#935
rednikeeg wants to merge 3 commits intoapache:masterfrom
rednikeeg:LANG-1603

Conversation

@rednikeeg
Copy link
Contributor

@codecov-commenter
Copy link

Codecov Report

Merging #935 (bdc72af) into master (ceb7fbb) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #935      +/-   ##
============================================
- Coverage     92.01%   92.00%   -0.02%     
+ Complexity     7436     7434       -2     
============================================
  Files           189      189              
  Lines         15751    15751              
  Branches       2961     2961              
============================================
- Hits          14494    14491       -3     
- Misses          672      673       +1     
- Partials        585      587       +2     
Impacted Files Coverage Δ
...n/java/org/apache/commons/lang3/math/Fraction.java 93.70% <ø> (ø)
...apache/commons/lang3/reflect/ConstructorUtils.java 84.00% <0.00%> (-2.00%) ⬇️
...va/org/apache/commons/lang3/CharSequenceUtils.java 87.09% <0.00%> (-1.62%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rednikeeg rednikeeg requested a review from garydgregory August 22, 2022 19:11
@garydgregory
Copy link
Member

The discussion in https://issues.apache.org/jira/browse/LANG-1603 does not make it clear (to me) if the proposed replacement is convenient enough.

* based and thus suffers from various overflow issues. For a BigInteger based
* equivalent, please see the Commons Math BigFraction class. </p>
*
* @deprecated for <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/fraction/Fraction.html">Fraction</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't just deprecate the class without documenting how to port your current code to the other API IMO. For example, what do you do with Fraction#invert()? Each method must be documented, otherwise, it's a disservice, and everyone using the class is left having to do their own investigation and mapping.

@rednikeeg rednikeeg closed this Apr 27, 2023
@rednikeeg rednikeeg deleted the LANG-1603 branch April 27, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants