FAQ
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!

Search Discussions

  • Andrus Adamchik at Oct 21, 2008 at 3:20 pm
    Doesn't matter to me either way.
    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!
  • Andrus Adamchik at Oct 21, 2008 at 4:21 pm

    On Oct 21, 2008, at 11:31 AM, mgentry@apache.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 @SuppressWarnings("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!
  • Michael Gentry at Oct 21, 2008 at 5:09 pm
    I'm OK with that, too. I'll make the updates soonish.

    Thanks!


    On Tue, Oct 21, 2008 at 12:20 PM, Andrus Adamchik
    wrote:
    On Oct 21, 2008, at 11:31 AM, mgentry@apache.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 @SuppressWarnings("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!

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedOct 21, '08 at 3:12p
activeOct 21, '08 at 5:09p
posts4
users2
websitecayenne.apache.org

2 users in discussion

Andrus Adamchik: 2 posts Michael Gentry: 2 posts

People

Translate

site design / logo © 2022 Grokbase