Commit Graph
129 Commits
Author SHA1 Message Date
Jacques Le Roux 9c87fb85b1 Improved: Update build.gradle to the latest dependencies (OFBIZ-11903)
See
https://cwiki.apache.org/confluence/display/OFBIZ/About+OWASP+Dependency+Check
for libs not upgraded.
2020-07-21 10:42:14 +02:00
Suraj Khurana 51cb1d7958 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-plugins into trunk 2020-07-21 12:29:01 +05:30
Suraj Khurana 22ccc6801f Improved: Corrected some single line statements to fix checkstyle issues, also removed some remaining extra spaces from code to avoid checkstyle erros in plugins component.
(OFBIZ-11886)
2020-07-21 12:28:45 +05:30
Jacques Le Roux a0f7e77e77 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
Removes all error*.jsp reference, no longer used
2020-07-20 19:27:23 +02:00
Suraj Khurana e7ead3697f Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in plugins component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:14:42 +05:30
Suraj Khurana b18669cddc Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for plugins component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.

'{' is not followed by whitespace.

'}' is not followed by whitespace.

'}' is not preceded with whitespace.

'typecast' is not followed by whitespace.

'try' is not followed by whitespace.

';' is preceded with whitespace.
2020-07-11 14:27:09 +05:30
Suraj Khurana 6f264947c7 Improved: Corrected all checkstyle issues related to succeeding space for comma in plugins directory.
(OFBIZ-11805)
Thanks Jacques and Ritesh Kumar for review.
2020-07-09 12:02:54 +05:30
Suraj Khurana c24db772c9 Improved: Corrected all 'if is not followed by whitespace' checkstyle errors. Also corrected few ', is not followed by whitespace' checkstyle errors.
(OFBIZ-11805)
Thanks Jacques Le Roux and Ritesh Kumar for review.
2020-07-06 15:28:07 +05:30
Pawan Verma 1f97f89bae Improved: Merge identical catch blocks in single catch block(OFBIZ-11827)
In Java SE 7 and later, a single catch block can handle more than one type of exception. This feature can reduce code duplication and lessen the temptation to catch an overly broad exception.

Thanks: Jacques for the review.
2020-06-27 11:24:33 +05:30
Pawan Verma 32f3e468da Improved: Replace try-finally with try with resources(OFBIZ-11826)
Set checkstyleMain.maxErrors to 26678 (-4)

Thanks: Jacques for the review.
2020-06-22 21:37:00 +05:30
Suraj Khurana 9c447f2486 Improved: Enforce noninstantiability to LdapLoginWorker, OFBizSolrLoginWorker class. (#23)
(OFBIZ-11747)

Made class as final, added private constructor and made static variables as private.
2020-06-07 10:55:56 +05:30
Suraj Khurana ae31c01fa7 Improved: Change resources with proper naming convention in all plugin components.
(OFBIZ-11739)
Also, made MODULE as private data member of class instead of public. Thanks Jacques for review.
2020-05-29 13:14:02 +05:30
Pawan Verma f572e74e7e Improved: Used utility provided by OFBizTestCase class for userLogin instead of fetching from DB test cases also removed unused fetching of userLogin in some cases
(OFBIZ-11618)
2020-04-30 22:01:29 +05:30
Jacques Le Roux 1cacb15000 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

I tried to update to Groovy 3 but got a compile issue with commons-cli.
I did not dig further.
2020-04-21 12:00:32 +02:00
Jacques Le Roux 208ef1b1be Improved: replaces module by MODULE everywhere 2020-04-06 12:14:23 +02:00
Jacques Le Roux a42ac97ce9 Fixed: replaceFirst sensible to variable pattern
(OFBIZ-11396)

When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
2020-02-22 07:43:13 +01:00
Mathieu Lirzin 1158664ba3 Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)
These declarations avoid SAXParseException traceback when parsing web.xml
the first time in WebappUtil.parseWebXmlFile

A schema conformance issue has been fixed in ecommerce “web.xml”.
2019-12-07 22:52:30 +01:00
Jacques Le Roux 5d53e28b6d Fixed: Issue loading solr component (JNDI timeout)
(OFBIZ-11156)

We need to provide a JNDI environment property for Solr to load faster

Fixes previous commit where I hastily harcoded in jndi.properties file

Used a system property which can be used to define a JNDI environment 
property

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1865347 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 11:34:01 +00:00
Jacques Le Roux 6a30378f06 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11151)
We can update Guava to v28: 
https://mvnrepository.com/artifact/org.apache.solr/solr-core/8.2.0.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1865336 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 07:01:55 +00:00
Jacques Le Roux 4f19b762f3 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11151)

