Commit Graph
1316 Commits
Author SHA1 Message Date
Jacques Le Roux d8e24334e9 "Applied fix from trunk for revision: 1822310 "
------------------------------------------------------------------------
r1822310 | jleroux | 2018-01-26 16:13:42 +0100 (ven., 26 janv. 2018) | 29 lines

Fixed: EntitySaxReader mostly-insert (store after create-error) Fix
(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/branches/release17.12@1822311 13f79535-47bb-0310-9956-ffa450edef68
2018-01-26 15:14:54 +00:00
Deepak Dixit 14b5abd4bd Applied fix from trunk for revision: 1822125
===

Improved:Removed unused import.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1822128 13f79535-47bb-0310-9956-ffa450edef68
2018-01-24 17:29:55 +00:00
Deepak Dixit fb77a3c477 Improved: Logging: change all System.out/.err/.. println to Debug.log... in the code base (OFBIZ-10045)
Thanks Michael Brohl and Kyra Pritzel-Hentley for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819124 13f79535-47bb-0310-9956-ffa450edef68
2017-12-23 09:08:04 +00:00
Michael Brohl 50c4bba4b2 Improved: Replace all "e.printStackTrace();" by calls to the Debug class.
(OFBIZ-10083)

Thanks Jacques Le Roux for reporting and Kyra Pritzel-Hentley 
for providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818921 13f79535-47bb-0310-9956-ffa450edef68
2017-12-21 12:33:04 +00:00
Michael Brohl f3a43c5c9e Improved: General refactoring and code improvements, package
org.apache.ofbiz.entity.cache.
(OFBIZ-9949)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818478 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 11:34:39 +00:00
Michael Brohl dd64039161 Improved: General refactoring and code improvements, package
org.apache.ofbiz.entity.serialize.
(OFBIZ-9951)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818476 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 11:27:15 +00:00
Michael Brohl b1bf88f68f Improved: General refactoring and code improvements, package
org.apache.ofbiz.entity.test.
(OFBIZ-9952)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818475 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 11:25:11 +00:00
Michael Brohl fc3c0d3780 Improved: General refactoring and code improvements, package
org.apache.ofbiz.entity.finder.
(OFBIZ-9953)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818474 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 11:19:19 +00:00
Michael Brohl f48b282587 Improved: General refactoring and code improvements, package
org.apache.ofbiz.entity.condition.
(OFBIZ-9956)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818469 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 10:37:49 +00:00
Michael Brohl 1cca5dc166 Improved: General refactoring and code improvements, package
org.apache.ofbiz.entity.
(OFBIZ-9957)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818468 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 09:56:54 +00:00
Jacques Le Roux d1bdee2c6c Improved: Always check if debug verbose is on when using Debug.logVerbose()
(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
2017-12-16 19:00:19 +00:00
Michael Brohl b41f78ae1a Improved: General refactoring and code improvements, package
org.apache.ofbiz.entity.transaction.
(OFBIZ-9962)

I added some additional debug conditions.

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818441 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 17:28:52 +00:00
Jacques Le Roux 4928bf3ae5 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(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
2017-12-13 22:37:16 +00:00
Jacques Le Roux 40e8be83df Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes r1818010, there were much more cases.
Also few tabs automatically replaced by spaces

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818020 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 14:11:38 +00:00
Jacques Le Roux 24b92d6921 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

As spotted by Nicolas and reported on dev ML there was a case w/ a double check
This removes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818010 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 13:09:52 +00:00
Jacques Le Roux e0d2057456 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

We discussed on this point: http://markmail.org/message/mplvusuqn7oshl4v 
and we agreed about better doing a check when using Debug.logVerbose().

I checked there are 300+ cases like that. Since it's an easy S/R 
This implements it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818005 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:43:05 +00:00
Deepak Dixit 7e19de9966 Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:03:17 +00:00
Deepak Dixit 63258e90f8 Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 10:42:32 +00:00
Deepak Dixit d1f85a7e5d Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:21:33 +00:00
Jacques Le Roux c872ac1813 No functional change, damned hard day reviewing, these formattings I wanted to
keep 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817803 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 18:06:40 +00:00
Jacques Le Roux eb39aa5420 Removes some formatting which were also automated (w/o my consent, I must have
missed it at some point :/)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817799 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 17:35:42 +00:00
Jacques Le Roux a608c7ded1 No functional change, redo some formatting by hand to make code more legible
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
2017-12-11 17:33:27 +00:00
Jacques Le Roux b2810ccd5f No functional changes, simply formatting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817700 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 11:41:59 +00:00
Michael Brohl c06f835668 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.jdbc.
(OFBIZ-9782)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817637 13f79535-47bb-0310-9956-ffa450edef68
2017-12-09 17:34:02 +00:00
Jacques Le Roux 0ab019569e No functional change, fixes a typo in comment
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817574 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 21:28:12 +00:00
Michael Brohl 6ff220a8ec Improved: Fixing defects reported by FindBugs, package
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
2017-12-08 21:13:26 +00:00
Michael Brohl f56feb90fa Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.util.
(OFBIZ-9720)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817562 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 20:49:28 +00:00
Michael Brohl 4af8b2491d Improved: removed unnecessary condition check.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817561 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 20:48:14 +00:00
Michael Brohl a72f027892 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.model.
(OFBIZ-9719)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817559 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 20:18:41 +00:00
Michael Brohl c02d9de3ab Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.connection.
(OFBIZ-9718)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817552 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 19:44:27 +00:00
Michael Brohl 29d09d0cd5 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.config.model.
(OFBIZ-9717)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817550 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 19:38:12 +00:00
Jacques Le Roux c1a11e83ae Fixed: Fix Default or Empty Catch block in Java and Groovy files
(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
2017-11-20 12:32:44 +00:00
Deepak Dixit 7976ea3ff3 Reverted: At r#1814155 RuntimeException was added to handle runtime exception as per pattern/best practise, but to maintain backward compatibility we need to handle Exception instead of throwing it.
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
2017-11-09 05:45:47 +00:00
Jacques Le Roux 5b311d6be2 Fixed: EntityListIterator.getComplateList returns error randomly
(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
2017-11-08 09:17:41 +00:00
Michael Brohl 4a698b614b Improved: Remove deprecated method
GenericDelegator.decryptFieldValue(String, String).
(OFBIZ-9916)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814327 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 22:23:20 +00:00
Michael Brohl fb12f1fb4d Fixed: Corrected wrong FindBugs/refactoring change introduced in
r1813640.
(OFBIZ-9716)

Thanks Suraj Khurana for reporting and Dennis Balkir for providing the
patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814230 13f79535-47bb-0310-9956-ffa450edef68
2017-11-03 17:47:41 +00:00
Deepak Dixit aae3cebccc Improved: Add ability to disable entity eca rule (OFBIZ-9897)
We have enabled flag in EntityEcaRule class, if its set false then entity eca rule will not be execute.
But there is not way to disable entity eca.

We can add enabled flag in Entity ECA definition to disable the existing entity eca rule.

    Add new attribute on entity eca tag named enabled
    Default value will be true for this.
    If user want to disable existing OOTB entity eca rule, then user can define same rule in custom component and set the enabled=false

Also as per current flow if same seca rule is define more then once, system will execute all the rule, ideally it should not execute same rule (same rule, condition and action) if its defined more than one.

Also need to ovride hasCode, equals and toString method for EntityEcaRule, EntityEcaAction and EntityEcaCondition class file.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814160 13f79535-47bb-0310-9956-ffa450edef68
2017-11-03 10:28:05 +00:00
Jacques Le Roux 4785a20bb5 No functional change, completes r1813964 as suggested on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814155 13f79535-47bb-0310-9956-ffa450edef68
2017-11-03 09:49:21 +00:00
Deepak Dixit 1738e721b8 Fixed: doDecrypt method may return ClassNotFoundException, BadPaddingException,so instead of handling GeneralException used Exception class to handle all exception
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813964 13f79535-47bb-0310-9956-ffa450edef68
2017-11-01 10:43:14 +00:00
Michael Brohl 89b36c49a8 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.
(OFBIZ-9716)

I modified the patch slightly.

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813640 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 15:19:56 +00:00
Michael Brohl 972cf88c01 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.condition.
(OFBIZ-9713)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813633 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 14:10:07 +00:00
Michael Brohl e687edb25f Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.finder.
(OFBIZ-9712)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813632 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 13:39:24 +00:00
Michael Brohl e3665de1f2 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.cache.
(OFBIZ-9711)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813631 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 13:36:26 +00:00
Michael Brohl 8392d41d95 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.transaction.
(OFBIZ-9707)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812915 13f79535-47bb-0310-9956-ffa450edef68
2017-10-22 13:27:03 +00:00
Michael Brohl a886588282 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.test.
(OFBIZ-9706)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812912 13f79535-47bb-0310-9956-ffa450edef68
2017-10-22 13:07:12 +00:00
Michael Brohl dfbf625956 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.serialize.
(OFBIZ-9705)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812910 13f79535-47bb-0310-9956-ffa450edef68
2017-10-22 13:03:31 +00:00
Jacques Le Roux a27122f819 Improved: Using try-with-resources with JDBC objects
(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
2017-10-18 07:56:49 +00:00
Deepak Dixit 2a8a37f308 Improved: Manage life span of SecurityGroupPermission entity.
Applied patch from jira issue(OFBIZ-9801) Thanks Suraj Khurana for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812383 13f79535-47bb-0310-9956-ffa450edef68
2017-10-17 10:47:47 +00:00
Deepak Dixit 0bff35af99 Inconsistent String Comparisons, Applied patch for framework entity classes.
Thanks Devanshu Vyas for your contribution (OFBIZ-9254)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812257 13f79535-47bb-0310-9956-ffa450edef68
2017-10-16 08:25:33 +00:00
Jacques Le Roux 8f74333bc3 Improved: Implement AutoCloseable interface in SQLProcessor Class
(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
2017-10-13 15:32:38 +00:00