Skip to content

cleanup-jooby-rxjava#1171

Merged
jknack merged 1 commit into
jooby-project:masterfrom
feffi:cleanup-jooby-rxjava
Jun 25, 2018
Merged

cleanup-jooby-rxjava#1171
jknack merged 1 commit into
jooby-project:masterfrom
feffi:cleanup-jooby-rxjava

Conversation

@feffi

@feffi feffi commented Jun 25, 2018

Copy link
Copy Markdown
Contributor

fixed minor code issues

(cherry picked from commit aac2fdf)
public void onCompleted() {
if (done.compareAndSet(false, true)) {
deferred.resolve((Object) null);
deferred.resolve(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.

Are you sure about this? Feel we need the cast to Object

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi, as the function "resolve" in Deferred is specified with "Object", it's the least significant variant anyway. "null" will be resolved to "Object". As long as there are no other overrides, this cast can be removed.

resolve(final Object value)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BTW, does PowerMock have a problem with proxying URL Objects? All builds fail with a strange NotFoundException in AssetForwardTest...

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.

You're right about resolve(Object), please ignore my comment.

Are you on linux? I did see that error in Travis, still can't reproduce/fix it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no problem :-) Happy to help!

Nope, I'm on macOS (so kinda posix yeah). I found this regarding the error:

https://stackoverflow.com/questions/12190377/getting-javassist-notfoundexception-with-powermock-and-powerrule-in-junit-with-m

maybe we just need to switch to the agent version? I'm not that deep into your testing (yet), but maybe this helps?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

btw: locally I can't reproduce this error neither. All tests (maven/console and IntelliJ) are fine.

@jknack jknack added this to the 1.4.2 milestone Jun 25, 2018
@jknack jknack merged commit 3b552da into jooby-project:master Jun 25, 2018
@feffi feffi deleted the cleanup-jooby-rxjava branch June 26, 2018 19:35
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.

2 participants