Commit Graph
64 Commits
Author SHA1 Message Date
Jacques Le Roux 549543ace5 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:32:15 +01:00
Nicolas Malin 1941a05a34 Improved: Manage VisualTheme in ModelForm
(OFBIZ-11335)

Related to issue OFBIZ-11335, extends form's factories and form's models
to support a visualTheme during the model creation.

This extend help centralize style information used by forms on a theme.
For performance reason when the model is loaded in memory, all theme information
need to be present to set immutable as possible to put it in cache
(implies why the key cache contains now the visualThemeId).
2020-02-20 14:34:28 +01:00
Nicolas Malin 1ee1ec76d6 Fixed: Change 'restMethod' by '_method' in request parameters
(OFBIZ-11007)

Some issue has been introduce on the previous commit 6e1c7b5 [1], corrected by this one :
  * the view link on ListGeneric failed
  * the paginate on ListGeneric failed

I also simplify the url writing with delegate the entity path generation and translation
to two function on EntityUtil : entityToPath and getPkValuesMapFromPath

thanks to Pawan Verma to spot the pagination problem

[1] https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=6e1c7b5
2020-01-29 10:50:30 +01:00
Nicolas Malin fac12a4e6f Fixed: No functional change, correct checkstyle issues on GenericWebEvent.java 2020-01-29 10:50:29 +01:00
Nicolas Malin 6e1c7b5958 Implemented: REST, adding segmented URI support for webtools/entitymaint
(OFBIZ-11007)

After implemeted Rest mechanism on rev. 1868963 by Mathieu Lirzin,
I reviewed the rest url implemented by Artemiy Rozovyk for entitymaint in webtools.

With discussion with Mathieu and Leila, I selected this pattern :

    entity/[cover]/{entityName}/{pkValues: .*}

and implemented like this :

    entity/list -> list all entities
    entity/find/Party -> search
    entity/find/Party/Company -> displaying form for Party with id Company
    entity/create/Party -> creation form for a Party
    entity/edit/Party/Company/Company -> edit form for Party with id Company
    entity/change/Party/Company -> call crud following given http method
    entity/relations/Party -> View relation for Party

The old uris were currently kept and the oldest GenericWebEvent.updateGeneric() were updated to support rest method information.

Thanks Mathieu, Artemiy and Leila for their help to complete this improvement.
2020-01-09 17:51:12 +01:00
Mathieu Lirzin 2c37e2188b Improved: Move APACHE2_HEADER_FOR_XML to “src/main/resources”
(OFBIZ-11161)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868646 13f79535-47bb-0310-9956-ffa450edef68
2019-10-20 11:17:41 +00:00
Mathieu Lirzin 13188ab6cc Improved: Refactor ‘ComponentConfig.ClasspathInfo’
(OFBIZ-11192)(OFBIZ-11238)

The validity checks have been moved at construction time instead of
relying on client code to ensure that the class path information are
sound.

A new ‘ComponentConfig.ClasspathInfo.Type’ enum has been defined to
improve type safety.

The location of the class path information is now using a
‘java.nio.file.Path’ class instance.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868030 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 16:30:12 +00:00
Mathieu Lirzin 60f7041c3d Improved: Use ‘Path’ for component config ‘rootLocation’ attribute
(OFBIZ-11192)

The method ‘ComponentConfig#getRootLocation’ has been removed
and replaced by ‘ComponentConfig#rootLocation’.

The callers have been adapted.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868028 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 16:20:32 +00:00
Jacques Le Roux 6a89860bbc Improved: Move Groovy scripts from /groovyScripts/ to /src/main/groovy/
(OFBIZ-11205)

Moves FetchLogs.groovy as a 1st step

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867344 13f79535-47bb-0310-9956-ffa450edef68
2019-09-22 14:18:23 +00:00
Mathieu Lirzin daa1e6160e Reverted: JSON entity data import and export utility
(OFBIZ-10966)

Implementation was not matching OFBiz code quality requirements.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867342 13f79535-47bb-0310-9956-ffa450edef68
2019-09-22 12:29:54 +00:00
Jacques Le Roux 28dfdf5c2e Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

