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

Try map failure #1924

Merged
merged 1 commit into from
Mar 25, 2017
Merged

Try map failure #1924

merged 1 commit into from
Mar 25, 2017

Conversation

danieldietrich
Copy link
Contributor

@danieldietrich danieldietrich commented Mar 23, 2017

A follow-up of #1923

@codecov-io
Copy link

codecov-io commented Mar 23, 2017

Codecov Report

Merging #1924 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1924      +/-   ##
============================================
+ Coverage     98.03%   98.03%   +<.01%     
- Complexity     5079     5082       +3     
============================================
  Files            89       89              
  Lines         11549    11553       +4     
  Branches       1521     1522       +1     
============================================
+ Hits          11322    11326       +4     
  Misses          109      109              
  Partials        118      118
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/javaslang/collection/Traversable.java 96.8% <ø> (ø) 112 <0> (ø) ⬇️
javaslang/src/main/java/javaslang/control/Try.java 95.01% <100%> (+0.06%) 89 <3> (+3) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 755355d...8bc2f46. Read the comment docs.

}
}

private static <T> Resource<T> resource(T value) {
Copy link
Contributor

@l0rinc l0rinc Mar 24, 2017

Choose a reason for hiding this comment

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

It's just my preference: please consider renaming to Closeable or TestAutoCloseable or DummyCloseable etc and provide a static of factory, as done in other places.

@@ -457,8 +457,8 @@ default T single() {
* Matches each element with a unique key that you extract from it.
* If the same key is present twice, the function will return {@code None}.
*
* @param classifier A function which extracts a key from elements
* @param <K> key class type
* @param getKey A function which extracts a key from elements
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@danieldietrich
Copy link
Contributor Author

danieldietrich commented Mar 25, 2017

Note: Calls to mapFailure will be unchecked in 2.1.0 because

  • Try in an interface
  • => we can't make Try.mapFailure() final
  • => we can't mark Try.mapFailure() as @SafeVarargs

Solution: make Try an abstract class (see #1825)

@danieldietrich danieldietrich merged commit 237a3db into vavr-io:master Mar 25, 2017
@danieldietrich danieldietrich deleted the try-map-failure branch March 25, 2017 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants