Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6099520049B for ; Mon, 14 Aug 2017 15:10:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5F17716390F; Mon, 14 Aug 2017 13:10:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A9329163842 for ; Mon, 14 Aug 2017 15:10:03 +0200 (CEST) Received: (qmail 1345 invoked by uid 500); 14 Aug 2017 13:10:02 -0000 Mailing-List: contact notifications-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list notifications@ofbiz.apache.org Received: (qmail 1336 invoked by uid 99); 14 Aug 2017 13:10:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Aug 2017 13:10:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0D16F180643 for ; Mon, 14 Aug 2017 13:10:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 6VLrn8X7lZ7M for ; Mon, 14 Aug 2017 13:10:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C34D95F27D for ; Mon, 14 Aug 2017 13:10:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 522C1E002B for ; Mon, 14 Aug 2017 13:10:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0A97A21408 for ; Mon, 14 Aug 2017 13:10:00 +0000 (UTC) Date: Mon, 14 Aug 2017 13:10:00 +0000 (UTC) From: "Dennis Balkir (JIRA)" To: notifications@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (OFBIZ-9575) [FB] Package org.apache.ofbiz.base.util.cache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 14 Aug 2017 13:10:04 -0000 Dennis Balkir created OFBIZ-9575: ------------------------------------ Summary: [FB] Package org.apache.ofbiz.base.util.cache Key: OFBIZ-9575 URL: https://issues.apache.org/jira/browse/OFBIZ-9575 Project: OFBiz Issue Type: Sub-task Components: base Affects Versions: Trunk Reporter: Dennis Balkir Priority: Minor - CacheSoftReference.java:29, SE_NO_SUITABLE_CONSTRUCTOR Se: org.apache.ofbiz.base.util.cache.CacheSoftReference is Serializable but its superclass doesn't define an accessible void constructor This class implements the Serializable interface and its superclass does not. When such an object is deserialized, the fields of the superclass need to be initialized by invoking the void constructor of the superclass. Since the superclass does not have one, serialization and deserialization will fail at runtime. - CacheSoftReference.java:45, FI_PUBLIC_SHOULD_BE_PROTECTED FI: org.apache.ofbiz.base.util.cache.CacheSoftReference.finalize() is public; should be protected A class's finalize() method should have protected access, not public. - UtilCache.java:-1, SE_BAD_FIELD Se: Class org.apache.ofbiz.base.util.cache.UtilCache defines non-transient non-serializable instance field memoryTable This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods. Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field. - UtilCache.java:-1, SE_BAD_FIELD Se: Class org.apache.ofbiz.base.util.cache.UtilCache defines non-transient non-serializable instance field listeners This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods. Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field. - UtilCache.java:63, SE_NO_SERIALVERSIONID SnVI: org.apache.ofbiz.base.util.cache.UtilCache is Serializable; consider declaring a serialVersionUID This class implements the Serializable interface, but does not define a serialVersionUID field. A change as simple as adding a reference to a .class object will add synthetic fields to the class, which will unfortunately change the implicit serialVersionUID (e.g., adding a reference to String.class will generate a static field class$java$lang$String). Also, different source code to bytecode compilers may use different naming conventions for synthetic variables generated for references to class objects or inner classes. To ensure interoperability of Serializable across versions, consider adding an explicit serialVersionUID. - UtilCache.java:160, DMI_INVOKING_TOSTRING_ON_ARRAY USELESS_STRING: Invocation of toString on propNames in org.apache.ofbiz.base.util.cache.UtilCache.getPropertyParam(ResourceBundle, String[], String) The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12. - UtilCache.java:387, NP_NULL_ON_SOME_PATH_EXCEPTION NP: Possible null pointer dereference of o in org.apache.ofbiz.base.util.cache.UtilCache.findSizeInBytes(Object) on exception path A reference value which is null on some exception control path is dereferenced here. This may lead to a NullPointerException when the code is executed. Note that because FindBugs currently does not prune infeasible exception paths, this may be a false warning. Also note that FindBugs considers the default case of a switch statement to be an exception path, since the default case is often infeasible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)