Like for OFBIZ-10922 some updates were not possible. Please refer to the Jira 
for more information

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1864973 13f79535-47bb-0310-9956-ffa450edef68
2019-08-12 15:03:03 +00:00
Mathieu Lirzin 5ae9892e4e Improved: Inline ‘UtilGenerics#checkList’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863492 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:22:24 +00:00
Mathieu Lirzin 31fa95fd91 Improved: Inline ‘UtilGenerics#checkMap’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863491 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:21:23 +00:00
Mathieu Lirzin 5154931f4f Improved: Inline ‘UtilGenerics#checkSet’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863490 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:20:16 +00:00
Mathieu Lirzin 60a8a7e900 Improved: Add missing ‘static’ modifier for private methods
(OFBIZ-11098)

In order to make it clear when a method is not depending on the
internal state of an object, it is a good practice to declare it as
static.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860939 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 12:36:52 +00:00
Mathieu Lirzin cfea3ca859 Improved: Use the ‘@Override’ annotation
(OFBIZ-10939)

The ‘@Override’ annotation helps readers understand that the method at
hand is overriding a super class or implementing an interface.
Additionally it allows the compiler to check if the methods annotated
with ‘@Override’ are actually implementing an abstract method.

Using that annotation makes ‘@see foo.bar.ParentClass#myMethod’
comments useless, so those they have been removed for the newly
annotated methods.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860028 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:44:25 +00:00
Mathieu Lirzin 0650a16d3b Improved: Remove useless null check
(OFBIZ-10054)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860026 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:42:50 +00:00
Mathieu Lirzin 9354ac2997 Improved: Remove redundant type declarations
(OFBIZ-10937)

Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is already done in the
declared type.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860025 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:42:00 +00:00
Jacques Le Roux c91becf3b2 Improved: Refactor boolean returns from methods
(OFBIZ-10725)

I was wondering if we should close. I just had a look and using this regexp:

