Commit Graph
2018 Commits
Author SHA1 Message Date
Arun Patidar ff3653ed11 Applied fix from trunk for revision: 1825216
===

Improved:Update regex used for validating credit cards.
(OFBIZ-9761)
Thanks Amit Gadaley for your contribution and Michael Brohl for reviewing patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1825217 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 11:33:31 +00:00
Jacques Le Roux d0735d2181 "Applied fix from trunk for revision: 1824803 "
------------------------------------------------------------------------
r1824803 | jleroux | 2018-02-19 20:23:36 +0100 (lun., 19 févr. 2018) | 18 lines

Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

Logout method do not disable autoLogin functionality. 
Instead of that it just initializes autoLogin in session and request.

jleroux: this was also needed by OFBIZ-10206 "Security issue in Token Based 
Authentication". 
This creates a keep-autologin-cookie boolean attribute in the webapp element of 
the  ofbiz-component.xml, documented in ofbiz-component.xsd
This attribute is used to get the value from the ofbiz-component.xml files in a
new autoLogoutCleanCookies() LoginWorker method. This method is used not only 
when login out but also when login in. This to be sure that in every cases the 
cookies related to the webapps are removed.
For now only the ecommerce, ecomseo et webpos webapps are keeping and using 
their autologin cookies

Thanks: Roberto Benítez Monje for report and Taher for discussion and suggestion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824804 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 19:24:14 +00:00
Jacques Le Roux 45f5c24ed0 "Applied fix from trunk for revision: 1823876"
------------------------------------------------------------------------
r1823876 | jleroux | 2018-02-11 19:51:07 +0100 (dim., 11 févr. 2018) | 9 lines

Fixed: UtilNumber.getBigDecimalRoundingMode() returns a wrong value
(OFBIZ-10218)

While working on OFBIZ-9571 I found that getBigDecimalRoundingMode() returns  
DEFAULT_BD_SCALE when the passed value for the file parameter is emtpy. 
This has certainly be C/P from getBigDecimalScale() and never found before.

While at it I refactored a bit getBigDecimalRoundingMode()  and 
getBigDecimalScale() 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823877 13f79535-47bb-0310-9956-ffa450edef68
2018-02-11 18:51:37 +00:00
Jacques Le Roux ce7094e6e6 "Applied fix from trunk for revision: 1821036 "
------------------------------------------------------------------------
r1821036 | jleroux | 2018-01-12 22:59:22 +0100 (ven., 12 janv. 2018) | 11 lines

Fixed: streaming large content cause out of memory exception.
(OFBIZ-10133)

When ofbiz streams a large content (eg. video file), get out of memory exception.

To reproduce the issue see the Jira

jleroux: I just removed final for bufferSize, I see no needs for that local
variable

Thanks: Wai for the patch Michael for the discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821037 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 22:00:22 +00:00
Jacques Le Roux 615001dda6 "Applied fix from trunk for revision: 1820966 "
------------------------------------------------------------------------
r1820966 | jleroux | 2018-01-12 12:24:48 +0100 (ven., 12 janv. 2018) | 9 lines

Fixed: Correcting findOne() in OfbizDslDescriptorForEclipse.dsld
(OFBIZ-10159)

The method findOne() which is set in the OfbizDslDescriptorForEclipse.dsld is 
wrong, since there is no implementation for this method, which only has a String 
and a List as parameters. I changed it to the correct method, so it can be used 
within groovy properly, also I put an implementation in the GroovyBaseScriptFile

