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

ConstructorOnlyInitializesOrCallOtherConstructors rule should ignore lambdas #887

Closed
krzyk opened this issue Apr 29, 2018 · 24 comments
Closed

Comments

@krzyk
Copy link
Collaborator

krzyk commented Apr 29, 2018

ConstructorOnlyInitializesOrCallOtherConstructors and OnlyOneConstructorShouldDoInitialization rule fail for:

     public HtWire(final URI uri) {
         this(uri, Socket::new);
     }
 
     public HtWire(final String addr) {
         // @checkstyle MagicNumber (1 line)
         this(addr, new Constant<>(80), Socket::new);
     }
 
     public HtWire(final String addr, final int tcp) {
         this(addr, new Constant<>(tcp), Socket::new);
     }
 
     HtWire(final URI uri, final BiFunc<String, Integer, Socket> spplier) {
         this(
             uri.getHost(),
             () -> {
                 final int prt;
                 if (uri.getPort() == -1) {
                     prt = uri.toURL().getDefaultPort();
                 } else {
                     prt = uri.getPort();
                 }
                 return prt;
             },
             spplier
         );
}

When I remove the code in lambda, or replace it with a simpler one:

    HtWire(final URI uri, final BiFunc<String, Integer, Socket> spplier) {
        this(
            uri.getHost(),
            new Ternary<>(
                () -> uri.getPort() == -1,
                () -> uri.toURL().getDefaultPort(),
                uri::getPort
            ),
            spplier
        );
}

It doesn't fail.

It should ignore any code inside lambdas.

@krzyk
Copy link
Collaborator Author

krzyk commented Apr 29, 2018

@0crat in

@0crat 0crat added the scope label Apr 29, 2018
@0crat
Copy link
Collaborator

0crat commented Apr 29, 2018

@0crat in (here)

@krzyk Job #887 is now in scope, role is DEV

@0crat
Copy link
Collaborator

0crat commented Apr 29, 2018

Bug was reported, see §29: +15 point(s) just awarded to @krzyk/z

@0crat
Copy link
Collaborator

0crat commented Apr 29, 2018

@krzyk/z everybody who has role DEV are banned at this job; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat
Copy link
Collaborator

0crat commented May 4, 2018

@krzyk/z everybody who has role DEV are banned at this job; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat
Copy link
Collaborator

0crat commented May 10, 2018

@krzyk/z everybody who has role DEV are banned at this job; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat
Copy link
Collaborator

0crat commented May 15, 2018

@krzyk/z everybody who has role DEV are banned at #887; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat
Copy link
Collaborator

0crat commented May 20, 2018

@krzyk/z everybody who has role DEV are banned at #887; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat
Copy link
Collaborator

0crat commented May 25, 2018

@krzyk/z everybody who has role DEV is banned at #887; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat
Copy link
Collaborator

0crat commented May 30, 2018

@krzyk/z everybody who has role DEV is banned at #887; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat
Copy link
Collaborator

0crat commented Jun 4, 2018

@krzyk/z everybody who has role DEV is banned at #887; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat
Copy link
Collaborator

0crat commented Jun 9, 2018

@krzyk/z everybody who has role DEV is banned at #887; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@paulodamaso
Copy link
Contributor

@0crat wait for #983 review

@0crat
Copy link
Collaborator

0crat commented Jan 17, 2019

@0crat wait for #983 review (here)

@paulodamaso The impediment for #887 was registered successfully by @paulodamaso/z

@paulodamaso
Copy link
Contributor

@krzyk Merged, please close.

@krzyk
Copy link
Collaborator Author

krzyk commented Jan 24, 2019

@paulodamaso thanks

@krzyk krzyk closed this as completed Jan 24, 2019
@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

@ypshenychka/z please review this job completed by @paulodamaso/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat 0crat removed the scope label Jan 24, 2019
@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

The job #887 is now out of scope

@ypshenychka
Copy link

@0crat quailty good

@ypshenychka
Copy link

@0crat quality good

@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

@0crat quailty good (here)

@ypshenychka Can't understand "quailty", try one of these:

  • assign Assign a performer to this issue
  • boost Set a boost for the job
  • continue Remove a job's impediment
  • hello Just say hello
  • in Register this issue in scope (WBS)
  • out Close the order and remove this job from scope
  • pay Pay a user some extra cash
  • quality Review a task
  • resign Resign from this issue
  • status Check the status of the job
  • version Print current version of the bot
  • wait Register an impediment for a job

@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

@0crat quality good (here)

@ypshenychka The project doesn't have enough funds, can't make a payment

@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

Order was finished, quality is "good": +35 point(s) just awarded to @paulodamaso/z

@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

Quality review completed: +8 point(s) just awarded to @ypshenychka/z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants