We're updating the issue view to help you get more done. 

Remove unnecessary interfaces in implementation packages

Description

Interfaces must only be defined in implementation packages if:

  • there are multiple implementations (to define a common contract)

  • or they make testing (mocking) much easier

  • or they are defined in an other package than one of the implementations (to break dependency cycles).

Interfaces that do not fit in one of the above categories should be removed. Some examples come to mind:

  • org.hibernate.search.backend.lucene.search.query.impl.LuceneSearchResultExtractor (on contrary to its Elasticsearch counterpart, it's defined in the same package as its implementation)

  • org.hibernate.search.backend.elasticsearch.types.converter.impl.ElasticsearchFieldConverter

  • ...

Maybe let's add a JQAssistant rule to detect that, too?

Environment

None

Status

Assignee

Unassigned

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Priority

Trivial