logo       

[ checkstyle-Bugs-1781557 ] false RedundantImport for java.lang.*: msg#00259

Subject: [ checkstyle-Bugs-1781557 ] false RedundantImport for java.lang.*
Bugs item #1781557, was opened at 2007-08-24 15:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=1781557&group_id=29721

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jim Newsham (jimnewsham)
Assigned to: Nobody/Anonymous (nobody)
Summary: false RedundantImport for java.lang.*

Initial Comment:
An import of a class which belongs to the java.lang package is not redundant if 
there exists a class with the same name, in the same package as the importing 
class.  For example:


------------------------

package com.mine;

public class Math {
  // ...
}

------------------------

package com.mine;

import java.lang.Math;

public class A {
  // ...
}

------------------------

In the above case, class A needs to use class java.lang.Math, and uses an 
import.  Checkstyle reports a redundant import of java.lang.Math, but the 
import is required because otherwise the Math class in the same package is 
visible instead.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=1781557&group_id=29721

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/


<Prev in Thread] Current Thread [Next in Thread>