[jira] [Commented] (OFBIZ-10504) Remove all unnecessary boxing and unboxing in Java classes
[ https://issues.apache.org/jira/browse/OFBIZ-10504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16568100#comment-16568100 ] Pradhan Yash Sharma commented on OFBIZ-10504: - Patch looks good, Just one question are their other places as well where this refactoring can be applied? > Remove all unnecessary boxing and unboxing in Java classes > -- > > Key: OFBIZ-10504 > URL: https://issues.apache.org/jira/browse/OFBIZ-10504 > Project: OFBiz > Issue Type: Improvement >Reporter: Gil Portenseigne >Assignee: Gil Portenseigne >Priority: Major > Attachments: OFBIZ-10504_remove_unboxing_and_boxing.patch > > > Since JAVA 5, the automatic conversion of primitive data types into its > equivalent Wrapper type that is known as boxing and opposite operation is > known as unboxing, is automatically done. > There is no need for conversion. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10485) Refactor MapContext
[ https://issues.apache.org/jira/browse/OFBIZ-10485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16552660#comment-16552660 ] Pradhan Yash Sharma commented on OFBIZ-10485: - Hello Mathieu and Taher, I have observed the changes and it looks good to go further with code. > Refactor MapContext > --- > > Key: OFBIZ-10485 > URL: https://issues.apache.org/jira/browse/OFBIZ-10485 > Project: OFBiz > Issue Type: Improvement > Components: base >Reporter: Mathieu Lirzin >Assignee: Taher Alkhateeb >Priority: Minor > Fix For: Upcoming Branch > > Attachments: OFBIZ-10485_0001-Remove-MapContext-dead-code.patch, > OFBIZ-10485_0002-Add-missing-Override-in-MapContext.patch, > OFBIZ-10485_0003-Use-the-Deque-interface-in-MapContext.patch, > OFBIZ-10485_0004-Rewrite-MapContext-isEmpty.patch, > OFBIZ-10485_0005-Rewrite-MapContext-containsKey.patch, > OFBIZ-10485_0006-Rewrite-MapContext-keySet.patch, > OFBIZ-10485_0007-Remove-MapContext.ListSet-class.patch, > OFBIZ-10485_0008-Inline-MapContext-getMapContext.patch, > OFBIZ-10485_0009-Rename-stackList-to-maps.patch, > OFBIZ-10485_0010-Rework-comments.patch, > OFBIZ-10485_0011-Add-entryStream.patch, > OFBIZ-10485_0012-Add-withMapContainingKey.patch, > OFBIZ-10485_0013-Rewrite-size.patch > > > Following conversion > [https://lists.apache.org/thread.htmlf1729ef5eafcf71adfbed0c3ea61dfb73225dff82abc4a57c3de8ed5@%3Cdev.ofbiz.apache.org%3E] > on d...@ofbiz.apache.org. > Here is a first batch of patches to clean things up. Those patches are meant > to be applied in order. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10485) Refactor MapContext
[ https://issues.apache.org/jira/browse/OFBIZ-10485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16549224#comment-16549224 ] Pradhan Yash Sharma commented on OFBIZ-10485: - Hello Mathieu, I would also like to review the patches as well and update once done. > Refactor MapContext > --- > > Key: OFBIZ-10485 > URL: https://issues.apache.org/jira/browse/OFBIZ-10485 > Project: OFBiz > Issue Type: Improvement > Components: base >Reporter: Mathieu Lirzin >Assignee: Taher Alkhateeb >Priority: Minor > Fix For: Upcoming Branch > > Attachments: OFBIZ-10485_0001-Remove-MapContext-dead-code.patch, > OFBIZ-10485_0002-Add-missing-Override-in-MapContext.patch, > OFBIZ-10485_0003-Use-the-Deque-interface-in-MapContext.patch, > OFBIZ-10485_0004-Rewrite-MapContext-isEmpty.patch, > OFBIZ-10485_0005-Rewrite-MapContext-containsKey.patch, > OFBIZ-10485_0006-Rewrite-MapContext-keySet.patch, > OFBIZ-10485_0007-Remove-MapContext.ListSet-class.patch, > OFBIZ-10485_0008-Inline-MapContext-getMapContext.patch, > OFBIZ-10485_0009-Rename-stackList-to-maps.patch, > OFBIZ-10485_0010-Rework-comments.patch, > OFBIZ-10485_0011-Add-entryStream.patch, > OFBIZ-10485_0012-Add-withMapContainingKey.patch, > OFBIZ-10485_0013-Rewrite-size.patch > > > Following conversion > [https://lists.apache.org/thread.htmlf1729ef5eafcf71adfbed0c3ea61dfb73225dff82abc4a57c3de8ed5@%3Cdev.ofbiz.apache.org%3E] > on d...@ofbiz.apache.org. > Here is a first batch of patches to clean things up. Those patches are meant > to be applied in order. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-9544) Verify contact mech details (expired or not) before copying it to new order while re-ordering
[ https://issues.apache.org/jira/browse/OFBIZ-9544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16544213#comment-16544213 ] Pradhan Yash Sharma commented on OFBIZ-9544: Looks good to me. > Verify contact mech details (expired or not) before copying it to new order > while re-ordering > - > > Key: OFBIZ-9544 > URL: https://issues.apache.org/jira/browse/OFBIZ-9544 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Reporter: Suraj Khurana >Assignee: Suraj Khurana >Priority: Major > Attachments: OFBIZ-9544.patch > > > While re-ordering any order, previous contact mech (such as address, contact > info etc.) are copied for customer's benefits. We need to have a check that > could validate that contact mech is still in use or not. > There might be other places in the code base where we need that check in > place. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10398) Rename deletePartyContactMechPurpose* services
[ https://issues.apache.org/jira/browse/OFBIZ-10398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16544212#comment-16544212 ] Pradhan Yash Sharma commented on OFBIZ-10398: - +1 Looks good to me. > Rename deletePartyContactMechPurpose* services > -- > > Key: OFBIZ-10398 > URL: https://issues.apache.org/jira/browse/OFBIZ-10398 > Project: OFBiz > Issue Type: Improvement > Components: order, party >Affects Versions: Trunk >Reporter: Pierre Smits >Assignee: Suraj Khurana >Priority: Major > Attachments: OFBIZ-10398-rename.patch, OFBIZ-10398.patch > > > Both deletePartyContactMechPurposeIfExists and deletePartyContactMechPurpose > are misnomers, as these functions don't delete records but expires those by > setting the thruDate. The misnomers creates unnecessary confusion. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10481) Reducing scope of variables in org.apache.ofbiz.datafile package
[ https://issues.apache.org/jira/browse/OFBIZ-10481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10481: Attachment: OFBIZ-10481.patch > Reducing scope of variables in org.apache.ofbiz.datafile package > > > Key: OFBIZ-10481 > URL: https://issues.apache.org/jira/browse/OFBIZ-10481 > Project: OFBiz > Issue Type: Sub-task >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10481.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10481) Reducing scope of variables in org.apache.ofbiz.datafile package
Pradhan Yash Sharma created OFBIZ-10481: --- Summary: Reducing scope of variables in org.apache.ofbiz.datafile package Key: OFBIZ-10481 URL: https://issues.apache.org/jira/browse/OFBIZ-10481 Project: OFBiz Issue Type: Sub-task Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10480) Reducing scope of variables in org.apache.ofbiz.common package
[ https://issues.apache.org/jira/browse/OFBIZ-10480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10480: Attachment: OFBIZ-10480.patch > Reducing scope of variables in org.apache.ofbiz.common package > -- > > Key: OFBIZ-10480 > URL: https://issues.apache.org/jira/browse/OFBIZ-10480 > Project: OFBiz > Issue Type: Sub-task >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10480.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10480) Reducing scope of variables in org.apache.ofbiz.common package
Pradhan Yash Sharma created OFBIZ-10480: --- Summary: Reducing scope of variables in org.apache.ofbiz.common package Key: OFBIZ-10480 URL: https://issues.apache.org/jira/browse/OFBIZ-10480 Project: OFBiz Issue Type: Sub-task Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10479) Reducing scope of variables in org.apache.ofbiz.catalina package
[ https://issues.apache.org/jira/browse/OFBIZ-10479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10479: Attachment: OFBIZ-10479.patch > Reducing scope of variables in org.apache.ofbiz.catalina package > > > Key: OFBIZ-10479 > URL: https://issues.apache.org/jira/browse/OFBIZ-10479 > Project: OFBiz > Issue Type: Sub-task >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Attachments: OFBIZ-10479.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10479) Reducing scope of variables in org.apache.ofbiz.catalina package
Pradhan Yash Sharma created OFBIZ-10479: --- Summary: Reducing scope of variables in org.apache.ofbiz.catalina package Key: OFBIZ-10479 URL: https://issues.apache.org/jira/browse/OFBIZ-10479 Project: OFBiz Issue Type: Sub-task Affects Versions: Trunk Reporter: Pradhan Yash Sharma -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10477) Parent ticket for reducing scope of variables and methods
[ https://issues.apache.org/jira/browse/OFBIZ-10477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10477: Description: *Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} As per the current implementation, I will try to give minimum scope further more can be enhanced was: *Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} As per the current implementation we can reduse the > Parent ticket for reducing scope of variables and methods > - > > Key: OFBIZ-10477 > URL: https://issues.apache.org/jira/browse/OFBIZ-10477 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > > *Downsize Accessibility Scope* > I've tried to downsize accessibility scope of classes, interfaces, abstract > class, declared member variables, enumerations, methods, and constructors to > as minimum as possible as per OFBIz current implementation, still there is a > lot of scope for improvement but it would require changes at the granular > level. I've used > [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] > as my reference point. example: > > {code:java} > public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} > {code:java} > void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} > As per the current implementation, I will try to give minimum scope further > more can be enhanced -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10477) Parent ticket for reducing scope of variables and methods
[ https://issues.apache.org/jira/browse/OFBIZ-10477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10477: Description: *Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} As per the current implementation, I will try to give minimum scope furthermore can be enhanced was: *Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} As per the current implementation, I will try to give minimum scope further more can be enhanced > Parent ticket for reducing scope of variables and methods > - > > Key: OFBIZ-10477 > URL: https://issues.apache.org/jira/browse/OFBIZ-10477 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > > *Downsize Accessibility Scope* > I've tried to downsize accessibility scope of classes, interfaces, abstract > class, declared member variables, enumerations, methods, and constructors to > as minimum as possible as per OFBIz current implementation, still there is a > lot of scope for improvement but it would require changes at the granular > level. I've used > [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] > as my reference point. example: > > {code:java} > public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} > {code:java} > void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} > As per the current implementation, I will try to give minimum scope > furthermore can be enhanced -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10477) Parent ticket for reducing scope of variables and methods
[ https://issues.apache.org/jira/browse/OFBIZ-10477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10477: Description: *Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} As per the current implementation we can reduse the > Parent ticket for reducing scope of variables and methods > - > > Key: OFBIZ-10477 > URL: https://issues.apache.org/jira/browse/OFBIZ-10477 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > > *Downsize Accessibility Scope* > I've tried to downsize accessibility scope of classes, interfaces, abstract > class, declared member variables, enumerations, methods, and constructors to > as minimum as possible as per OFBIz current implementation, still there is a > lot of scope for improvement but it would require changes at the granular > level. I've used > [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] > as my reference point. example: > > {code:java} > public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} > {code:java} > void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} > As per the current implementation we can reduse the -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10478) Reducing scope of variables in org.apache.ofbiz.base package
[ https://issues.apache.org/jira/browse/OFBIZ-10478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10478: Attachment: OFBIZ-10478.patch > Reducing scope of variables in org.apache.ofbiz.base package > > > Key: OFBIZ-10478 > URL: https://issues.apache.org/jira/browse/OFBIZ-10478 > Project: OFBiz > Issue Type: Sub-task > Components: base >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Attachments: OFBIZ-10478.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10478) Reducing scope of variables in org.apache.ofbiz.base package
Pradhan Yash Sharma created OFBIZ-10478: --- Summary: Reducing scope of variables in org.apache.ofbiz.base package Key: OFBIZ-10478 URL: https://issues.apache.org/jira/browse/OFBIZ-10478 Project: OFBiz Issue Type: Sub-task Components: base Affects Versions: Trunk Reporter: Pradhan Yash Sharma -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10477) Parent ticket for reducing scope of variables and methods
Pradhan Yash Sharma created OFBIZ-10477: --- Summary: Parent ticket for reducing scope of variables and methods Key: OFBIZ-10477 URL: https://issues.apache.org/jira/browse/OFBIZ-10477 Project: OFBiz Issue Type: Improvement Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (OFBIZ-9514) Use well-formed IETF BCP 47 language tag for setVariant method.
[ https://issues.apache.org/jira/browse/OFBIZ-9514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma closed OFBIZ-9514. -- Resolution: Later Closing this ticket for now as Locale for a specific region is not required. > Use well-formed IETF BCP 47 language tag for setVariant method. > - > > Key: OFBIZ-9514 > URL: https://issues.apache.org/jira/browse/OFBIZ-9514 > Project: OFBiz > Issue Type: Sub-task > Components: ALL APPLICATIONS >Reporter: Pradhan Yash Sharma >Priority: Major > > For Factory Method and LocaleBuilder class to work, we need to pass a > well-formed variant in setVariant method so that it can be transformed int > IETF BCP 47 language tag without losing information. > To do so we need to create Locale objects through rule set. Please reference > https://docs.oracle.com/javase/7/docs/api/java/util/Locale.Builder.html for > more details. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-9839) Using try-with-resources with JDBC objects
[ https://issues.apache.org/jira/browse/OFBIZ-9839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16544012#comment-16544012 ] Pradhan Yash Sharma commented on OFBIZ-9839: Thank you, Jacques, for refactoring of other 4 methods I will create a Jira for the same. > Using try-with-resources with JDBC objects > -- > > Key: OFBIZ-9839 > URL: https://issues.apache.org/jira/browse/OFBIZ-9839 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Jacques Le Roux >Priority: Major > Fix For: 17.12.01 > > Attachments: OFBIZ-9839.patch, OFBIZ-9839.patch > > > Proposal to use try with resources for SQL objects like ResultSet and other > objects. SQL classes have AutoCloseable interface. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (OFBIZ-9827) Components loading twice while starting OFBiz
[ https://issues.apache.org/jira/browse/OFBIZ-9827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma closed OFBIZ-9827. -- Resolution: Not A Problem The code is working fine hence closing this ticket. > Components loading twice while starting OFBiz > - > > Key: OFBIZ-9827 > URL: https://issues.apache.org/jira/browse/OFBIZ-9827 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12, > Release Branch 16.11 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Major > Attachments: logs.tar.gz > > > Components loading multiple times while OFBiz starts. > While CatalinaContainer loads webapps it creates the future task, which loads > more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-9827) Components loading twice while starting OFBiz
[ https://issues.apache.org/jira/browse/OFBIZ-9827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16544005#comment-16544005 ] Pradhan Yash Sharma commented on OFBIZ-9827: Hello Jacques, Yes, I am closing this ticket. > Components loading twice while starting OFBiz > - > > Key: OFBIZ-9827 > URL: https://issues.apache.org/jira/browse/OFBIZ-9827 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12, > Release Branch 16.11 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Major > Attachments: logs.tar.gz > > > Components loading multiple times while OFBiz starts. > While CatalinaContainer loads webapps it creates the future task, which loads > more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10368) Implement Depends on support for Component Loading.
[ https://issues.apache.org/jira/browse/OFBIZ-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10368: Attachment: OFBIZ-10368.patch > Implement Depends on support for Component Loading. > --- > > Key: OFBIZ-10368 > URL: https://issues.apache.org/jira/browse/OFBIZ-10368 > Project: OFBiz > Issue Type: New Feature > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10368.patch > > > Components are loaded in the order they are found (i.e. alphabetic or > creation date). This can be altered. We have a pending feature support for > ofbiz-component, for creating a series of dependency for component loading, > before loading a particular component. > > Here we can define dependency for a component like Component ebaystore is > dependent on Component ebay (even multiple dependencies for a single > component is also supported). We can declare it in this fashion in > ofbiz-component.xml file. > > {code:java} > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd;> > {code} > > Now we can declare dependency and if any anomaly is found loading of > components will stop. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10368) Implement Depends on support for Component Loading.
[ https://issues.apache.org/jira/browse/OFBIZ-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10368: Description: Components are loaded in the order they are found (i.e. alphabetic or creation date). This can be altered. We have a pending feature support for ofbiz-component, for creating a series of dependency for component loading, before loading a particular component. Here we can define dependency for a component like Component ebaystore is dependent on Component ebay (even multiple dependencies for a single component is also supported). We can declare it in this fashion in ofbiz-component.xml file. {code:java} http://www.w3.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd;> {code} Now we can declare dependency and if any anomaly is found loading of components will stop. was:Components are loaded in the order they are found (i.e. alphabetic or creation date) > Implement Depends on support for Component Loading. > --- > > Key: OFBIZ-10368 > URL: https://issues.apache.org/jira/browse/OFBIZ-10368 > Project: OFBiz > Issue Type: New Feature > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > > Components are loaded in the order they are found (i.e. alphabetic or > creation date). This can be altered. We have a pending feature support for > ofbiz-component, for creating a series of dependency for component loading, > before loading a particular component. > > Here we can define dependency for a component like Component ebaystore is > dependent on Component ebay (even multiple dependencies for a single > component is also supported). We can declare it in this fashion in > ofbiz-component.xml file. > > {code:java} > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd;> > {code} > > Now we can declare dependency and if any anomaly is found loading of > components will stop. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10368) Implement Depends on support for Component Loading.
[ https://issues.apache.org/jira/browse/OFBIZ-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10368: Description: Components are loaded in the order they are found (i.e. alphabetic or creation date) > Implement Depends on support for Component Loading. > --- > > Key: OFBIZ-10368 > URL: https://issues.apache.org/jira/browse/OFBIZ-10368 > Project: OFBiz > Issue Type: New Feature > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > > Components are loaded in the order they are found (i.e. alphabetic or > creation date) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10368) Implement Depends on support for Component Loading.
Pradhan Yash Sharma created OFBIZ-10368: --- Summary: Implement Depends on support for Component Loading. Key: OFBIZ-10368 URL: https://issues.apache.org/jira/browse/OFBIZ-10368 Project: OFBiz Issue Type: New Feature Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10359) Refactoring Variable Scope for org.apache.ofbiz.security
[ https://issues.apache.org/jira/browse/OFBIZ-10359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16445489#comment-16445489 ] Pradhan Yash Sharma commented on OFBIZ-10359: - Attaching patch file for the same. > Refactoring Variable Scope for org.apache.ofbiz.security > - > > Key: OFBIZ-10359 > URL: https://issues.apache.org/jira/browse/OFBIZ-10359 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10359.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10359) Refactoring Variable Scope for org.apache.ofbiz.security
[ https://issues.apache.org/jira/browse/OFBIZ-10359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10359: Attachment: OFBIZ-10359.patch > Refactoring Variable Scope for org.apache.ofbiz.security > - > > Key: OFBIZ-10359 > URL: https://issues.apache.org/jira/browse/OFBIZ-10359 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10359.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10358) Refactoring Variable Scope for org.apache.ofbiz.base.start
[ https://issues.apache.org/jira/browse/OFBIZ-10358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10358: Attachment: OFBIZ-10358.patch > Refactoring Variable Scope for org.apache.ofbiz.base.start > -- > > Key: OFBIZ-10358 > URL: https://issues.apache.org/jira/browse/OFBIZ-10358 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10358.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10358) Refactoring Variable Scope for org.apache.ofbiz.base.start
[ https://issues.apache.org/jira/browse/OFBIZ-10358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10358: Attachment: (was: OFBIZ-10358.patch) > Refactoring Variable Scope for org.apache.ofbiz.base.start > -- > > Key: OFBIZ-10358 > URL: https://issues.apache.org/jira/browse/OFBIZ-10358 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10358) Refactoring Variable Scope for org.apache.ofbiz.base.start
[ https://issues.apache.org/jira/browse/OFBIZ-10358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16445486#comment-16445486 ] Pradhan Yash Sharma commented on OFBIZ-10358: - Attaching patch file for the same. > Refactoring Variable Scope for org.apache.ofbiz.base.start > -- > > Key: OFBIZ-10358 > URL: https://issues.apache.org/jira/browse/OFBIZ-10358 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10358.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10358) Refactoring Variable Scope for org.apache.ofbiz.base.start
[ https://issues.apache.org/jira/browse/OFBIZ-10358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10358: Attachment: OFBIZ-10358.patch > Refactoring Variable Scope for org.apache.ofbiz.base.start > -- > > Key: OFBIZ-10358 > URL: https://issues.apache.org/jira/browse/OFBIZ-10358 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10358.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10360) Refactoring Variable Scope for org.apache.ofbiz.webapp
[ https://issues.apache.org/jira/browse/OFBIZ-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10360: Component/s: framework > Refactoring Variable Scope for org.apache.ofbiz.webapp > --- > > Key: OFBIZ-10360 > URL: https://issues.apache.org/jira/browse/OFBIZ-10360 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10360) Refactoring Variable Scope for org.apache.ofbiz.webapp
[ https://issues.apache.org/jira/browse/OFBIZ-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10360: Affects Version/s: Trunk > Refactoring Variable Scope for org.apache.ofbiz.webapp > --- > > Key: OFBIZ-10360 > URL: https://issues.apache.org/jira/browse/OFBIZ-10360 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10360) Refactoring Variable Scope for org.apache.ofbiz.webapp
[ https://issues.apache.org/jira/browse/OFBIZ-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10360: Fix Version/s: Trunk > Refactoring Variable Scope for org.apache.ofbiz.webapp > --- > > Key: OFBIZ-10360 > URL: https://issues.apache.org/jira/browse/OFBIZ-10360 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10360) Refactoring Variable Scope for org.apache.ofbiz.webapp
[ https://issues.apache.org/jira/browse/OFBIZ-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10360: Summary: Refactoring Variable Scope for org.apache.ofbiz.webapp (was: Refactoring Variable Scope ) > Refactoring Variable Scope for org.apache.ofbiz.webapp > --- > > Key: OFBIZ-10360 > URL: https://issues.apache.org/jira/browse/OFBIZ-10360 > Project: OFBiz > Issue Type: Sub-task >Reporter: Pradhan Yash Sharma >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10360) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10360: Summary: Refactoring Variable Scope(was: R) > Refactoring Variable Scope > > > Key: OFBIZ-10360 > URL: https://issues.apache.org/jira/browse/OFBIZ-10360 > Project: OFBiz > Issue Type: Sub-task >Reporter: Pradhan Yash Sharma >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10360) Refactoring Variable Scope for org.apache.ofbiz.webapp
[ https://issues.apache.org/jira/browse/OFBIZ-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10360: Priority: Minor (was: Major) > Refactoring Variable Scope for org.apache.ofbiz.webapp > --- > > Key: OFBIZ-10360 > URL: https://issues.apache.org/jira/browse/OFBIZ-10360 > Project: OFBiz > Issue Type: Sub-task >Reporter: Pradhan Yash Sharma >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10360) R
Pradhan Yash Sharma created OFBIZ-10360: --- Summary: R Key: OFBIZ-10360 URL: https://issues.apache.org/jira/browse/OFBIZ-10360 Project: OFBiz Issue Type: Sub-task Reporter: Pradhan Yash Sharma -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10361) Refactoring Variable Scope for org.apache.ofbiz.service
Pradhan Yash Sharma created OFBIZ-10361: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.service Key: OFBIZ-10361 URL: https://issues.apache.org/jira/browse/OFBIZ-10361 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10359) Refactoring Variable Scope for org.apache.ofbiz.security
Pradhan Yash Sharma created OFBIZ-10359: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.security Key: OFBIZ-10359 URL: https://issues.apache.org/jira/browse/OFBIZ-10359 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10358) Refactoring Variable Scope for org.apache.ofbiz.base.start
Pradhan Yash Sharma created OFBIZ-10358: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.base.start Key: OFBIZ-10358 URL: https://issues.apache.org/jira/browse/OFBIZ-10358 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCachecache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new));{code} Some of the key benefits of using lambdas will introduce [Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. {code:java} Map systemProps = UtilGenerics. checkMap(System.getProperties());{code} {code:java} Map systemProps = UtilGenerics.checkMap(System.getProperties());{code} *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- {code:java} throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e);{code} {code:java} throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" {code} "]" is comparatively slower than ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performance to some extent a study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration* Lastly, some of the variable declarations are updated this doesn't create a huge difference but helps JVM at the from implicit conversion. {code:java} private long cumulativeEvents = 0;{code} {code:java} private long cumulativeEvents = 0L;{code} Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvements or suggestion you have in mind :) P.S. Apart from this I am also working on performance matrix and will share it soon. was: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e ->
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCachecache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new));{code} Some of the key benefits of using lambdas will introduce [Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. {code:java} Map systemProps = UtilGenerics. checkMap(System.getProperties());{code} {code:java} Map systemProps = UtilGenerics.checkMap(System.getProperties());{code} *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- {code:java} throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e);{code} {code:java} throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" {code} is comparatively slower than ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performance to some extent a study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration* Lastly some of the variable declarations is updated this doesn't create a huge difference but helps JVM at the from implicit conversion. {code:java} private long cumulativeEvents = 0;{code} {code:java} private long cumulativeEvents = 0L;{code} Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvements or suggestion you have in mind :) P.S. Apart from this I am also working on performance matrix and will share it soon. was: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e ->
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCachecache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new));{code} Some of the key benefits of using lambdas will introduce [Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. {code:java} Map systemProps = UtilGenerics. checkMap(System.getProperties());{code} {code:java} Map systemProps = UtilGenerics.checkMap(System.getProperties());{code} *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- {code:java} throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e);{code} {code:java} throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" {code} is comparatively slower than ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performance to some extent a study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration*Lastly some of the variable declarations is updated this doesn't create a huge difference but helps JVM at the from implicit conversion.* private long cumulativeEvents = 0; private long cumulativeEvents = 0L; - Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvements or suggestion you have in mind :) P.S. Apart from this I am also working on performance matrix and will share it soon. was: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e ->
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCachecache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new));{code} Some of the key benefits of using lambdas will introduce [Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. {code:java} Map systemProps = UtilGenerics. checkMap(System.getProperties());{code} {code:java} Map systemProps = UtilGenerics.checkMap(System.getProperties());{code} *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- {code:java} throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e);{code} {code:java} throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" {code} is comparatively slower than ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performance to some extent a study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration*Lastly some of the variable declarations is updated this doesn't create a huge difference but helps JVM at the from implicit conversion.* private long cumulativeEvents = 0; private long cumulativeEvents = 0L; - Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvements or suggestion you have in mind :) P.S. Apart from this I am also working on performance matrix and will share it soon. was: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e ->
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCachecache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new));{code} Some of the key benefits of using lambdas will introduce [unctional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. - Map systemProps = UtilGenerics. checkMap(System.getProperties()); - + Map systemProps = UtilGenerics.checkMap(System.getProperties()); *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e); + throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" is comparatively slower than ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performance to some extent a study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration*Lastly some of the variable declarations is updated this doesn't create a huge difference but helps JVM at the from implicit conversion.* - - private long cumulativeEvents = 0; - + private long cumulativeEvents = 0L; - Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvements or suggestion you have in mind :) P.S. Apart from this I am also working on performance matrix and will share it soon. was: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCache cache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new));{code} Some of the
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: {code:java} public void noteKeyRemoval(UtilCachecache, K key, V oldValue);{code} {code:java} void noteKeyRemoval(UtilCache cache, K key, V oldValue); {code} *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: {code:java} Map initParameters = new LinkedHashMap<>(); for (Element e : initParamList) { initParameters.put(e.getAttribute("name"), e.getAttribute("value")); }{code} {code:java} Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new));{code} Some of the key benefits of using lambdas will introduce [unctional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. - Map systemProps = UtilGenerics. checkMap(System.getProperties()); - + Map systemProps = UtilGenerics.checkMap(System.getProperties()); *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e); + throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" is comparatively slower than ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performance to some extent a study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration*Lastly some of the variable declarations is updated this doesn't create a huge difference but helps JVM at the from implicit conversion.* - - private long cumulativeEvents = 0; - + private long cumulativeEvents = 0L; - Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvements or suggestion you have in mind :) P.S. Apart from this I am also working on performance matrix and will share it soon. was: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: - Map initParameters = new LinkedHashMap<>(); - - for (Element e : initParamList) \{ - initParameters.put(e.getAttribute("name"), e.getAttribute("value")); - } + Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new)); Some of the key benefits of using lambdas will introduce[Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: - MapinitParameters = new LinkedHashMap<>(); - - for (Element e : initParamList) \{ - initParameters.put(e.getAttribute("name"), e.getAttribute("value")); - } + Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new)); Some of the key benefits of using lambdas will introduce[Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. - Map systemProps = UtilGenerics. checkMap(System.getProperties()); - + Map systemProps = UtilGenerics.checkMap(System.getProperties()); *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e); + throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" is comparatively slower than ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performance to some extent a study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration*Lastly some of the variable declarations is updated this doesn't create a huge difference but helps JVM at the from implicit conversion.* - - private long cumulativeEvents = 0; - + private long cumulativeEvents = 0L; - Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvements or suggestion you have in mind :) P.S. Apart from this I am also working on performance matrix and will share it soon. was: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: - public void noteKeyRemoval(UtilCache cache, K key, V oldValue); + void noteKeyRemoval(UtilCache cache, K key, V oldValue);Limiting the scope of the method from public modifier to package level. *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: - Map initParameters = new LinkedHashMap<>(); - for (Element e : initParamList) \{ - initParameters.put(e.getAttribute("name"), e.getAttribute("value")); - } + Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new)); Some of the key benefits of using lambdas will introduce[Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: - public void noteKeyRemoval(UtilCachecache, K key, V oldValue); + void noteKeyRemoval(UtilCache cache, K key, V oldValue);Limiting the scope of the method from public modifier to package level. *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: - Map initParameters = new LinkedHashMap<>(); - for (Element e : initParamList) \{ - initParameters.put(e.getAttribute("name"), e.getAttribute("value")); - } + Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new)); Some of the key benefits of using lambdas will introduce[Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. - Map systemProps = UtilGenerics. checkMap(System.getProperties()); + Map systemProps = UtilGenerics.checkMap(System.getProperties()); *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e); + throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" is comparatively slower than ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performance to some extent a study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration*Lastly some of the variable declarations is updated this doesn't create a huge difference but helps JVM at the from implicit conversion. - private long cumulativeEvents = 0; + private long cumulativeEvents = 0L; Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvements or suggestion you have in mind :) P.S. Apart from this I am also working on performance matrix and will share it soon. was: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: - public void noteKeyRemoval(UtilCache cache, K key, V oldValue); + void noteKeyRemoval(UtilCache cache, K key, V oldValue);Limiting the scope of the method from public modifier to package level. *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: - Map initParameters = new LinkedHashMap<>(); - for (Element e : initParamList) \{ - initParameters.put(e.getAttribute("name"), e.getAttribute("value")); - } + Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new)); Some of the
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Description: Here is the detailed information about the things I am working on for performance optimization in our OFBiz code. *1.) Downsize Accessibility Scope* I've tried to downsize accessibility scope of classes, interfaces, abstract class, declared member variables, enumerations, methods, and constructors to as minimum as possible as per OFBIz current implementation, still there is a lot of scope for improvement but it would require changes at the granular level. I've used [this|https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html] as my reference point. example: - public void noteKeyRemoval(UtilCachecache, K key, V oldValue); + void noteKeyRemoval(UtilCache cache, K key, V oldValue);Limiting the scope of the method from public modifier to package level. *2.) Using Lambda Expressions* Then tried to use lambda expressions on simple functional work to leverage implicit type of coding an example: - Map initParameters = new LinkedHashMap<>(); - for (Element e : initParamList) \{ - initParameters.put(e.getAttribute("name"), e.getAttribute("value")); - } + Map initParameters = initParamList.stream().collect(Collectors.toMap(e -> e.getAttribute("name"), e -> e.getAttribute("value"), (a, b) -> b, LinkedHashMap::new)); Some of the key benefits of using lambdas will introduce[Functional style over Imperative style|https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming], we can use [method referencing|https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html], usage of aggregate operations, and it will help developers to write memory efficient code. *3.) Using Type Inference* Java uses type inference so to make code lightweight I've updated code constructs as shown in the example for more on this refer this [article|https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.htmlv]. - Map systemProps = UtilGenerics. checkMap(System.getProperties()); + Map systemProps = UtilGenerics.checkMap(System.getProperties()); *4.) Use of single quote for character* There is a significant usage of <"Single Character"> in the codebase for example:- throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + "]", e); + throw new GenericConfigException("Error opening file at location [" + fileUrl.toExternalForm() + ']', e); "]" is comparativlelly slower then ']' Java internally uses Flyweight Design pattern to create String literals so for every call it will not create a new Object and used an existing one this will improve performace to some extend an study can be seen on [this|https://stackoverflow.com/questions/24859500/concatenate-char-literal-x-vs-single-char-string-literal-x] page. *5.) Updated Variable Declaration*Lastly some of the variable declaration is updated this doesn't create a huge difference but helps JVM at the from implicit conversion. - private long cumulativeEvents = 0; + private long cumulativeEvents = 0L; Based on above findings, I have done some code improvement and provided following patches. *And need community help for reviewing these changes.* Kindly provide any improvents or suggestion you have in mind :) # [OFBIZ-10344] Refactoring Variable Scope for org.apache.ofbiz.base package # [OFBIZ-10345] Refactoring Variable Scope for org.apache.ofbiz.catalina.container # [OFBIZ-10346] Refactoring Variable Scope for org.apache.ofbiz.common # [OFBIZ-10347] Refactoring Variable Scope for org.apache.ofbiz.datafile # [OFBIZ-10348] Refactoring Variable Scope for org.apache.ofbiz.entity P.S. Apart from this I am also working on performance matrix and will share it soon. was:Method and Variable access modifiers can be narrowed down to private access modifier. Set assignments to type variables. Usage of the implicit style of coding. > Refactoring Variable Scope > > > Key: OFBIZ-10343 > URL: https://issues.apache.org/jira/browse/OFBIZ-10343 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > > Here is the detailed information about the things I am working on for > performance optimization in our OFBiz code. > > *1.) Downsize Accessibility Scope* > I've tried to downsize accessibility scope of classes, interfaces, abstract > class, declared member variables, enumerations, methods, and constructors to > as minimum as possible as per OFBIz current implementation,
[jira] [Created] (OFBIZ-10352) Refactoring Variable Scope for org.apache.ofbiz.minilang
Pradhan Yash Sharma created OFBIZ-10352: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.minilang Key: OFBIZ-10352 URL: https://issues.apache.org/jira/browse/OFBIZ-10352 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10349) Refactoring Variable Scope for org.apache.ofbiz.entityext
[ https://issues.apache.org/jira/browse/OFBIZ-10349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16443756#comment-16443756 ] Pradhan Yash Sharma commented on OFBIZ-10349: - Attaching patch file for the same > Refactoring Variable Scope for org.apache.ofbiz.entityext > - > > Key: OFBIZ-10349 > URL: https://issues.apache.org/jira/browse/OFBIZ-10349 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10349.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10349) Refactoring Variable Scope for org.apache.ofbiz.entityext
[ https://issues.apache.org/jira/browse/OFBIZ-10349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10349: Attachment: OFBIZ-10349.patch > Refactoring Variable Scope for org.apache.ofbiz.entityext > - > > Key: OFBIZ-10349 > URL: https://issues.apache.org/jira/browse/OFBIZ-10349 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10349.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10349) Refactoring Variable Scope for org.apache.ofbiz.entityext
Pradhan Yash Sharma created OFBIZ-10349: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.entityext Key: OFBIZ-10349 URL: https://issues.apache.org/jira/browse/OFBIZ-10349 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10348) Refactoring Variable Scope for org.apache.ofbiz.entity
[ https://issues.apache.org/jira/browse/OFBIZ-10348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16442353#comment-16442353 ] Pradhan Yash Sharma commented on OFBIZ-10348: - Patch File [^OFBIZ-10348_2.patch] contains Refactoring of packages # org.apache.ofbiz.entity.model # org.apache.ofbiz.entity.serialize # org.apache.ofbiz.entity.test # org.apache.ofbiz.entity.testtools # org.apache.ofbiz.entity.transaction # org.apache.ofbiz.entity.util > Refactoring Variable Scope for org.apache.ofbiz.entity > -- > > Key: OFBIZ-10348 > URL: https://issues.apache.org/jira/browse/OFBIZ-10348 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10348_1.patch, OFBIZ-10348_2.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10348) Refactoring Variable Scope for org.apache.ofbiz.entity
[ https://issues.apache.org/jira/browse/OFBIZ-10348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10348: Attachment: OFBIZ-10348_2.patch > Refactoring Variable Scope for org.apache.ofbiz.entity > -- > > Key: OFBIZ-10348 > URL: https://issues.apache.org/jira/browse/OFBIZ-10348 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10348_1.patch, OFBIZ-10348_2.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10348) Refactoring Variable Scope for org.apache.ofbiz.entity
[ https://issues.apache.org/jira/browse/OFBIZ-10348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16442168#comment-16442168 ] Pradhan Yash Sharma commented on OFBIZ-10348: - Patch File OFBIZ-10348_1.patch contains Refactoring of packages # org.apache.ofbiz.entity.cache # org.apache.ofbiz.entity.condition # org.apache.ofbiz.entity.config.model # org.apache.ofbiz.entity.connection # org.apache.ofbiz.entity.datasource # org.apache.ofbiz.entity.eca # org.apache.ofbiz.entity.finder # org.apache.ofbiz.entity.jdbc > Refactoring Variable Scope for org.apache.ofbiz.entity > -- > > Key: OFBIZ-10348 > URL: https://issues.apache.org/jira/browse/OFBIZ-10348 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10348_1.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10348) Refactoring Variable Scope for org.apache.ofbiz.entity
[ https://issues.apache.org/jira/browse/OFBIZ-10348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10348: Attachment: OFBIZ-10348_1.patch > Refactoring Variable Scope for org.apache.ofbiz.entity > -- > > Key: OFBIZ-10348 > URL: https://issues.apache.org/jira/browse/OFBIZ-10348 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10348_1.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10348) Refactoring Variable Scope for org.apache.ofbiz.entity
Pradhan Yash Sharma created OFBIZ-10348: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.entity Key: OFBIZ-10348 URL: https://issues.apache.org/jira/browse/OFBIZ-10348 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10347) Refactoring Variable Scope for org.apache.ofbiz.datafile
[ https://issues.apache.org/jira/browse/OFBIZ-10347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10347: Attachment: OFBIZ-10347.patch > Refactoring Variable Scope for org.apache.ofbiz.datafile > > > Key: OFBIZ-10347 > URL: https://issues.apache.org/jira/browse/OFBIZ-10347 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10347.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10347) Refactoring Variable Scope for org.apache.ofbiz.datafile
[ https://issues.apache.org/jira/browse/OFBIZ-10347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16442088#comment-16442088 ] Pradhan Yash Sharma commented on OFBIZ-10347: - Attaching patch file for the same. > Refactoring Variable Scope for org.apache.ofbiz.datafile > > > Key: OFBIZ-10347 > URL: https://issues.apache.org/jira/browse/OFBIZ-10347 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10347.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10347) Refactoring Variable Scope for org.apache.ofbiz.datafile
Pradhan Yash Sharma created OFBIZ-10347: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.datafile Key: OFBIZ-10347 URL: https://issues.apache.org/jira/browse/OFBIZ-10347 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10346) Refactoring Variable Scope for org.apache.ofbiz.common
[ https://issues.apache.org/jira/browse/OFBIZ-10346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441976#comment-16441976 ] Pradhan Yash Sharma commented on OFBIZ-10346: - Adding patch file org.apache.ofbiz.common > Refactoring Variable Scope for org.apache.ofbiz.common > -- > > Key: OFBIZ-10346 > URL: https://issues.apache.org/jira/browse/OFBIZ-10346 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10346.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10346) Refactoring Variable Scope for org.apache.ofbiz.common
[ https://issues.apache.org/jira/browse/OFBIZ-10346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10346: Attachment: OFBIZ-10346.patch > Refactoring Variable Scope for org.apache.ofbiz.common > -- > > Key: OFBIZ-10346 > URL: https://issues.apache.org/jira/browse/OFBIZ-10346 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10346.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10346) Refactoring Variable Scope for org.apache.ofbiz.common
Pradhan Yash Sharma created OFBIZ-10346: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.common Key: OFBIZ-10346 URL: https://issues.apache.org/jira/browse/OFBIZ-10346 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10345) Refactoring Variable Scope for org.apache.ofbiz.catalina.container
[ https://issues.apache.org/jira/browse/OFBIZ-10345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10345: Attachment: OFBIZ-10345.patch > Refactoring Variable Scope for org.apache.ofbiz.catalina.container > -- > > Key: OFBIZ-10345 > URL: https://issues.apache.org/jira/browse/OFBIZ-10345 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10345.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10345) Refactoring Variable Scope for org.apache.ofbiz.catalina.container
Pradhan Yash Sharma created OFBIZ-10345: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.catalina.container Key: OFBIZ-10345 URL: https://issues.apache.org/jira/browse/OFBIZ-10345 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Attachment: (was: OFBIZ-10343.patch) > Refactoring Variable Scope > > > Key: OFBIZ-10343 > URL: https://issues.apache.org/jira/browse/OFBIZ-10343 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > > Method and Variable access modifiers can be narrowed down to private access > modifier. Set assignments to type variables. Usage of the implicit style of > coding. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Attachment: (was: OFBIZ-10343.patch) > Refactoring Variable Scope > > > Key: OFBIZ-10343 > URL: https://issues.apache.org/jira/browse/OFBIZ-10343 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > > Method and Variable access modifiers can be narrowed down to private access > modifier. Set assignments to type variables. Usage of the implicit style of > coding. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10344) Refactoring Variable Scope for org.apache.ofbiz.base package
[ https://issues.apache.org/jira/browse/OFBIZ-10344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441932#comment-16441932 ] Pradhan Yash Sharma commented on OFBIZ-10344: - Added patch for org.apache.ofbiz.base package. > Refactoring Variable Scope for org.apache.ofbiz.base package > > > Key: OFBIZ-10344 > URL: https://issues.apache.org/jira/browse/OFBIZ-10344 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10344.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10344) Refactoring Variable Scope for org.apache.ofbiz.base package
[ https://issues.apache.org/jira/browse/OFBIZ-10344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10344: Attachment: OFBIZ-10344.patch > Refactoring Variable Scope for org.apache.ofbiz.base package > > > Key: OFBIZ-10344 > URL: https://issues.apache.org/jira/browse/OFBIZ-10344 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10344.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10344) Refactoring Variable Scope for org.apache.ofbiz.base package
Pradhan Yash Sharma created OFBIZ-10344: --- Summary: Refactoring Variable Scope for org.apache.ofbiz.base package Key: OFBIZ-10344 URL: https://issues.apache.org/jira/browse/OFBIZ-10344 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Attachment: OFBIZ-10343.patch > Refactoring Variable Scope > > > Key: OFBIZ-10343 > URL: https://issues.apache.org/jira/browse/OFBIZ-10343 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10343.patch, OFBIZ-10343.patch > > > Method and Variable access modifiers can be narrowed down to private access > modifier. Set assignments to type variables. Usage of the implicit style of > coding. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16440819#comment-16440819 ] Pradhan Yash Sharma commented on OFBIZ-10343: - Adding the first patch for framework > base package. Please have a look, will provide next patch soon. > Refactoring Variable Scope > > > Key: OFBIZ-10343 > URL: https://issues.apache.org/jira/browse/OFBIZ-10343 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10343.patch > > > Method and Variable access modifiers can be narrowed down to private access > modifier. Set assignments to type variables. Usage of the implicit style of > coding. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10343) Refactoring Variable Scope
[ https://issues.apache.org/jira/browse/OFBIZ-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-10343: Attachment: OFBIZ-10343.patch > Refactoring Variable Scope > > > Key: OFBIZ-10343 > URL: https://issues.apache.org/jira/browse/OFBIZ-10343 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Priority: Minor > Fix For: Trunk > > Attachments: OFBIZ-10343.patch > > > Method and Variable access modifiers can be narrowed down to private access > modifier. Set assignments to type variables. Usage of the implicit style of > coding. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10343) Refactoring Variable Scope
Pradhan Yash Sharma created OFBIZ-10343: --- Summary: Refactoring Variable Scope Key: OFBIZ-10343 URL: https://issues.apache.org/jira/browse/OFBIZ-10343 Project: OFBiz Issue Type: Improvement Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Fix For: Trunk Method and Variable access modifiers can be narrowed down to private access modifier. Set assignments to type variables. Usage of the implicit style of coding. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-6993) Cannot find the declaration of element 'web-app' in version 3.0 files.
[ https://issues.apache.org/jira/browse/OFBIZ-6993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16248479#comment-16248479 ] Pradhan Yash Sharma commented on OFBIZ-6993: I dig around this issue and found its related to xers and xalan, by default java support 1.6 version of JAXP [https://docs.oracle.com/javase/8/docs/technotes/guides/standards/index.html] For Digester to parse XML we need to clear contents of the current object. [http://commons.apache.org/proper/commons-digester/commons-digester-1.6/docs/api/org/apache/commons/digester/Digester.html] There is an XML problem with the Xerces and Xalan XML implementations, newer applications sometimes require newer versions of both libraries, and the classes have the same names, there is a classpath problem. To resolve this classpath should load newer version in Tomcat which can be done by Endorsed Mechanism [https://docs.oracle.com/javase/8/docs/technotes/guides/standards/index.html] I am working to look its integration with Gradle. > Cannot find the declaration of element 'web-app' in version 3.0 files. > -- > > Key: OFBIZ-6993 > URL: https://issues.apache.org/jira/browse/OFBIZ-6993 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: Trunk, Release Branch 15.12 > Environment: Been seeing the error below in the logs. Strangely, > I've not been able to catch the exception in a debugger, but was able to > isolate it to the definition of the web-app with version 3.0. The error > disapears when you change the definition from > {code:xml} > > {code} > to this: > {code:xml} > xmlns="http://java.sun.com/xml/ns/javaee; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd;> > {code} > I only tested on 15.12 and Trunk, but it probably affects any release running > Tomcat 7.0.48 or higher. Here is the error: > {noformat} > [java] Apr 07, 2016 4:06:29 PM org.apache.tomcat.util.digester.Digester > error > [java] SEVERE: Parse Error at line 22 column 24: cvc-elt.1.a: Cannot > find the declaration of element 'web-app'. > [java] org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 24; > cvc-elt.1.a: Cannot find the declaration of element 'web-app'. > [java] at > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown > Source) > [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown > Source) > [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > Source) > [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > Source) > [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > Source) > [java] at > org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown > Source) > [java] at > org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) > [java] at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElementAfterName(Unknown > Source) > [java] at > org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown > Source) > [java] at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown > Source) > [java] at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source) > [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) > [java] at > org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) > [java] at > org.apache.tomcat.util.digester.Digester.parse(Digester.java:1555) > [java] at > org.ofbiz.webapp.WebAppUtil.parseWebXmlFile(WebAppUtil.java:160) > [java] at org.ofbiz.webapp.WebAppUtil.getWebXml(WebAppUtil.java:131) > [java] at > org.ofbiz.webapp.WebAppUtil.getControlServletPath(WebAppUtil.java:67) > [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [java] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > [java] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > [java] at java.lang.reflect.Method.invoke(Method.java:498) > [java] at > freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:1458) > [java] at >
[jira] [Commented] (OFBIZ-9488) Usage of factory method or Builder pattern for Locale object creation and usage.
[ https://issues.apache.org/jira/browse/OFBIZ-9488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16207531#comment-16207531 ] Pradhan Yash Sharma commented on OFBIZ-9488: Hello Jacques, The Java Programming language contains internationalization support for language tags, language tag filtering, and language tag lookup. These features are specified by IETF BCP 47. A builder is used to build instances of Locale from values configured by the setters. Unlike the Locale constructors, the Builder checks if a value configured by a setter satisfies the syntax requirements defined by the Locale class. A Locale object created by a Builder is well-formed and can be transformed to a well-formed IETF BCP 47 language tag without losing information. Please refer this link for more detail https://docs.oracle.com/javase/7/docs/api/java/util/Locale.Builder.html. I've also created a sub ticket for implementing the same. Thanks for raising this concern it will help others also. > Usage of factory method or Builder pattern for Locale object creation and > usage. > > > Key: OFBIZ-9488 > URL: https://issues.apache.org/jira/browse/OFBIZ-9488 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: 16.11.03 >Reporter: Pradhan Yash Sharma >Assignee: Deepak Dixit >Priority: Minor > Fix For: Upcoming Release > > Attachments: OFBIZ-9488.patch, OFBIZ-9488.patch > > > Usage of factory method or Builder pattern for Locale object creation and > usage. > Locale aLocale = Locale.forLanguageTag("en-US"); > Locale bLocale = new > Locale.Builder().setLanguage("en").setRegion("US").build(); > https://docs.oracle.com/javase/tutorial/i18n/locale/index.html > There are many instances on which new Locale() is used instead of this we can > use UtilMisc.ensureLocale() -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (OFBIZ-9855) Using try-with-resources with File IO Objects.
[ https://issues.apache.org/jira/browse/OFBIZ-9855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-9855: --- Attachment: OFBIZ-9855.patch Attaching first patch file. > Using try-with-resources with File IO Objects. > -- > > Key: OFBIZ-9855 > URL: https://issues.apache.org/jira/browse/OFBIZ-9855 > Project: OFBiz > Issue Type: Bug >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Minor > Attachments: OFBIZ-9855.patch > > > Proposal to use try with resources for File IO objects like ObjectInputStream > and other objects. File classes have the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (OFBIZ-9855) Using try-with-resources with File IO Objects.
Pradhan Yash Sharma created OFBIZ-9855: -- Summary: Using try-with-resources with File IO Objects. Key: OFBIZ-9855 URL: https://issues.apache.org/jira/browse/OFBIZ-9855 Project: OFBiz Issue Type: Bug Reporter: Pradhan Yash Sharma Assignee: Pradhan Yash Sharma Priority: Minor Proposal to use try with resources for File IO objects like ObjectInputStream and other objects. File classes have the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9839) Using try-with-resources with JDBC objects
[ https://issues.apache.org/jira/browse/OFBIZ-9839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16207021#comment-16207021 ] Pradhan Yash Sharma commented on OFBIZ-9839: Hello, While I was traversing the code found that these four (getTableNames, getColumnInfo, getIndexInfo, getReferenceInfo) methods are complicated and need refactoring. Proper resource handling is required and but due to its complex nature I cannot do it now, I am working in that direction. > Using try-with-resources with JDBC objects > -- > > Key: OFBIZ-9839 > URL: https://issues.apache.org/jira/browse/OFBIZ-9839 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > Attachments: OFBIZ-9839.patch, OFBIZ-9839.patch > > > Proposal to use try with resources for SQL objects like ResultSet and other > objects. SQL classes have AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (OFBIZ-9839) Using try-with-resources with JDBC objects
[ https://issues.apache.org/jira/browse/OFBIZ-9839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-9839: --- Attachment: OFBIZ-9839.patch Attaching the second Patch file. > Using try-with-resources with JDBC objects > -- > > Key: OFBIZ-9839 > URL: https://issues.apache.org/jira/browse/OFBIZ-9839 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > Attachments: OFBIZ-9839.patch, OFBIZ-9839.patch > > > Proposal to use try with resources for SQL objects like ResultSet and other > objects. SQL classes have AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Closed] (OFBIZ-9841) Implement AutoCloseable interface in SQLProcessor Class
[ https://issues.apache.org/jira/browse/OFBIZ-9841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma closed OFBIZ-9841. -- Resolution: Fixed Closing this ticket. > Implement AutoCloseable interface in SQLProcessor Class > --- > > Key: OFBIZ-9841 > URL: https://issues.apache.org/jira/browse/OFBIZ-9841 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Trivial > Fix For: Trunk > > Attachments: OFBIZ-9841.patch, OFBIZ-9841.patch > > > Implement SQLProcessor class with the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9841) Implement AutoCloseable interface in SQLProcessor Class
[ https://issues.apache.org/jira/browse/OFBIZ-9841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16203774#comment-16203774 ] Pradhan Yash Sharma commented on OFBIZ-9841: Thank you, Jacques, Yes, I agree with you, I have updated the ticket and closed it. > Implement AutoCloseable interface in SQLProcessor Class > --- > > Key: OFBIZ-9841 > URL: https://issues.apache.org/jira/browse/OFBIZ-9841 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Trivial > Fix For: Trunk > > Attachments: OFBIZ-9841.patch, OFBIZ-9841.patch > > > Implement SQLProcessor class with the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (OFBIZ-9841) Implement AutoCloseable interface in SQLProcessor Class
[ https://issues.apache.org/jira/browse/OFBIZ-9841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-9841: --- Priority: Trivial (was: Critical) > Implement AutoCloseable interface in SQLProcessor Class > --- > > Key: OFBIZ-9841 > URL: https://issues.apache.org/jira/browse/OFBIZ-9841 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Trivial > Fix For: Trunk > > Attachments: OFBIZ-9841.patch, OFBIZ-9841.patch > > > Implement SQLProcessor class with the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (OFBIZ-9841) Implement AutoCloseable interface in SQLProcessor Class
[ https://issues.apache.org/jira/browse/OFBIZ-9841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-9841: --- Issue Type: Improvement (was: Bug) > Implement AutoCloseable interface in SQLProcessor Class > --- > > Key: OFBIZ-9841 > URL: https://issues.apache.org/jira/browse/OFBIZ-9841 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Trivial > Fix For: Trunk > > Attachments: OFBIZ-9841.patch, OFBIZ-9841.patch > > > Implement SQLProcessor class with the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9841) Implement AutoCloseable interface in SQLProcessor Class
[ https://issues.apache.org/jira/browse/OFBIZ-9841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16203584#comment-16203584 ] Pradhan Yash Sharma commented on OFBIZ-9841: Added AutoCloseable interface to SQLProcessor class and overridden Close method, Added closing of ResultSet, PreparedStatement and Connection Objects. While calling SQLProcessor object in GenericDAO used Try-with-Resources and removed unnecessary calls of the same object before actual use, also removed finally blocks for method invocation. > Implement AutoCloseable interface in SQLProcessor Class > --- > > Key: OFBIZ-9841 > URL: https://issues.apache.org/jira/browse/OFBIZ-9841 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Critical > Fix For: Trunk > > Attachments: OFBIZ-9841.patch, OFBIZ-9841.patch > > > Implement SQLProcessor class with the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (OFBIZ-9841) Implement AutoCloseable interface in SQLProcessor Class
[ https://issues.apache.org/jira/browse/OFBIZ-9841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-9841: --- Attachment: OFBIZ-9841.patch Attaching patch file. > Implement AutoCloseable interface in SQLProcessor Class > --- > > Key: OFBIZ-9841 > URL: https://issues.apache.org/jira/browse/OFBIZ-9841 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Critical > Fix For: Trunk > > Attachments: OFBIZ-9841.patch > > > Implement SQLProcessor class with the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (OFBIZ-9841) Implement AutoCloseable interface in SQLProcessor Class
Pradhan Yash Sharma created OFBIZ-9841: -- Summary: Implement AutoCloseable interface in SQLProcessor Class Key: OFBIZ-9841 URL: https://issues.apache.org/jira/browse/OFBIZ-9841 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Assignee: Pradhan Yash Sharma Priority: Critical Fix For: Trunk Implement SQLProcessor class with the AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (OFBIZ-9839) Using try-with-resources with JDBC objects
[ https://issues.apache.org/jira/browse/OFBIZ-9839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-9839: --- Attachment: OFBIZ-9839.patch Attaching the first Patch. > Using try-with-resources with JDBC objects > -- > > Key: OFBIZ-9839 > URL: https://issues.apache.org/jira/browse/OFBIZ-9839 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > Attachments: OFBIZ-9839.patch > > > Proposal to use try with resources for SQL objects like ResultSet and other > objects. SQL classes have AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (OFBIZ-9839) Using try-with-resources with JDBC objects
Pradhan Yash Sharma created OFBIZ-9839: -- Summary: Using try-with-resources with JDBC objects Key: OFBIZ-9839 URL: https://issues.apache.org/jira/browse/OFBIZ-9839 Project: OFBiz Issue Type: Improvement Components: framework Affects Versions: Trunk Reporter: Pradhan Yash Sharma Assignee: Pradhan Yash Sharma Proposal to use try with resources for SQL objects like ResultSet and other objects. SQL classes have AutoCloseable interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9827) Components loading twice while starting OFBiz
[ https://issues.apache.org/jira/browse/OFBIZ-9827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16199973#comment-16199973 ] Pradhan Yash Sharma commented on OFBIZ-9827: Hi Taher, I was looking through log files and went on some wrong assumptions, neither components nor webapps are loading twice as task repetition was so frequent that I assumed the whole webapp is loading twice. Task spawned after these two processes are repeating as shown in logs. Thank you for looking into this and helping me out to drill down the problem, I am looking into it will share Root Cause and Analysis of why some SECAs are loading multiple times or to be very precise why some jobs submitted to Execution pool are loading twice. > Components loading twice while starting OFBiz > - > > Key: OFBIZ-9827 > URL: https://issues.apache.org/jira/browse/OFBIZ-9827 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12, > Release Branch 16.11 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > Attachments: logs.tar.gz > > > Components loading multiple times while OFBiz starts. > While CatalinaContainer loads webapps it creates the future task, which loads > more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (OFBIZ-9827) Components loading twice while starting OFBiz
[ https://issues.apache.org/jira/browse/OFBIZ-9827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16197013#comment-16197013 ] Pradhan Yash Sharma edited comment on OFBIZ-9827 at 10/9/17 2:00 PM: - Hello Taher, I am working to explore this issue in depth, webResourceInfos are loading correctly as per my observations till now (I may be wrong). OFBiz loads components and webapps via the future task. which is the starting point. Then it loads ServiceEcaUtil, EntityEcaUtil and DispatchContext through GLOBAL_FORK_JOIN these internally uses UtilCache which uses CacheLine which has expired time added to every line item. kJoinPool-1-worker-0 comes and picks a task and start executing, while Cache item is expired and reloaded, kJoinPool-1-worker-1 comes and sees items into the list and starts executing the same job (I guess here is the catch!!!). Complete webapp component is not loaded twice only a few items of the webapp is loaded. I am attaching my logs please have a look at item : {code} 2017-10-09 19:14:24,828 |kJoinPool-1-worker-1 |ServiceEcaUtil |I| Loaded [10] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/applications/marketing/servicedef/secas.xml 2017-10-09 19:14:25,947 |kJoinPool-1-worker-3 |ServiceEcaUtil |I| Loaded [10] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/applications/marketing/servicedef/secas.xml 2017-10-09 19:14:24,812 |kJoinPool-1-worker-0 |ServiceEcaUtil |I| Loaded [3] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/framework/common/servicedef/secas_test.xml 2017-10-09 19:14:25,925 |kJoinPool-1-worker-3 |ServiceEcaUtil |I| Loaded [3] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/framework/common/servicedef/secas_test.xml 2017-10-09 19:14:26,833 |0.0.0.0-startStop-1 |SeoConfigUtil |I| Parsing ^.*/.*$ 2017-10-09 19:14:28,483 |0.0.0.0-startStop-1 |SeoConfigUtil |I| Parsing ^.*/.*$ {code} Please refer the attached logs.tar.gz file for the logs files. was (Author: pradhanyashsharma): Hello Taher, I am working to explore this issue in depth, webResourceInfos are loading correctly as per my observations till now (I may be wrong). OFBiz loads components and webapps via the future task. which is the starting point. Then it loads ServiceEcaUtil, EntityEcaUtil and DispatchContext through GLOBAL_FORK_JOIN these internally uses UtilCache which uses CacheLine which has expired time added to every line item. kJoinPool-1-worker-0 comes and picks a task and start executing, while Cache item is expired and reloaded, kJoinPool-1-worker-1 comes and sees items into the list and starts executing the same job (I guess here is the catch!!!). Complete webapp component is not loaded twice only a few items of the webapp is loaded. I am attaching my logs please have a look at item : 2017-10-09 19:14:24,828 |kJoinPool-1-worker-1 |ServiceEcaUtil |I| Loaded [10] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/applications/marketing/servicedef/secas.xml 2017-10-09 19:14:25,947 |kJoinPool-1-worker-3 |ServiceEcaUtil |I| Loaded [10] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/applications/marketing/servicedef/secas.xml 2017-10-09 19:14:24,812 |kJoinPool-1-worker-0 |ServiceEcaUtil |I| Loaded [3] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/framework/common/servicedef/secas_test.xml 2017-10-09 19:14:25,925 |kJoinPool-1-worker-3 |ServiceEcaUtil |I| Loaded [3] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/framework/common/servicedef/secas_test.xml 2017-10-09 19:14:26,833 |0.0.0.0-startStop-1 |SeoConfigUtil |I| Parsing ^.*/.*$ 2017-10-09 19:14:28,483 |0.0.0.0-startStop-1 |SeoConfigUtil |I| Parsing ^.*/.*$ Please refer the attached logs.tar.gz file for the logs files. > Components loading twice while starting OFBiz > - > > Key: OFBIZ-9827 > URL: https://issues.apache.org/jira/browse/OFBIZ-9827 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12, > Release Branch 16.11 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > Attachments: logs.tar.gz > > > Components loading multiple times while OFBiz starts. > While CatalinaContainer loads webapps it creates the future task, which loads > more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9827) Components loading twice while starting OFBiz
[ https://issues.apache.org/jira/browse/OFBIZ-9827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16197013#comment-16197013 ] Pradhan Yash Sharma commented on OFBIZ-9827: Hello Taher, I am working to explore this issue in depth, webResourceInfos are loading correctly as per my observations till now (I may be wrong). OFBiz loads components and webapps via the future task. which is the starting point. Then it loads ServiceEcaUtil, EntityEcaUtil and DispatchContext through GLOBAL_FORK_JOIN these internally uses UtilCache which uses CacheLine which has expired time added to every line item. kJoinPool-1-worker-0 comes and picks a task and start executing, while Cache item is expired and reloaded, kJoinPool-1-worker-1 comes and sees items into the list and starts executing the same job (I guess here is the catch!!!). Complete webapp component is not loaded twice only a few items of the webapp is loaded. I am attaching my logs please have a look at item : 2017-10-09 19:14:24,828 |kJoinPool-1-worker-1 |ServiceEcaUtil |I| Loaded [10] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/applications/marketing/servicedef/secas.xml 2017-10-09 19:14:25,947 |kJoinPool-1-worker-3 |ServiceEcaUtil |I| Loaded [10] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/applications/marketing/servicedef/secas.xml 2017-10-09 19:14:24,812 |kJoinPool-1-worker-0 |ServiceEcaUtil |I| Loaded [3] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/framework/common/servicedef/secas_test.xml 2017-10-09 19:14:25,925 |kJoinPool-1-worker-3 |ServiceEcaUtil |I| Loaded [3] Service ECA Rules from file:/home/yash/sandbox/ofbiz-trunk/ofbiz-framework/framework/common/servicedef/secas_test.xml 2017-10-09 19:14:26,833 |0.0.0.0-startStop-1 |SeoConfigUtil |I| Parsing ^.*/.*$ 2017-10-09 19:14:28,483 |0.0.0.0-startStop-1 |SeoConfigUtil |I| Parsing ^.*/.*$ Please refer the attached logs.tar.gz file for the logs files. > Components loading twice while starting OFBiz > - > > Key: OFBIZ-9827 > URL: https://issues.apache.org/jira/browse/OFBIZ-9827 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12, > Release Branch 16.11 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > Attachments: logs.tar.gz > > > Components loading multiple times while OFBiz starts. > While CatalinaContainer loads webapps it creates the future task, which loads > more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (OFBIZ-9827) Components loading twice while starting OFBiz
[ https://issues.apache.org/jira/browse/OFBIZ-9827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-9827: --- Attachment: logs.tar.gz Attaching compressed log files directory. > Components loading twice while starting OFBiz > - > > Key: OFBIZ-9827 > URL: https://issues.apache.org/jira/browse/OFBIZ-9827 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12, > Release Branch 16.11 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > Attachments: logs.tar.gz > > > Components loading multiple times while OFBiz starts. > While CatalinaContainer loads webapps it creates the future task, which loads > more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9827) Components loading twice while starting OFBiz
[ https://issues.apache.org/jira/browse/OFBIZ-9827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16196618#comment-16196618 ] Pradhan Yash Sharma commented on OFBIZ-9827: Hello Taher, I am using Machine with 4 core for now and using ./gradlew ofbiz command to kick off OFBIz and using Debug.log to put messages on console and looking into it. Adding logs at CatalinaContainer loadWebapps and scheduled jobs ExecutionPool helps to check. > Components loading twice while starting OFBiz > - > > Key: OFBIZ-9827 > URL: https://issues.apache.org/jira/browse/OFBIZ-9827 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12, > Release Branch 16.11 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > > Components loading multiple times while OFBiz starts. > While CatalinaContainer loads webapps it creates the future task, which loads > more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9827) Components loading twice while starting OFBiz
[ https://issues.apache.org/jira/browse/OFBIZ-9827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16195628#comment-16195628 ] Pradhan Yash Sharma commented on OFBIZ-9827: Hi Taher, I used physical systems to test this behaviour with 2 and 4 core. Yes, I guess would have used taskset or numactl it would be much easier. For debugging I used Intellj idea default debugger and used console logs to confirm that. If any tool you would like to suggest that would be great. > Components loading twice while starting OFBiz > - > > Key: OFBIZ-9827 > URL: https://issues.apache.org/jira/browse/OFBIZ-9827 > Project: OFBiz > Issue Type: Bug > Components: framework >Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12, > Release Branch 16.11 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma > > Components loading multiple times while OFBiz starts. > While CatalinaContainer loads webapps it creates the future task, which loads > more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (OFBIZ-9827) Components loading twice while starting OFBiz
Pradhan Yash Sharma created OFBIZ-9827: -- Summary: Components loading twice while starting OFBiz Key: OFBIZ-9827 URL: https://issues.apache.org/jira/browse/OFBIZ-9827 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: Release Branch 16.11, Release Branch 15.12, Trunk, Release Branch 14.12 Reporter: Pradhan Yash Sharma Assignee: Pradhan Yash Sharma Components loading multiple times while OFBiz starts. While CatalinaContainer loads webapps it creates the future task, which loads more than once (depends on numbers of System cores and speed). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (OFBIZ-9490) Update UtilMisc.formatRuleBasedAmount() method to take rules and ruleSet and formatting can be done, rather than system providing all ruleset support.
[ https://issues.apache.org/jira/browse/OFBIZ-9490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma updated OFBIZ-9490: --- Attachment: OFBIZ_9490.patch Added override method for formatRuleBasedAmount with params amount, rule and locale > Update UtilMisc.formatRuleBasedAmount() method to take rules and ruleSet and > formatting can be done, rather than system providing all ruleset support. > -- > > Key: OFBIZ-9490 > URL: https://issues.apache.org/jira/browse/OFBIZ-9490 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: 16.11.03 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Minor > Fix For: Upcoming Release > > Attachments: OFBIZ_9490.patch, OFBIZ-9490.patch > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Reopened] (OFBIZ-9490) Update UtilMisc.formatRuleBasedAmount() method to take rules and ruleSet and formatting can be done, rather than system providing all ruleset support.
[ https://issues.apache.org/jira/browse/OFBIZ-9490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradhan Yash Sharma reopened OFBIZ-9490: Assignee: Pradhan Yash Sharma (was: Arun Patidar) > Update UtilMisc.formatRuleBasedAmount() method to take rules and ruleSet and > formatting can be done, rather than system providing all ruleset support. > -- > > Key: OFBIZ-9490 > URL: https://issues.apache.org/jira/browse/OFBIZ-9490 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: 16.11.03 >Reporter: Pradhan Yash Sharma >Assignee: Pradhan Yash Sharma >Priority: Minor > Fix For: Upcoming Release > > Attachments: OFBIZ-9490.patch > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)