if \(.*\) \{\R.*return true;

 I found
* 60 matches in applications
* 138 in framework
* 4 in plugins
I only checked the 1st two in applications and they really match

While at it this improves 3 of the 4 in plugins (the other is in a loop)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1858350 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 09:09:20 +00:00
Jacques Le Roux 844fc542d8 Fixed: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Following "Session timeout for webapps" discussion on dev ML 
https://markmail.org/message/p6fbiojjrwb2ybxd

We decided to put back the session-timeout value in web.xml files and to remove
the line
    session.setMaxInactiveInterval(60*60); //in seconds
from ControlEventListener.java

Thanks: Deepak Nigam for report and Girish Vasmatkar for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1851068 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:12:01 +00:00
Jacques Le Roux 695301d303 Improved: Fix or Silence various warnings
(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-plugins/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Jacques Le Roux 0b8e3f2290 Improved: Update Solr and Lucene from 7.3.1 to Solr 7.5.0
(OFBIZ-10589)

https://lucene.apache.org/solr/guide/7_5/solr-upgrade-notes.html 
should help people to adapt to 7.5 from 7.3

There are more information in the Jira

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1845150 13f79535-47bb-0310-9956-ffa450edef68
2018-10-29 17:26:25 +00:00
Suraj Khurana 04b720a946 Improved: Consistency and Readability improvements for condition tag.
(OFBIZ-8991)
Thanks Ankush Upadhyay for reporting and Devanshu Vyas for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1845075 13f79535-47bb-0310-9956-ffa450edef68
2018-10-29 06:35:15 +00:00
Jacques Le Roux 0cd8756918 Improved: Remove few request-map "edit" attributes in controllers
(OFBIZ-10608)

As documented, currently

    Reserved for future use (not used yet).

I checked, it's still not implemented. So no need to confuse people for now, 
better to remove until it's really used.




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844744 13f79535-47bb-0310-9956-ffa450edef68
2018-10-24 08:57:03 +00:00
Gil Portenseigne bd389e0fd0 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1837578 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:36:13 +00:00
Jacques Le Roux 066e64eac0 Improved: Update Solr and Lucene from 7.2.1 to Solr 7.3.1 for security reason
(CVE-2018-8010)
(OFBIZ-10415)

I'm not sure we are affected but better be safe than sorry
see 
SOLR-12316
https://wiki.apache.org/solr/SolrSecurity
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-8010

The Lucene and Solr tests pass

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1832533 13f79535-47bb-0310-9956-ffa450edef68
2018-05-30 11:04:35 +00:00
Jacques Le Roux 04121ce947 Improved: Update Solr/Lucene to 7.2.1.
(OFBIZ-10166)

Reminder: to make sure the LUCENE_VERSION constant in SearchWorker.java 
matches the dependency version. Also the same dependency version should be used 
by Solr and Lucene

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1821184 13f79535-47bb-0310-9956-ffa450edef68
2018-01-15 17:40:49 +00:00
Michael Brohl 0839184e2d Improved: Update Solr/Lucene to 7.2.1.
(OFBIZ-10166)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1821176 13f79535-47bb-0310-9956-ffa450edef68
2018-01-15 16:10:32 +00:00
Jacques Le Roux 83d2b52109 Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

Of course doing too much things at the same time forgot the import :/

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1820388 13f79535-47bb-0310-9956-ffa450edef68
2018-01-06 12:14:55 +00:00
Jacques Le Roux 800b191f2f Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

This was missing in r1804953 and it's now a good opportunity to test the new
ofbizTrunkFrameworkPlugins builder alone

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1820385 13f79535-47bb-0310-9956-ffa450edef68
2018-01-06 12:02:05 +00:00
Jacques Le Roux 7d9b898e92 Improved: Handle service response effectively
(OFBIZ-9981)

As per discussion on Dev ML:
==========================
Every service calling from java/groovy must handle errors by service util 
methods such as isError, returnError etc. 
and similarly in case of XML <call-service, there should be <check-error/> 
to make sure service was executed successfully.

Apart from this, one suggestion is to include *Debug.logError* in 
*ServiceUtil.returnProblem* so that in case of any error occurred and handled, 
it will always be logged on the console.
==========================

jleroux: this is the plugins part with some slight changes

Thanks: Suraj Khurana and Anushi Gupta

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1819735 13f79535-47bb-0310-9956-ffa450edef68
2017-12-31 12:30:48 +00:00
Jacques Le Roux c86a769119 Completed: Update Lucene and Solr to 7.2
(OFBIZ-10130)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1819597 13f79535-47bb-0310-9956-ffa450edef68
2017-12-30 13:22:14 +00:00
Jacques Le Roux f22a20c7ab 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()

Forgot to commit those one in plugins :/



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1818530 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 08:26:33 +00:00
Jacques Le Roux c39cafc697 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-plugins/trunk@1818005 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:43:05 +00:00
Deepak Dixit f1557bef30 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-plugins/trunk@1817986 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:02:59 +00:00
Jacques Le Roux c635e62fb2 No functional change, these "WIP" should not have been committed with r1816033
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1816034 13f79535-47bb-0310-9956-ffa450edef68
2017-11-22 10:57:48 +00:00
Jacques Le Roux 8cb7d8d4bd Improved: Upgrade Jquery 1.11.0 to JQuery 3.2.1
(OFBIZ-9978)

Related with r1816032

Thanks: Aditya 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1816033 13f79535-47bb-0310-9956-ffa450edef68
2017-11-22 10:54:27 +00:00
Jacques Le Roux 8589a4a4ff No functional change
Changes the OFBiz logo file name as it has been changed in the site



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1813480 13f79535-47bb-0310-9956-ffa450edef68
2017-10-27 08:11:12 +00:00
Deepak Dixit d0830deb7e Fixed: Removed getRelatedOneCache cache call, as this method is removed from trunk.
Thanks Suraj Khurana for reporting the issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1813273 13f79535-47bb-0310-9956-ffa450edef68
2017-10-25 12:49:55 +00:00
Michael Brohl ca7caa56db Improved: Update Solr/Lucene to 7.1.0 [CVE-2017-9803] [CVE-2017-12629].
(OFBIZ-9835)

There were two security vulnerabilities and it was recommended to 
upgrade to 7.1.0 asap.

The update removed the deprecated setBoost functionality during index 
time. I have removed it completely to be able to update to 7.1.0. 
A new indexing and query strategy has to be implemented here. Might be 
follow-up work in the future.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1812790 13f79535-47bb-0310-9956-ffa450edef68
2017-10-20 20:48:01 +00:00
Michael Brohl 584f93dcc8 Improved: Removed unfinished Solr query functionality from the
codebase which was introduced with (OFBIZ-6595) and r1736878.

There is no need for a self-implemented solr query form, this is
already provided by the Solr admin page which is accessible
through the menu.

Removes obsolete requests, screens and forms.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1812583 13f79535-47bb-0310-9956-ffa450edef68
2017-10-18 21:14:28 +00:00