I use the static import for a long time in my unit test. Static import from org.junit.Assert
and org.mockito.Mockito
. By doing this the syntax is more concise and my test is more readable.
There isn't any performance issue. This is just a syntactic sugar:
syntax within a programming language that is designed to make things easier to read or to express. (wikipedia)
You could have problem if you are importing two methods or constants with the same name.
Well in this case you will have to disambiguate.
But it is the same problem if you are using two different classes having the same name (You will have to use a qualified name).
import java.awt.List
...
java.util.List dataList = new ArrayList();
List viewList = new List();