You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Claude Warren <cl...@xenei.com> on 2021/02/17 17:37:59 UTC
use of * in import
I noticed that the changes to querybuilder converted a bunch of java.util.x
import to java.util.*
I have always heard that the asterisk should not be used in the import
statement as it can cause conflicts that are very hard to debug when new
versions of the specific library are updated and conflicting classes added.
Is there a reason to use the '*' import?
Claude
--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren
Re: use of * in import
Posted by Andy Seaborne <an...@apache.org>.
https://github.com/apache/jena/blob/main/CONTRIBUTING.md#code
What I personally find are the important points are a few basics because
it is a diverse, large codebase, not things that might (but don't) arise,
1/ Zero warnings in Eclipse - fix or suppress, otherwise you can't see
when new warnings arise.
Some warnings matter really do matter, like name shadowing (static
members has been an issue in the past).
Together with (2) this addresses import*. Ambiguous imports is at least
a warning.
2/ No unused imports. The IDE will fix.
3/ No omitted @Override. The IDE will fix.
4/ Deal with deprecations early - fix if it is a within-Jena change,
assess and change or actively suppress (least scope) if external.
5/ Spaces, not tabs. Review of GH means this is no longer a preference
matter, it affects display for review.
Andy
On 17/02/2021 22:59, Claude Warren wrote:
> Actually, I was asking if we has a standard or recommendation one way or
> the other. I'll take a look again tomorrow, I didn't have much time to
> review. If you need to proceed without my approval, feel free.
>
> Claude
>
> On Wed, Feb 17, 2021 at 10:52 PM Andy Seaborne <an...@apache.org> wrote:
>
>>
>>
>> On 17/02/2021 17:37, Claude Warren wrote:
>>> I noticed that the changes to querybuilder converted a bunch of
>> java.util.x
>>> import to java.util.*
>>
>> This is what PR review is for. It does help to be in-context.
>>
>> I have updated the PR - can you approve it now please?
>>
>> I was in the code because I had to make lot of changes to redo the
>> direct calls to Binding implementation classes.
>>
>> Andy
>>
>>> I have always heard that the asterisk should not be used in the import
>>> statement as it can cause conflicts that are very hard to debug when new
>>> versions of the specific library are updated and conflicting classes
>> added.
>>>
>>> Is there a reason to use the '*' import?
>>>
>>> Claude
>>>
>>
>
>
Re: use of * in import
Posted by Claude Warren <cl...@xenei.com>.
Actually, I was asking if we has a standard or recommendation one way or
the other. I'll take a look again tomorrow, I didn't have much time to
review. If you need to proceed without my approval, feel free.
Claude
On Wed, Feb 17, 2021 at 10:52 PM Andy Seaborne <an...@apache.org> wrote:
>
>
> On 17/02/2021 17:37, Claude Warren wrote:
> > I noticed that the changes to querybuilder converted a bunch of
> java.util.x
> > import to java.util.*
>
> This is what PR review is for. It does help to be in-context.
>
> I have updated the PR - can you approve it now please?
>
> I was in the code because I had to make lot of changes to redo the
> direct calls to Binding implementation classes.
>
> Andy
>
> > I have always heard that the asterisk should not be used in the import
> > statement as it can cause conflicts that are very hard to debug when new
> > versions of the specific library are updated and conflicting classes
> added.
> >
> > Is there a reason to use the '*' import?
> >
> > Claude
> >
>
--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren
Re: use of * in import
Posted by Andy Seaborne <an...@apache.org>.
On 17/02/2021 17:37, Claude Warren wrote:
> I noticed that the changes to querybuilder converted a bunch of java.util.x
> import to java.util.*
This is what PR review is for. It does help to be in-context.
I have updated the PR - can you approve it now please?
I was in the code because I had to make lot of changes to redo the
direct calls to Binding implementation classes.
Andy
> I have always heard that the asterisk should not be used in the import
> statement as it can cause conflicts that are very hard to debug when new
> versions of the specific library are updated and conflicting classes added.
>
> Is there a reason to use the '*' import?
>
> Claude
>