Commit Graph
71 Commits
Author SHA1 Message Date
Pawan Verma 6cb67c1a40 Improved: Replace .size() == 0 with isEmpty() in Java files(OFBIZ-11944)
Thanks, priya for the report and patch and jacques for the review.
2020-08-22 19:17:10 +05:30
Suraj Khurana 8c10d4ae72 Improved: Added missing Javadocs for some methods, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
This is done for framework component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
2020-08-17 12:30:26 +05:30
Suraj Khurana 7d82b17c72 Improved: Corrected some line is longer than 150 characters checkstyle issues in framework component. Also fixed some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
2020-08-03 10:11:40 +05:30
Suraj Khurana d374019465 Improved: Corrected all incorrect indentation level issues in framework component, also fixed some case indentation checkstyle issues.
(OFBIZ-11922)
2020-07-26 21:04:41 +05:30
Suraj Khurana f4f2722d36 Improved: Updated case indentation to 0 for all switch statements in framework component. Also done formatting changes as per checkstyle best practices.
(OFBIZ-11904)
2020-07-25 13:50:37 +05:30
holivier b0f445b123 Documented: Framework, migration all docbook files to asciidoc
(OFBIZ-11587)

- common-sending-email: include in email
- datafile: move as a include at the end of entity-engine section
- entity-engine: list of link to OFBiz wiki about entity configuration
- service-engine: a link to OFBiz wiki Service Engine Guide
- webtools: help for main screen
- mini-lang: include a link to OFBiz wiki mini-lang-reference at the
beginning of minilang-to-groovy-manual
           move minilang-to-groovy-manual to Development environment
section
- unit-test: include as Junit test, and use README to list gradle
command available (so add a tag in REAME.adoc)
- base: add a link to OFBiz wiki Configuration Guide, in deployment
section
- SingleSignOn with LDAP: move to plugin LDAP and include in deployment
section

developer-manual is updated with some include lines or with directly a
sentence.
2020-07-14 16:56:05 +02:00
Suraj Khurana dd4da77d76 Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for framework 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:33:47 +05:30
Suraj Khurana abc7836dde Improved: Made MODULE as private data member of class instead of public in all framework components.
(OFBIZ-11739)
This will reduce checkstlye issues. Thanks Jacques for review.
2020-05-29 13:20:46 +05:30
Jacques Le Roux ddb8f4273a Improved: replaces module by MODULE everywhere 2020-04-05 19:46:34 +02:00
Nicolas Malin bc0b80b466 Fixed: Remove unneeded space after parenthesis 2019-11-25 09:13:18 +01:00
Nicolas Malin a1f16274c2 Improved: Add enconding type attribute for import data file tools
(OFBIZ-10234)
During the import of file via datafile import you may want to set encoding type.
Actually only the type UTF-8 is supported.
This commit allows to add a new "encoding-type" attribute into data-file to indicate the type of encoding of the imported file.

Thanks to Pierre Gaudin for this improvement.
2019-11-22 15:10:37 +01:00
Mathieu Lirzin 7999e3adc1 Improved: Remove useless imports
(OFBIZ-11142)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863507 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 18:45:21 +00:00
Mathieu Lirzin fc6f9023d2 Improved: Use ‘StandardCharsets.UTF_8’
(OFBIZ-11142)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863505 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 18:41:37 +00:00
Mathieu Lirzin 8a681cd347 Improved: Add missing ‘static’ modifier for safe public 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-framework/trunk@1860946 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 14:11:20 +00:00
Mathieu Lirzin ffe2e7ffdf 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-framework/trunk@1860937 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 12:27:40 +00:00
Mathieu Lirzin 990c8a3aab Improved: Remove redundant specification of type arguments
(OFBIZ-10937)

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


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857906 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 12:49:52 +00:00
Mathieu Lirzin d5e3c2d3d4 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857896 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 09:37:49 +00:00
Mathieu Lirzin a15b7b1996 Reverted: Changes done at r#1857089 and r#1857090 (OFBIZ-10911)(OFBIZ-10912)
The Cleanups introduced by those revisions has introduced some
unexpected regressions making the Gradle ‘loadAll’ task fail.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857091 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:36:29 +00:00
Mathieu Lirzin d639aba7e7 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857089 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:02:39 +00:00
Gil Portenseigne ceea6ce791 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-framework/trunk@1837577 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:30:43 +00:00
Nicolas Malin e0ea10eabc Improved: In CSV export file from data-file add a new attribute to select the EOL type (OFBIZ-9536)
During the file CSV generation by data-file engine, it is not possible to choose the end of line char. It is always "CR". 
With this improvement it's now possible to define a eol-type attribute on data-file element with value CR or CRLF to use in the csv file result.
Example:
    <data-file name="MyCsvTest" separator-style="delimited" type-code="text" delimiter=";" eol-type="CRLF">
        <record name="Test">...
     </data-file>
Thanks Pierre Gaudin for this proposal.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819151 13f79535-47bb-0310-9956-ffa450edef68
2017-12-23 14:14:45 +00:00
Nicolas Malin 28ff342414 Improved: Import file with data-file, add start-line to escape the header column line (OFBIZ-10108)
When you load a CSV file some time with a data-file definition, if it contains some header column you can use the format attribute of you column.
Example:
ref;date
100;2017-10-10
200;2017-12-11

This definition failed :
    <data-file name="MyCsvTest" separator-style="delimited" type-code="text" delimiter=";">
        <record name="Test">
            <field name="ref" type="String" position="1"/>
            <field name="date" type="CustomTimestamp" format="yyyyy-MM-dd" position="2"/>
        </record>
     </data-file>

You need to read the date as string and after convert it on your code to escape the first line.
To solve it I added a new attribute start-line on data-file element :
    <data-file name="MyCsvTest" separator-style="delimited" type-code="text" *start-line="1"* delimiter=";">
        <record name="Test">
            <field name="ref" type="String" position="1"/>
            <field name="date" type="CustomTimestamp" format="yyyyy-MM-dd" position="2"/>
        </record>
     </data-file>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819147 13f79535-47bb-0310-9956-ffa450edef68
2017-12-23 13:42:15 +00:00
Michael Brohl 41c9269d25 Improved: General refactoring and code improvements, package
org.apache.ofbiz.datafile.
(OFBIZ-9963)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818434 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 16:18:45 +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 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 6ec41780eb Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.datafile.
(OFBIZ-9715)

I modified the patch slightly and did some additional code cleanup by 
removing commented out code and some formatting.

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813637 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 14:45:17 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Taher A. Alkhateeb b37ef2d280 Migrate ALL java files from /src to /src/main/java - OFBIZ-7790
This is the first of two steps in the above mentioned JIRA. This
first step changes the java source directory for every component
from /src to /src/main/java. The next step will be adding unit
tests to every component in /src/test/java

Thank you to Deepak Dixit for tips on how to use the SVN commands
to make the appropriate file moving.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752838 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 14:17:14 +00:00
Jacques Le Roux 27b736e3ed No functional changes. While reviewing Wai's patch for OFBIZ-7112 I noticed that he (re)used this pattern introduced earlier:
(resource == null || resource.length() <= 0)
From Java spec. a String, Collection, Map or CharSequence can't have a negative length, so the pattern above can be reduced to 
  (resource == null || resource.length() == 0)
which can be replaced using 
  UtilValidate.isEmpty()
I checked, there are several other occurrences of this pattern (some very old, I guess most were routinely copied from an initial occurrence). I decided to replace all of them, here they are.

I did that already long ago for the 
  (resource == null || resource.length() == 0)