Thanks: Dennis Balkir
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820967 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 11:27:34 +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 98ee1e4f01 Improved: Fixing defects reported by code analysis tools, package
org.apache.ofbiz.base.util.string.
(OFBIZ-10097)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818677 13f79535-47bb-0310-9956-ffa450edef68
2017-12-19 15:19:10 +00:00
Jacques Le Roux 1c1d7dca60 No functional change, puts back this comment after r1818495, it may helps
sometimes, but better be verbose and tested, else it's too much

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818574 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 14:11:26 +00:00
Jacques Le Roux a8d6883644 No functional change, puts back this comment after r1818495, it may helps
sometimes

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818571 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 14:07:58 +00:00
Michael Brohl 4c7f71a9f8 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.concurrent.
(OFBIZ-9928)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818547 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 10:11:40 +00:00
Michael Brohl e489038c59 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.conversion.
(OFBIZ-9929)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818546 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 10:09:55 +00:00
Michael Brohl 7e765af8f9 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.lang.
(OFBIZ-9931)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818543 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 09:41:33 +00:00
Michael Brohl 95b2e68ac7 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.config.
(OFBIZ-9935)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818539 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 09:23:30 +00:00
Michael Brohl 61ba2c6f5b Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.metrics.
(OFBIZ-9936)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818536 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 09:20:22 +00:00
Nicolas Malin 06dda4ae17 Fixed: Massive stacktraces in JuelConnector.
Added a constraint to verbose logging to avoid logging too much.

Complete the revision 1818498

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818510 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 20:01:06 +00:00
Michael Brohl a9cd441fc3 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.test.
(OFBIZ-9938)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818505 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 19:00:31 +00:00
Michael Brohl 90b6706b2c Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.util.cache.
(OFBIZ-9939)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818504 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 18:57:17 +00:00
Michael Brohl 4ec7fb0588 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.util.cache.test.
(OFBIZ-9940)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818503 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 18:55:31 +00:00
Michael Brohl 80a852fcdf Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.util.template.
(OFBIZ-9941)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818502 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 18:54:10 +00:00
Michael Brohl 57f1e05e77 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.crypto.
(OFBIZ-9942)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818501 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 18:51:18 +00:00
Michael Brohl d3580da466 Fixed: Massive stacktraces in JuelConnector.
Added a constraint to verbose logging to avoid logging too much.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818498 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 18:08:53 +00:00
Michael Brohl 960394e6c2 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.util.
(OFBIZ-9944)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818495 13f79535-47bb-0310-9956-ffa450edef68
2017-12-17 16:57:56 +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
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 735f946b83 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes r1818020, there were still few cases, a last review is never too
much

