ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Balkir (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OFBIZ-9589) [FB] Package org.apache.ofbiz.base.util.string.test
Date Thu, 17 Aug 2017 13:46:00 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-9589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dennis Balkir updated OFBIZ-9589:
---------------------------------
    Attachment: OFBIZ-9589_org.apache.ofbiz.base.util.string.test_bugfixes.patch

- Diamond Operators fixed

- Line 196: didn’t do anything, was intended as it is
- Line 209: changed the name from {{StaticReturnNull}} to {{staticReturnNull}}
- Line 226: class {{ThrowException}} is now derived from {{Exception}} just to prevent confusion
- Line 251: didn’t do anything; class {{SpecialNumber}} is Serializable, but implementing
{{serialVersionUID}} is not necessary

> [FB] Package org.apache.ofbiz.base.util.string.test
> ---------------------------------------------------
>
>                 Key: OFBIZ-9589
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9589
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: base
>    Affects Versions: Trunk
>            Reporter: Dennis Balkir
>            Priority: Minor
>         Attachments: OFBIZ-9589_org.apache.ofbiz.base.util.string.test_bugfixes.patch
>
>
> FlexibleStringExpanderTests.java:196, NP_LOAD_OF_KNOWN_NULL_VALUE
> NP: Load of known null value in org.apache.ofbiz.base.util.string.test.FlexibleStringExpanderTests.fseTest(String,
String, Map, TimeZone, Locale, String, Object, boolean)
> The variable referenced at this point is known to be null due to an earlier check against
null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different
variable, or perhaps the earlier check to see if the variable is null should have been a check
to see if it was non-null).
> - FlexibleStringExpanderTests.java:209, NM_METHOD_NAMING_CONVENTION
> Nm: The method name org.apache.ofbiz.base.util.string.test.FlexibleStringExpanderTests.StaticReturnNull()
doesn't start with a lower case letter
> Methods should be verbs, in mixed case with the first letter lowercase, with the first
letter of each internal word capitalized.
> - FlexibleStringExpanderTests.java:226, NM_CLASS_NOT_EXCEPTION
> Nm: Class org.apache.ofbiz.base.util.string.test.FlexibleStringExpanderTests$ThrowException
is not derived from an Exception, even though it is named as such
> This class is not derived from another exception, but ends with 'Exception'. This will
be confusing to users of this class.
> - FlexibleStringExpanderTests.java:251, SE_NO_SERIALVERSIONID
> SnVI: org.apache.ofbiz.base.util.string.test.FlexibleStringExpanderTests$SpecialNumber
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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message