In many Java and Groovy files we have auto generated catch blocks or empty catch 
blocks. 
To avoid such exception swallowing this should be improved to at least log the 
error and also return error in case of service.

Here we use 3 try-with-ressource blocks and log some errors

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866957 13f79535-47bb-0310-9956-ffa450edef68
2019-09-15 06:32:42 +00:00
Jacques Le Roux 73ebcfb095 Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

In many Java and Groovy files we have auto generated catch blocks or empty catch 
blocks. 
To avoid such exception swallowing this should be improved to at least log the 
error and also return error in case of service.

Here we use a try-with-ressource block and log some errors

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866952 13f79535-47bb-0310-9956-ffa450edef68
2019-09-14 17:11:59 +00: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 2c2340db0a Improved: Use ‘java.util.Base64’
(OFBIZ-11142)

Since Java 8 a standard Base64 encoder/decoder is available. As a
consequence we can remove our embedded implementation and use it
instead.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863504 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 18:39:57 +00:00
Mathieu Lirzin 83fd20607b Improved: Inline ‘UtilGenerics#checkMap’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863500 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:32:34 +00:00
Mathieu Lirzin cc85af1642 Improved: Remove useless ‘UtilObject#equalsHelper’
(OFBIZ-11140)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863443 13f79535-47bb-0310-9956-ffa450edef68
2019-07-19 22:11:39 +00:00
Mathieu Lirzin 59599e3cb2 Improved: Add missing generics
(OFBIZ-10966)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862250 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 19:39:22 +00:00
Mathieu Lirzin 698af7c46b Improved: Remove dead code
(OFBIZ-10966)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862249 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 19:38:44 +00:00
Jacques Le Roux be99f5a0a7 Improved: no functional change
Adds missing ASL2 headers, thanks to Mathieu on dev ML :)
Also automatically sorts imports

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862214 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 14:03:34 +00:00
Jacques Le Roux b16285dd64 Implemented: JSON entity data import and export utility
(OFBIZ-10966)

Currently, we support import/export entity data in XML format.
  Nowadays JSON is widely used in industry, we can have support for JSON format 
  which looks quite similar to XML support.

Here is example of XML data and it's JSON version
<Party partyId="123456" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
{“Party”: {"partyId":"123456","partyTypeId":"PERSON","statusId":"PARTY_ENABLED”}}

Design Proposal

We can write entityImportJson and entityImportDirJson services for importing 
JSON from screen and directory respectively.
And the entityExportAllJson service for exporting entity data in JSON.

Import Design
 The import service will perform following operations:
 1.) Validate the input JSON data
 2.) On successful validation, convert JSON to OFBiz's entity model 
     (GenericValue)
 3.) The GenericValue will be inserted in database by some handler class for e.g 
     we can write JsonDataHandler, it will convert given JSON to 
     List<GenericValue>, and finally write it to database 
     (Similar pattern is used in XML import).

Export Design
 Based on existing XML pattern the writeXmlText method of GenericEntity class 
 write the exported data in XML format. 
 In the similar way, we can implement writeJsonText to export data in JSON format.

jleroux: I fixed 2 trivials things and at my request in last patch Jayansh added 
"JSON Data Export All" and "JSON Data Import Dir

Thanks: Jayansh Shinde 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862206 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 11:49:22 +00:00
Jacques Le Roux db43941bf1 Fixed: massPrintOrders service does not work
(OFBIZ-11049)

This problem was similar to what was resolved by r1806237 for OFBIZ-9138.

This fixes it by using the same solution than in r1806237. If the visual theme 
is unknown in the the service  context  get the default theme from 
general.properties using ThemeFactory::resolveTheme.

sendPrintFromScreen, createFileFromScreen, sendBirtMail, getXslFo and 
printReportPdf (in example) were concerned


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859735 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 16:41:04 +00:00
Mathieu Lirzin b37e315aef 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.

Thanks Jacques Le Roux and Swapnil M Mane for acknowledging the commit.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858295 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 19:34:25 +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 e34434000b Fixed: Remove unnecessary semicolons in Java code (OFBIZ-10936)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857904 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 10:55:18 +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
Mathieu Lirzin 4fbb189ac9 Improved: Use ‘FlexibleLocation#resolveLocation(String)’ when possible (OFBIZ-10821)
Previously the artifact info classes were using the
‘FlexibleLocation#resolveLocation(String, ClassLoader)’ method by
passing ‘null’ as the second argument which is equivalent to calling
the more specific ‘FlexibleLocation#resolveLocation(String)’ method
with the same first argument.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854667 13f79535-47bb-0310-9956-ffa450edef68
2019-03-02 19:31:44 +00:00
Jacques Le Roux bbfc62d47a 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-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Jacques Le Roux 13f8b82f51 Improved: Replace Callable objects with lambda expressions
(OFBIZ-10488)

Since Java 8 it is possible to instantiate functional interfaces 
(interfaces with one non-static method) with lambda expressions instead 
of anonymous classes.

This replaces the creation of callable objects with lambda expressions.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848514 13f79535-47bb-0310-9956-ffa450edef68
2018-12-09 13:04:23 +00:00
Rishi Solanki a3ab29266f Improved: Introduce ability to clear specific cache from cache maintenance. Import the specific classes those are required instead of complete util package.
(OFBIZ-10402)
Thanks to Aditya Sharma for review and feedback.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846298 13f79535-47bb-0310-9956-ffa450edef68
2018-11-10 11:30:42 +00:00
Rishi Solanki 4dc6101ce2 Improved: Introduce ability to clear specific cache from cache maintenance. After this user can bulk select the caches and clear them. Single clear and all clear caches works as is.
(OFBIZ-10402)
Thanks to Yogesh Naroliya for providing the patch and Suraj Khurana for reporting the ticket.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845572 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 11:18:52 +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
Jacques Le Roux 030b6b59de 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/trunk@1822310 13f79535-47bb-0310-9956-ffa450edef68
2018-01-26 15:13:42 +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
Jacques Le Roux 796d098e67 Fixed: Replace org.apache.commons.lang.StringEscapeUtils.unescapeHtml() method
by org.jsoup.parser.Parser.unescapeEntities()
(OFBIZ-10023)

StringEscapeUtils.unescapeHtml() is deprecated or at least not reliable

After few tests using the Parser.unescapeEntities() strict mode seems OK


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816461 13f79535-47bb-0310-9956-ffa450edef68
2017-11-27 15:19:47 +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
Jacques Le Roux f973dc8283 Fixed: LabelManager doesn't search labels in all elements in xml
(OFBIZ-9606)

Currently, label manager for xml search only for fail-property elements in xml 
files, it should also search for the property-to-field, default-message element 
in xml files.

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806269 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 07:43:54 +00:00
Jacques Le Roux 3cb8812782 Fixed: Improvements in LabelReferences class
(OFBIZ-9623)

For Java:
Current support is only for occurrences like "UtilProperties.getMessage(",
 but there are other occurrences such as "uiLabelMap.get(" 
in Java as well. Need to add support for same.

For groovy:
After some recent improvements for groovy handling, still, there is a 
possibility that someone is using "UtilProperties.getMessage(" in groovy files 
as well, so IMO, that must also be handled.

For XML forms:
In XML forms current support in handled for auto-fields-service and 
auto-fields-entity but there are some occurrences of tooltip element of 
field tag as well, that must also be handled.

For XML Simple Methods:
Doesn't handle case of property-to-field and default-message elements. 
(Separate ticket created OFBIZ-9606, just adding it here for reference)

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806266 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 07:37:49 +00:00
Nicolas Malin 10af80b1a8 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step these step break all the UI
#2 The MacroScreenRenderer class now resolve the macro ftl library location from the model theme
The widget.properties lost all definition now managed by the theme definition

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806140 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 09:36:04 +00:00
Jacques Le Roux 33d7198d0a Fixed: LabelManager doesn't search labels in .groovy files
(OFBIZ-8153)

The logic written needs more use cases to be covered for groovy files, existing 
findUiLabelMapInFile is not fit for groovy files.

Following patterns are currently used in groovy files:
1. uiLabelMap.xxxxx
2. uiLabelMap.get("xxxxx")

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805558 13f79535-47bb-0310-9956-ffa450edef68
2017-08-20 14:14:26 +00:00
Jacques Le Roux bfd533ccc3 Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

No functional change.

We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html : 
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent 
rounding mode is largely obsolete; the enumeration values of the RoundingMode 
enum, (such as RoundingMode.HALF_UP) should be used instead.>>

That's an easy global replacement. But it also needs to import the RoundingMode 
class. It was 26 files so I decided to rather clean all the imports in all files
 with the help of Eclipse.

This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 08:32:21 +00:00
Deepak Dixit 14f9c7331d Improved: Following uiLabels should move from ProductUiLabels.xml to CommonEntityLabels.xml. (OFBIZ-9408)
ProductShipmentUomAbbreviation_LEN_in
    ProductShipmentUomAbbreviation_WT_g
    ProductShipmentUomAbbreviation_WT_kg
    ProductShipmentUomAbbreviation_WT_lb
    These labels should be written in similer pattern as other labels of "Uom" entity are written in CommonEntityLabels.xml, for example :
    ProductShipmentUomAbbreviation_LEN_in will be written as
    Uom.abbreviation.LEN_in
    <entityName>.<fieldName>.<PrimaryKey>

Thanks Renuka for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801281 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 11:36:50 +00:00
Jacques Le Roux 6126b7e191 Improved:
Improved: Writer closed but not in case of exception
(OFBIZ-9388)

This is an improvement only because no cases were reported. But obviously in 
case of unlucky exception after the Writer creation and before it's closed the 
Writer remains in memory.

The solution is to use try-with-ressources when possible.

This also improves the way the EntityListIterator is closed, using
 try-with-ressources instead of closing in case of exception

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797744 13f79535-47bb-0310-9956-ffa450edef68
2017-06-06 07:49:40 +00:00
Jacques Le Roux 3c45e7d684 Improved: Handle only labels with the "_" separator between languages and
countries
(OFBIZ-9261)

This is handled in LabelManagerFactory.java

    Element valueElem = (Element) valueNode;
    // Support old way of specifying xml:lang value.
    // Old way: en_AU, new way: en-AU
    String localeName = valueElem.getAttribute("xml:lang");
    if( localeName.contains("_")) {
        localeName = localeName.replace('_', '-');
    }

I replaces this snippet by throwing an exception in order to now to 
automatically detect issues

Moreover I notices that there are no longer reasons to bypass the 
ExampleEntityLabels and ProductPromoUiLabels files

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787047 13f79535-47bb-0310-9956-ffa450edef68
2017-03-15 13:56:38 +00:00
Jacques Le Roux 12cde364f5 No functional change, we use CamelCase in Java not SnakeCase
Fixes previous commit where I missed this one, I must have used the refactoring
tool :/

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787033 13f79535-47bb-0310-9956-ffa450edef68
2017-03-15 11:38:59 +00:00
Jacques Le Roux ba1460f6a6 No functional change, we use CamelCase in Java not SnakeCase
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787032 13f79535-47bb-0310-9956-ffa450edef68
2017-03-15 11:28:40 +00:00
Michael Brohl 945a8afd9c Improved: refactor javadocs in OFBiz to be standards compliant
(OFBIZ-9144)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774922 13f79535-47bb-0310-9956-ffa450edef68
2016-12-18 18:12:21 +00:00
Arun Patidar 80498ef38d Implemented: Refer to objects by their interfaces rather than class when instantiating Collection implementation classes in Java files
(OFBIZ-9023) (OFBIZ-9026)(OFBIZ-9027)(OFBIZ-9032)(OFBIZ-9034)(OFBIZ-9036)(OFBIZ-9030)

Thanks: Divesh Dutta, Amit Gadaley and Shubham Agrawal for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768189 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 11:16:49 +00:00