In PriceServices, I spotted
  for (GenericValue orderItemPriceInfo: orderItemPriceInfos) {
      if (Debug.verboseOn()) Debug.logVerbose(" --- " + orderItemPriceInfo
but it's OK with me, this should be rarely used, so not a perf issue


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818075 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 22:24:25 +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
Michael Brohl e0a296741b Improved: removed unused imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818008 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 13:04:27 +00:00
Michael Brohl bb3fff1b21 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.base.util.string.
(OFBIZ-9700)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818007 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 13:03:03 +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
Michael Brohl 2d13c73a02 Reverted: Fixing defects reported by FindBugs, package
org.apache.ofbiz.base.util.string.
(OFBIZ-9700)

There is an Exception being thrown during the tests, reverting and
investigating further.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817963 13f79535-47bb-0310-9956-ffa450edef68
2017-12-12 22:32:00 +00:00
Michael Brohl 216226db9b Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.base.util.string.
(OFBIZ-9700)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817935 13f79535-47bb-0310-9956-ffa450edef68
2017-12-12 16:41:06 +00:00
Michael Brohl bae1848cd8 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.component.
(OFBIZ-9872)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817883 13f79535-47bb-0310-9956-ffa450edef68
2017-12-12 06:26:29 +00:00
Michael Brohl 3c8804772d Reverted: General refactoring and code improvements, package
org.apache.ofbiz.base.component.
(OFBIZ-9872)

The patches were modified to remove Debug.is[Loglevel]On()
conditions. It is better to keep them for better runtime performance.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817882 13f79535-47bb-0310-9956-ffa450edef68
2017-12-12 06:24:37 +00:00
Michael Brohl 4f48862e29 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.component.
(OFBIZ-9872)

The patches were modified to remove unnecessary Debug.is[Loglevel]On()
conditions, see OFBIZ-10049.

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817750 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 07:54:13 +00:00
Michael Brohl ca83629678 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.container.
(OFBIZ-9861)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817744 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 06:41:08 +00:00
Michael Brohl 7cc0b229a6 Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.util.collections.
(OFBIZ-9860)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817743 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 06:34:02 +00:00
Jacques Le Roux 48a2f6dc8b Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

While reviewing recent Michael's FB commits I spotted a bunch of (unrelated) 
swallowed exceptions. This fixes them

Also few formatting and use of multi catches



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817703 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 12:00:07 +00:00
Michael Brohl a5947f39ed Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.base.util.test.
(OFBIZ-9722)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817568 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 21:05:00 +00:00
Jacques Le Roux cc50483f1d Implemented: Add logVerbose to GroovyBaseScript.groovy
(OFBIZ-10025)

Thanks: Dennis Balkir 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817454 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 04:49:03 +00:00
Michael Brohl 86da261be5 Improved: Update build.gradle to the latest dependencies.
(OFBIZ-10026)

This is the first pass updating all possible dependencies. Apache Tomcat
is updated to the latest 8.5.24 version.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816968 13f79535-47bb-0310-9956-ffa450edef68
2017-12-02 17:27:31 +00:00
Nicolas Malin faadb7dca4 Fixed: forget to add the class GroovyScriptTestCase.java ans the simple groovy test-suite in the previous commit related to issue OFBIZ-9996
Correct introduced typo in framework/testtools/dtd/test-suite.xsd

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816345 13f79535-47bb-0310-9956-ffa450edef68
2017-11-25 20:05:29 +00:00
Nicolas Malin 48f90d5b74 Implemented: Implement Groovy test in testtools (OFBIZ-9996)
With the minilang deprecation and the migration to groovy, I implemented on the ofbiz testtools the possibility to use groovy for write new integration test or convert current simple xml test.
Now you can define a new element as child of test-group on your xml test-suite file like
        <groovy-test-suite name=simple location=component://base/groovyScript/test/SimpleTests.groovy/>

To Write your test, you need to create a Groovy class that extends GroovyScriptTestCase class :
    import org.apache.ofbiz.testtools.GroovyScriptTestCase
    class BaseTest extends GroovyScriptTestCase {
        void testTrue() {
            assert 1, 1
        }
    }
All your function will execute as TestCase.

For more information on groovy specific testing language see http://groovy-lang.org/testing.html

At this time the OFBiz Groovy DSL isn't supported to write groovy test case but you have access to the delegator and the disphatcher as native class variable.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816335 13f79535-47bb-0310-9956-ffa450edef68
2017-11-25 17:35:20 +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
Michael Brohl 002fe23568 Fixed: UtilMisc.ensureLocale does not always return a valid Locale.
(OFBIZ-9964)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814319 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 19:38:12 +00:00
Jacques Le Roux 6accef9785 No functional change, formatting while reviewing r1812049
Actually I'm unsure of how to present multiple expressions for autocloseables
in try blocks (here automatically done by my Eclipse formatter). This should be 
discussed with the community so we agreed on formatting rules to create an
official Eclipse formatter as being discussed at https://s.apache.org/0ptF

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813854 13f79535-47bb-0310-9956-ffa450edef68
2017-10-31 08:15:00 +00:00
Michael Brohl 59370de2bc Fixed: Wrong String comparisons introduced in r1812255.
Also changed the method name from isswitch to isSwitch.

Thanks to FindBugs for pointing me to this :-)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812794 13f79535-47bb-0310-9956-ffa450edef68
2017-10-20 22:33:13 +00:00
Deepak Dixit 829856e5f6 Improved: Usage of factory method or Builder pattern for Locale object creation and usage.
Thanks Yash Sharma for your contribution. (OFBIZ-9488)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812350 13f79535-47bb-0310-9956-ffa450edef68
2017-10-17 06:06:56 +00:00
Deepak Dixit 761959d47d Inconsistent String Comparisons, Applied patch for framework entityext, webapp, webtools and widgets classes.
Thanks Devanshu Vyas for your contribution (OFBIZ-9254)

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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812255 13f79535-47bb-0310-9956-ffa450edef68
2017-10-16 08:09:25 +00:00