-
Notifications
You must be signed in to change notification settings - Fork 156
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
Replace Guava with Cactoos #1222
Conversation
+ fix regressions introduced with newer cactoos version
@yegor256 please, pay attention to this pull request |
Job |
@@ -502,6 +507,14 @@ | |||
</execution> | |||
</executions> | |||
</plugin> | |||
<plugin> |
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.
@yegor256 FYI, had to add this since Cactoos uses lambda expressions.
indexes.toArray(new Integer[indexes.size()]) | ||
).intValue(); | ||
// @checkstyle IllegalCatchCheck (1 line) | ||
} catch (final Throwable ex) { |
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.
@filfreire use UncheckedScalar
instead
new MapEntry<String, String>("since", format.format(prev)), | ||
new MapEntry<String, String>("until", format.format(current)) | ||
); | ||
final List<RepoCommit.Smart> commits = new ListOf<>( |
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.
@filfreire better use SolidList
instead
.put("until", format.format(current)) | ||
.build(); | ||
final List<RepoCommit.Smart> commits = Lists.newArrayList( | ||
final Map<String, String> params = new MapOf<String, String>( |
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.
@filfreire better use SolidMap
instead
return input.toLowerCase(Locale.ENGLISH); | ||
} | ||
} | ||
final List<String> logins = new ListOf<>( |
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.
@filfreire use SolidList
instead
new ImmutableMap.Builder<String, String>() | ||
.put("head_branch", "master") | ||
.put( | ||
new MapOf<String, String>( |
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.
@filfreire you need SolidMap
@@ -64,8 +64,9 @@ public QnGithubIssue(final Question question) { | |||
public Req understand(final Comment.Smart comment, final URI home) | |||
throws IOException { | |||
Req req = this.origin.understand(comment, home); | |||
if (!Iterables.isEmpty(req.dirs())) { | |||
final Directives dirs = new Directives().append(req.dirs()); | |||
final ListOf<Directive> reqDirs = new ListOf<>(req.dirs()); |
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.
@filfreire SolidList
here
.put("fork_branch", head.ref()) | ||
.put("head_branch", base.ref()) | ||
.put( | ||
new MapOf<String, String>( |
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.
@filfreire use SolidMap
@@ -83,7 +87,8 @@ public Req understand(final Comment.Smart comment, final URI home) | |||
throws IOException { | |||
final Map<String, String> map = QnParametrized.params(comment); | |||
Req req = this.origin.understand(comment, home); | |||
if (!Iterables.isEmpty(req.dirs())) { | |||
final List<Directive> directives = new ListOf<>(req.dirs()); |
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.
@filfreire SolidList
here
new ImmutableMap.Builder<String, String>() | ||
.put("head_branch", "master") | ||
.put( | ||
new MapOf<String, String>( |
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.
@filfreire SolidMap
is always better
final List<Talk> siblings = Lists.newArrayList( | ||
Iterables.limit( | ||
this.talks.siblings(repo, since), Tv.TWENTY | ||
final ListOf<Talk> siblings = new ListOf<>( |
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.
@filfreire SolidList
here
@@ -68,15 +68,15 @@ | |||
|
|||
@Override | |||
public Response act(final Request req) { | |||
final Iterable<Tick> ticks = this.pulse.ticks(); | |||
final ListOf<Tick> ticks = new ListOf<>(this.pulse.ticks()); |
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.
@filfreire SolidList
here
@filfreire looks cool, but there are some comments above. Pay attention, |
* Replaced MapOf with SolidMap * Replaced ListOf with SolidList * Other minor improvements
@yegor256 I submitted commits following-up your CR. Please review again. Thanks 👍 Btw only missing removals of guava are the ones described in |
@rultor merge |
@filfreire @yegor256 Oops, I failed. You can see the full log here (spent 9min)
|
@yegor256 I believe the error we got with the failed build is related with https://stackoverflow.com/questions/28291691/fatal-error-compiling-invalid-target-release-1-8-help-1 Do you know how we can fix this ? Should we set the |
@yegor256 there's at least two places I see we can make this replacement: https://github.com/yegor256/rultor/blob/c3f59d00d3d430d1feea1008508598bddbca8ea4/appveyor.yml |
@filfreire let's make a separate ticket and I will upgrade Travis and Rultor to Java 8 |
@rultor merge |
@rultor merge |
@filfreire @yegor256 Oops, I failed. You can see the full log here (spent 2min)
|
@yegor256 I've merged |
@rultor merge |
@filfreire @yegor256 Oops, I failed. You can see the full log here (spent 2min)
|
+ fix regressions introduced with newer cactoos version
* Replaced MapOf with SolidMap * Replaced ListOf with SolidList * Other minor improvements
@yegor256 let's try to merge 1 more time. This time I reproduced the steps rultor is trying to do and solved the rebasing issues. Also re-run maven qulice build locally. |
@rultor merge |
@filfreire @yegor256 Oops, I failed. You can see the full log here (spent 2min)
|
@filfreire closed (you can close your PRs too) |
The job #1222 is now out of scope |
@yegor256 kindly CR
This PR is for issue #1199
@yegor256 some notes:
Dependency is not completely removed, still pending are the includes (about 4) mentioned on these issues in Cactoos: