(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
(OFBIZ-9839)
Use try with resources for SQL objects like ResultSet and other objects.
SQL classes have AutoCloseable interface.
Thanks: Pradhan Yash Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812466 13f79535-47bb-0310-9956-ffa450edef68
(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.
Thanks: Pradhan Yash Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812144 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9839)
Use try with resources for SQL objects like ResultSet and other objects.
SQL classes have AutoCloseable interface.
Thanks: Pradhan Yash Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812104 13f79535-47bb-0310-9956-ffa450edef68