[jira] [Updated] (OFBIZ-9695) [FB] Package org.apache.ofbiz.widget.cache

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

[jira] [Updated] (OFBIZ-9695) [FB] Package org.apache.ofbiz.widget.cache

Nicolas Malin (Jira)

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

Dennis Balkir updated OFBIZ-9695:
---------------------------------
    Description:
- WidgetContextCacheKey.java:140, WMI_WRONG_MAP_ITERATOR
WMI: org.apache.ofbiz.widget.cache.WidgetContextCacheKey.toString() makes inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

  was:
- AliasSupportedTransportFactory.java:69, SIC_INNER_SHOULD_BE_STATIC
SIC: Should org.apache.ofbiz.service.xmlrpc.AliasSupportedTransportFactory$AliasSupportedTransport be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

- XmlRpcClient.java:35, NM_SAME_SIMPLE_NAME_AS_SUPERCLASS
Nm: The class name org.apache.ofbiz.service.xmlrpc.XmlRpcClient shadows the simple name of the superclass org.apache.xmlrpc.client.XmlRpcClient

This class has a simple name that is identical to that of its superclass, except that its superclass is in a different package (e.g., alpha.Foo extends beta.Foo). This can be exceptionally confusing, create lots of situations in which you have to look at import statements to resolve references and creates many opportunities to accidentally define methods that do not override methods in their superclasses.


> [FB] Package org.apache.ofbiz.widget.cache
> ------------------------------------------
>
>                 Key: OFBIZ-9695
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9695
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Dennis Balkir
>            Priority: Minor
>
> - WidgetContextCacheKey.java:140, WMI_WRONG_MAP_ITERATOR
> WMI: org.apache.ofbiz.widget.cache.WidgetContextCacheKey.toString() makes inefficient use of keySet iterator instead of entrySet iterator
> This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.



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