-
Notifications
You must be signed in to change notification settings - Fork 191
Fix unchecked call warnings in SourceTest.java (#2625) #2632
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
base: main
Are you sure you want to change the base?
Fix unchecked call warnings in SourceTest.java (#2625) #2632
Conversation
stream-tests/src/test/java/org/apache/pekko/stream/javadsl/SourceTest.java
Outdated
Show resolved
Hide resolved
stream-tests/src/test/java/org/apache/pekko/stream/javadsl/SourceTest.java
Outdated
Show resolved
Hide resolved
stream-tests/src/test/java/org/apache/pekko/stream/javadsl/SourceTest.java
Show resolved
Hide resolved
|
there are now no changes in the PR - everything including the code fixes have been removed |
|
Now all the unnecessary format changes are back. |
| import java.util.concurrent.*; | ||
| import java.util.concurrent.atomic.AtomicBoolean; | ||
| import java.util.concurrent.atomic.AtomicInteger; | ||
| import java.util.function.Function; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changes look good now but the import changes seem unnecessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pjfanning. I have removed the unnecessary java.util.function.Function import and updated the commit. The diff should be cleaner now.
0f771a1 to
9a556ad
Compare
| import java.util.stream.Collectors; | ||
| import java.util.stream.IntStream; | ||
| import java.util.stream.Stream; | ||
| import javax.xml.transform.Source; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong too
|
@AyushMhaisane Thanks, the original problem is a type inference problem, so the fix should add some type parameter to the |
9a556ad to
ec0630a
Compare
|
This doesn't compile and doesn't fix the compile warnings anyway. |
This PR fixes compiler warnings related to "unchecked call to expectNext(I)" in SourceTest.java.
The issue was caused by TestSink.create(system) returning a raw type when not explicitly typed. This change adds the necessary type witnesses (e.g., , ) to the TestSink.create calls to ensure type safety and eliminate the warnings.
Changes
Related Issue Fixes #2625
Verification
Checklist: