Skip to content

Issue158#161

Open
StarBax89 wants to merge 2 commits intohamcrest:masterfrom
StarBax89:Issue158
Open

Issue158#161
StarBax89 wants to merge 2 commits intohamcrest:masterfrom
StarBax89:Issue158

Conversation

@StarBax89
Copy link
Copy Markdown

Fixing
#158
with Math.abs


public BigDecimalCloseTo(BigDecimal value, BigDecimal error) {
this.delta = error;
this.delta = error.abs();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is error null checked 1st, or should it be null checked?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@nhojpatrick jap, checking this for null would be better.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@StarBax89 this file now lives at ./hamcrest/src/main/java/org/hamcrest/number/BigDecimalCloseTo.java

if you rebase from the latest master, it should resolve the conflicts and I can merge in, e.g. git fetch origin && git rebase origin/master

@nhojpatrick
Copy link
Copy Markdown
Member

@StarBax89 happy to look at getting merged as hamcrest-core and hamcrest-library has been merged into hamcrest so can't currently merge in anyway.


public BigDecimalCloseTo(BigDecimal value, BigDecimal error) {
this.delta = error;
this.delta = error.abs();
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@nhojpatrick jap, checking this for null would be better.


public IsCloseTo(double value, double error) {
this.delta = error;
this.delta = Math.abs(error);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@nhojpatrick this should also be checked for null.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@StarBax89 this file now lives at ./hamcrest/src/main/java/org/hamcrest/number/IsCloseTo.java

if you rebase from the latest master, it should resolve the conflicts and I can merge in, e.g. git fetch origin && git rebase origin/master

@@ -6,9 +6,10 @@
import static org.hamcrest.number.IsCloseTo.closeTo;

public class IsCloseToTest extends AbstractMatcherTest {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@StarBax89 this file now lives at ./hamcrest/src/test/java/org/hamcrest/number/IsCloseToTest.java

if you rebase from the latest master, it should resolve the conflicts and I can merge in, e.g. git fetch origin && git rebase origin/master

@nhojpatrick
Copy link
Copy Markdown
Member

Going to try and kick start hamcrest, so if you want to get it merged, please rebase from the branch v2.3-candidates.
Still trying to understand how has permissions to perform a release.

@nhojpatrick nhojpatrick force-pushed the master branch 2 times, most recently from 9bc653b to e9f7fc8 Compare February 13, 2022 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: Awaiting response

Development

Successfully merging this pull request may close these issues.

2 participants