google / mug

A small Java 8 library (string manipulation, stream utils)
Apache License 2.0
367 stars 65 forks source link

Fix Type Mismatch Error in Maybe Class #37

Closed porfanid closed 1 year ago

porfanid commented 1 year ago

This pull request addresses issue #36, which was reported as a type mismatch error in the Maybe.java class of the com.google.mu.util package. The issue resulted in red lines appearing in the IntelliJ IDEA editor and potentially caused runtime errors due to incorrect type annotations and declarations in certain methods.

Changes Made:

Corrected the type annotations and declarations in the following methods:
    public final <X extends Throwable> Stream<T> catching(
    public static <T, E extends Throwable> Stream<Maybe<T, E>> maybeStream(

Expected Behavior:

With these corrections, the type mismatch error has been resolved, and the code in the Maybe.java class now conforms to expected type definitions. This change enhances code readability and eliminates the possibility of runtime errors.

Related Issue:

Fixes #36: Type Mismatch Error in Maybe.java Class

Additional Notes:

Please review the changes and merge this pull request to maintain the code quality and reliability of the Maybe.java class. If you have any further feedback or questions, please feel free to discuss them in the comments.