Any reason to clean up unused imports in Java, other than reducing clutter?

后端 未结 11 1357
生来不讨喜
生来不讨喜 2020-11-28 06:34

Is there any good reason to avoid unused import statements in Java? As I understand it, they are there for the compiler, so lots of unused imports won\'t have any impacts o

11条回答
  •  心在旅途
    2020-11-28 07:21

    For me, one unused class import in a controller class created a compilation problem in Jenkins build after i deleted the imported class during code cleanup and committed the deletion in git without testing a build in local.

提交回复
热议问题