Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the only Spotbugs complaint in v2.5 core #41

Merged
merged 4 commits into from
Aug 28, 2018
Merged

Fixed the only Spotbugs complaint in v2.5 core #41

merged 4 commits into from
Aug 28, 2018

Conversation

sbondorf
Copy link
Collaborator

plus submodule updates along the way

sbondorf added 4 commits August 26, 2018 13:55
Was due to the previous lack of an infinite arrival curve construction.
The code used the delta_0 service curve and attempted call Curve's
generic equals.
@sbondorf sbondorf requested a review from matyesz August 26, 2018 21:01
@sbondorf
Copy link
Collaborator Author

You are correct, this should be possible and benefit a lot more code parts.

For illustration, the NumBackend is a good example. There, we provide Num create{Zero,PositiveInfinity,NegativeInfinity} as well as Num get{Zero,PositiveInfinity,NegativeInfinity}. Moreover, there we have the boolean is{Zero,PositiveInfinity,NegativeInfinity}.

The last alternative is probably the best option for this piece of code as well. However, getting this done properly involves tackling issue #7. I feel this is a bit too much effort to simply patch this bug.

Another aspect to favor this solution is the dependance of the curve on the current NumBackend. If we use a static constant, we need to make sure to not mix NumBackend of curves. This is prevented by newly creating a the curve in this location. This relates to the yet untackled issue #20.

@matyesz
Copy link
Collaborator

matyesz commented Aug 27, 2018

Sometimes nice solutions take time:). Anyway we can do the quick patch for v2.5 and collect tasks for next version for refactoring.

@matyesz
Copy link
Collaborator

matyesz commented Aug 28, 2018

Created task #42 to collect the refactoring tasks for v2.6. Also added the milestone to be able to separate tasks between versions.

@matyesz matyesz merged commit cb40ae5 into NetCal:v2.5 Aug 28, 2018
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.

2 participants