[ checkstyle-Feature Requests-3103873 ] New check: Private inner types in public methods signature

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ checkstyle-Feature Requests-3103873 ] New check: Private inner types in public methods signature

SourceForge.net
Feature Requests item #3103873, was opened at 2010-11-05 14:55
Message generated for change (Comment added) made by romanivanov
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397081&aid=3103873&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
Priority: 5
Private: No
Submitted By: Roman Ivanov (romanivanov)
Assigned to: Nobody/Anonymous (nobody)
Summary: New check: Private inner types in public methods signature

Initial Comment:
New Check: PrivateInnerTypeInPublicMethods

Description: Inner class became as private, after refactoring. But there were methods that returned this class as result or receive this class as input - no warning for such methods, and they are present in code, but they are dead.

Example:
public class Example {
        public void getWarning1(C1 c) {
                // no code
        }

        public C1 getUsefulReturn() {
                return new C1();
        }

        private class C1 {

        }
}

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

>Comment By: Roman Ivanov (romanivanov)
Date: 2012-07-05 02:12

Message:
We need to do it only for Private classes that are not extends or
implements everything.

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

Comment By: Roman Ivanov (romanivanov)
Date: 2010-11-05 14:58

Message:
Please detect this for inner private: Classes, Interfaces, Enums

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

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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Checkstyle-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-devel