You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by Lamber-Ken <la...@apache.org> on 2020/05/21 10:34:48 UTC
[DISCUSS] Improve code quality
Dear community,
I noticed that there is a lot of work to improve code quality.
e.g
1. Not enough arguments.
LOG.warn("Exception when reading header of {} : {}", lf, buf);
2. Optional.
java.util.Optional and com.google.common.base.Optional can be merged.
3. @Slf4j
@Slf4j / LoggerFactory.getLogger(xxx.class);
..
We can use some tools to check them, then fix them manually or automatically, any thoughts?
Thanks,
Lamber-Ken
Re: [DISCUSS] Improve code quality
Posted by Matteo Minardi - Diennea <mi...@hotmail.it>.
Good idea @Lamber-Ken,
I created a PR that merge java.util.Optional and com.google.common.base.Optional
https://github.com/apache/bookkeeper/pull/2346/commits
Matteo.
Il giorno 21/05/20, 12:34 "Lamber-Ken" <la...@apache.org> ha scritto:
Dear community,
I noticed that there is a lot of work to improve code quality.
e.g
1. Not enough arguments.
LOG.warn("Exception when reading header of {} : {}", lf, buf);
2. Optional.
java.util.Optional and com.google.common.base.Optional can be merged.
3. @Slf4j
@Slf4j / LoggerFactory.getLogger(xxx.class);
..
We can use some tools to check them, then fix them manually or automatically, any thoughts?
Thanks,
Lamber-Ken
Re: [DISCUSS] Improve code quality
Posted by Lamber-Ken <la...@apache.org>.
> It is better to split the work in several patches, this way we can make review simpler
Sure, will do.
Best,
Lamber-Ken
On 2020/05/21 10:37:38, Enrico Olivelli <eo...@gmail.com> wrote:
> Il Gio 21 Mag 2020, 12:34 Lamber-Ken <la...@apache.org> ha scritto:
>
> > Dear community,
> >
> > I noticed that there is a lot of work to improve code quality.
> >
>
> It would be very welcome!
> Thanks
>
>
>
> > e.g
> > 1. Not enough arguments.
> > LOG.warn("Exception when reading header of {} : {}", lf, buf);
> > 2. Optional.
> > java.util.Optional and com.google.common.base.Optional can be merged.
> >
>
> +1 for java util.
>
> 3. @Slf4j
> > @Slf4j / LoggerFactory.getLogger(xxx.class);
> > ..
> >
> > We can use some tools to check them, then fix them manually or
> > automatically, any thoughts?
> >
>
> It is better to split the work in several patches.
> This way we can make review simpler
>
>
> Enrico
>
>
>
> >
> > Thanks,
> > Lamber-Ken
> >
>
Re: [DISCUSS] Improve code quality
Posted by Enrico Olivelli <eo...@gmail.com>.
Il Gio 21 Mag 2020, 12:34 Lamber-Ken <la...@apache.org> ha scritto:
> Dear community,
>
> I noticed that there is a lot of work to improve code quality.
>
It would be very welcome!
Thanks
> e.g
> 1. Not enough arguments.
> LOG.warn("Exception when reading header of {} : {}", lf, buf);
> 2. Optional.
> java.util.Optional and com.google.common.base.Optional can be merged.
>
+1 for java util.
3. @Slf4j
> @Slf4j / LoggerFactory.getLogger(xxx.class);
> ..
>
> We can use some tools to check them, then fix them manually or
> automatically, any thoughts?
>
It is better to split the work in several patches.
This way we can make review simpler
Enrico
>
> Thanks,
> Lamber-Ken
>