pattern. It remains 4 of them. Three are justified (because of the dependency on base component or because using isEmpty() on Object is disputable for performance reasons). I took care of the remaining one right aways (in SplashScreen.java)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747976 13f79535-47bb-0310-9956-ffa450edef68
2016-06-12 10:43:58 +00:00
Deepak Dixit 5fdc62745e Applied patch from jira issue OFBIZ-4837 - Separator Error in data file tools.
Thanks   Gil Portenseigne for reporting and providing the patch for the issue, Thanks Aditya for uploading the update patch and verifying it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674447 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 06:40:32 +00:00
Jacques Le Roux 576a213948 No functional changes, code improvements
Fixes some dead code entries
Automatically adds some override annotations


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1550429 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 14:53:38 +00:00
Jacopo Cappellato fcdf07a0e6 Improved code that manages the cache:
* protected some UtilCache objects (static fields) by making them private and final

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343815 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 16:18:02 +00:00
Ashish Vijaywargiya e0971b304c Applied similar fix as we did on trunk r1300463.
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)

Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335927 13f79535-47bb-0310-9956-ffa450edef68
2012-05-09 05:28:17 +00:00
Adam Heath a0108243f5 FIX/DEPRECATION: Fix all the HashCrypt deprecated uses. All proper methods in HashCrypt
now follow the same form: (String hashType, ..., String valueToHash).
Some methods also follow a polish notation suffix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334172 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 20:42:45 +00:00
Adrian Crum 827290f103 Refactored ModelDataFileReader.java - fixed thread-safety issues, simplified some unnecessarily complicated code, un-hide exceptions so the UI can display them.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1291007 13f79535-47bb-0310-9956-ffa450edef68
2012-02-19 14:39:10 +00:00
Marco Risaliti a153d0a34f Removed some javadoc warning (wrong param/return) into framework components no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126708 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 20:11:12 +00:00
Marco Risaliti 0d8468c0f0 Add a @SuppressWarning("serial") in DataFileException/ModelField (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068612 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:15:31 +00:00
Scott Gray 47f43a302a Remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044931 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 21:31:27 +00:00
Scott Gray 6109808c8a Tabs to spaces
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924378 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 17:28:01 +00:00
Jacques Le Roux f315019e6a Reformatted and cleaned following best practices
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924211 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 10:33:35 +00:00
Jacques Le Roux b174d341a8 Reformatted and cleaned following best practices
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924208 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 10:26:56 +00:00
Jacques Le Roux f681e37b98 A patch from BJ Freeman "Datafile does not catch lack of delimiter if at end of line." (https://issues.apache.org/jira/browse/OFBIZ-3026) - OFBIZ-3026
There was an issue if the datafile did not have the last delimiter before the CRLF.  This fixes it when there are not data for a field and also fixes the EOL.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923828 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 16:00:32 +00:00
Adam Heath b17eb127ec Fix trailing whitespace, and mixed tab/space at the beginning of lines.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@899812 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 21:00:23 +00:00
Adam Heath 93cc17b5b0 Remove a bunch of wildcard imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894106 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 19:54:58 +00:00
Jacques Le Roux c72b29cb1f Use UtilValidate.isNotEmpty methods instead of (obj != null) || (obj.length > 0) and (obj != null) || (obj.size > 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883549 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:41:34 +00:00
Jacques Le Roux 5518e9baf8 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.size == 0)
Complete r883492

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883516 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 22:02:05 +00:00
Adam Heath 820d11eb97 Deprecate UtilCache constructors, and add a create helper function.
This is the first step to making utilCacheTable concurrent, and
non-blocking.  To do so, the constructor has to have no side-effects.
This means it can't modify utilCacheTable itself; this will be moved to
the helper function created above.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883217 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:56:28 +00:00
Jacques Le Roux a5eae6afcc Add an EncryptedString format possibilities in datafile (use in Record.java, needed some changes to build in framework/build.xml and datafile/build.xml)
+ datafile/dtd/datafiles.xsd enhanced with some documentations, and an enumeration for the type: I used all occurrences found in Record.setString() method)
+ datafile/dtd/datafiles-catalog.xml added
+ Few generics cleaning in login/LoginServices.java

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@882892 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 13:10:07 +00:00
Jacques Le Roux cd10618fcc A patch from Bob Morley "Resolve java warnings exposed in Eclipse : framework - datafile" (https://issues.apache.org/jira/browse/OFBIZ-3106) - OFBIZ-3106
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@832669 13f79535-47bb-0310-9956-ffa450edef68
2009-11-04 06:58:07 +00:00
Scott Gray 2afbb75457 Get rid of a whole pile of unnecessary string instantiations
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@818665 13f79535-47bb-0310-9956-ffa450edef68
2009-09-24 23:49:02 +00:00