Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

In my java program, I have imported some java packages in one class. but in there 1 or 2 packages were crossed out.

Why that happened? How to solve this cross out to make uncrossed?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
646 views
Welcome To Ask or Share your Answers For Others

1 Answer

For the sake of completeness, there is a special case which looks like this in Eclipse:

Static deprecated import

In the case above there exist three is() methods, which all are statically imported. Hoovering the crossed out method name doesn't give any information, and there isn't a warning marker like there is for @Deprecated classes. In other words, it can be tricky to understand what it means.

In this case, one of the is() methods is @Deprecated, causing the behaviour.

This behaviour was discussed here, a question which was closed as a duplicate.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...