Re: static final classes?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Oct 21 2008 - 12:20:15 EDT

  • Next message: Michael Gentry: "Re: static final classes?"

    On Oct 21, 2008, at 11:31 AM, mgentr..pache.org wrote:

    > - public List get(QueryMetadata metadata) {
    > + public List<?> get(QueryMetadata metadata) {
    > String key = metadata.getCacheKey();
    > if (key == null) {
    > return null;

    Michael,

    you may check this discussion on why returning List<?> from a method
    is a bad idea:

    http://markmail.org/message/ts4zjelowa55nfgg
    http://markmail.org/message/cp63by2swbdnfp7v

    I suggest..uppressWarnings("unchecked") instead.

    Thanks,
    Andrus

    On Oct 21, 2008, at 11:12 AM, Michael Gentry wrote:

    > I was doing a little cleanup under org.apache.cayenne.cache and
    > FindBugs was issuing warnings about the final inner classes at the
    > bottom of MapQueryCache.java (CacheEntry) and OSQueryCache.java
    > (OSCacheAdministrator). Should these be declared as "final static
    > class" instead of "final class"?
    >
    > Thanks!
    >



    This archive was generated by hypermail 2.0.0 : Tue Oct 21 2008 - 12:21:01 EDT