(OFBIZ-10701)
In order to detect potential issues early, the linting compiler option should be
used by default and disabled with {{./gradlew -PXlint:none build}}.
Additionally it is important to reduce the number of warnings otherwise new
warnings will remain unnoticed.
The warning related to the com.googlecode.concurrentlinkedhashmap dependency
should resolves itself once we handle upgrade to Caffeine like proposed in
OFBIZ-6747.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10488)
Since Java 8 it is possible to instantiate functional interfaces
(interfaces with one non-static method) with lambda expressions instead
of anonymous classes.
This replaces the creation of callable objects with lambda expressions.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848514 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10593)
Remove visit methods from current EntityConditionBase type hierarchy.
Add or rewrite accept method in EntityCondition type hierachy.
Add documentation in EntityConditionVisitor, introducing implementation examples.
Add junit test validating documented examples.
Thanks to Mathieu Lirzin for your contribution, and Jacques for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1843780 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10008)
No configurations is available to disable usage of EntitySyncRemove.
And it's creating problems when having a large database and frequent delete
operations.
saveEntitySyncRemoveInfo is used to create EntitySyncRemove records in
GenericDelegator.removeValue() and removeByPrimaryKey().
This adds a mechanism to prevent the usage of EntitySyncRemove by adding a
property in general.properties file used to configure in entityengine.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835296 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7112)
Remove useless redundant code.
results map is already initialised in the beginning with isExistInDb
as "N" and value as "".
These values only changed when systemProperty != null. S
o except for this condition if we return results at any point it will have
isExistInDb as "N" and value as "".
If we remove the lines I removed in the patch, it will only remove put
operations that are not necessary.
Thanks: Aditya
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1828217 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-1032)
Karl:
Avoids rollback on create error to be able to store the entity instead
(previous mostly-inserts feature).
Matin:
I think, the data load with "mostly inserts" activated should fail on a
create-failure (what it does indeed already), so I see no need for a working
solution of a fallback store attempt. Consistently the Feature should be renamed
in the frontend from "mostly inserts" to "only inserts".
Kyra:
Additional trivial refactoring in the patch: I reduced the full qualified
classname of org.xml.sax.SAXException in method signatures to the simple name.
This incorperates the changes that Martin has mentioned above.
The unnecessary call to store() is removed, simplifying the process of creating
and deleting entities. (These changes were already in Martins old patch but had
the wrong format.) This means that the flag "mostly Inserts?" is not accurately
worded since as long as there is only create fail, all operations are rolled
back. So the second patch renames the flag and all appropriate parameters to
"onlyInserts".
jleroux: I made few no functional changes, apart not swallowing an exception
Thanks: Thanks Karl for the 1st patch, Martin to get further, and Kyra to
complete the whole with a final touch and help to quickly test
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822310 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10052)
This completes the work done so far by removing double check in cases not using
brackets, like
if (Debug.verboseOn())
if (Debug.verboseOn()) Debug.logVerbose()
Thanks: Michael for reporting this case I missed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818445 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10052)
This completes r1818075, there were still few cases, a last regexp search is
never too much :)
Found 4 other loops with Strings concatenation, but who cares, it's only
verbose logging...
There should not be anymore...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818077 13f79535-47bb-0310-9956-ffa450edef68
They obviously have been done with automated formatting (big formatted block).
Someone should check it's formatting width notably for comments and maybe JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817798 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.entity.datasource.
(OFBIZ-9723)
Did some additional cleanup by removing commented out code.
Thanks Julian Leichert for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817570 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8341)
While reviewing r1812057 I spotted a bunch of swallowed ClassCastExceptions
I then reviewed all ClassCastExceptions and this fixes all of them with a
minimal logging
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1815797 13f79535-47bb-0310-9956-ffa450edef68
Reason: When the field is encrypted with the old algorithm (3-DES), the new Shiro code will fail to decrypt it (using AES) and then it will
throw an org.apache.shiro.crypto.CryptoException that is a RuntimeException.
For backward compatibility we want instead to catch the exception and decrypt the code using the old algorithm.
This has been discussed at https://s.apache.org/b520
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814704 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9919)
Using a dynamic view entity containing groupBy clause and after calling
getCompleteList method, I am getting an error and it got fixed when I removed
that ArrayList sizing.
IMO, it might be occurring due to improper size initialization and I see no
reason for this and it is handled in ArrayList dynamically.
jleroux: moreover there is not much gain for cases where the pre-allocation
makes sense
Thanks: Suraj Khurana
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814561 13f79535-47bb-0310-9956-ffa450edef68