Commit Graph
1803 Commits
Author SHA1 Message Date
Michael Brohl 82b7386e3d Applied patch for OFBIZ-6621: MapContext.entrySet() slows down when ByteBuffer objects are in the context.
Introduces a private inner class ListSet representing a Set backed by a List instead of the HashSet implementation.

Thanks Gareth Carter for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703954 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 08:43:40 +00:00
Jacques Le Roux f98543b1ff A patch from Gaudin Pierre for "error in isValidEan util" https://issues.apache.org/jira/browse/OFBIZ-6624
There is an error in isValidEan util. It should be 12 and not 13 in the methods charAt and calcChecksum  because they start at 0.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703586 13f79535-47bb-0310-9956-ffa450edef68
2015-09-17 12:05:19 +00:00
Adrian Crum 6066e4e42f Make primitive initialization explicit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1700864 13f79535-47bb-0310-9956-ffa450edef68
2015-09-02 18:43:41 +00:00
Adrian Crum 26198405b9 Added a FIXME comment. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1698406 13f79535-47bb-0310-9956-ffa450edef68
2015-08-28 20:26:01 +00:00
Shi Jinghai 85ab0e0eff OFBIZ-4154 Use ZXing to generate QR 2d barcode.
1. Add zxing-core-3.2.0.jar to framework/base/lib and .classpath.
2. Add services_qrcode.xml and QRCodeService.java in framework/common/.
3. Add qrcode request in common-controller.xml and QRCodeEvents.java under framework/common/.
4. Add qrcode.properties and QRCodeUiLabels.xml under framework/common/.
5. Add a barcode example page in specialpurpose/example, entry is on page: /example/control/EditExample?exampleId=EX01, the example can be seen on page: /example/control/ExampleReportPdfBarcode?exampleId=EX01

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1696921 13f79535-47bb-0310-9956-ffa450edef68
2015-08-21 10:03:11 +00:00
Jacques Le Roux 067df90ae1 After r1695126, I found that most of the Java files have svn:eol-style=native. So only 116 Java files were missing svn:eol-style=native. I guess those have been added by committers who are not using the OFBiz svn config file on their machines. So rather than removing svn:eol-style=native, this commits add the property to the files which miss it. Here 116+89=205 files have their svn:eol-style property changed to native.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695129 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 16:33:23 +00:00
Jacques Le Roux dca48b0893 Reverts r1044202. No functional change.
This reverts svn:eol-style=native on Java files which were forced by r1044202n, 89 Java files are concerned. This commit hopefully makes things more consistent. 
It's indeed hard to see the impact of this change before it's committed. I'll check once done, I already found 116 Java files w/o svn:eol-style=native but there are 1231 Java files at all, so not sure how most are set...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695126 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 16:15:37 +00:00
Deepak Dixit cc7d7333c1 (OFBIZ-6562) Used getCombinedMap instead of getParameterMap while preparing param map for string-map-prefix. Now string-map-prefix will work fine in case of ajax call as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693393 13f79535-47bb-0310-9956-ffa450edef68
2015-07-30 08:07:20 +00:00
Shi Jinghai a575165ce4 OFBIZ-6504 - Create password protected PDF in OFBiz
1. Changed to use FOP 2.0 native encryption, jars are updated.

2. Now the Embeded options are request parameters supported in ScreenFopViewHandler.java, the options are:
http://xmlgraphics.apache.org/fop/2.0/pdfencryption.html#embedded
the default values of the options can be configured in framework/webapp/config/fop.properties.

3. The demo page is https://localhost:8443/example/control/ExampleReportPdfOptions?exampleId=EX01

4. Barcode is tested.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1691852 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 20:41:32 +00:00
Jacques Le Roux 1d9f55c71f A patch from Francis Douet for "streamContentToBrowser fails when the file name contains a comma, only with Chrome." https://issues.apache.org/jira/browse/OFBIZ-6554
streamContentToBrowser fails when the file name contains a comma, happens only with Google Chrome.
Can easily be reproduced for example by uploading the Logo Image URL of the default organization in the party manager, that includes a comma of course.
Fixed in my patch by wrapping the file name in quotes.
Error on the browser console:
GET https://localhost:8443/content/control/stream?contentId=10020 net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION

jleroux: at 1935.1 section of http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html I read this example << Content-Disposition: attachment; filename="fname.ext">> So Francis's solution is the right one

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1690086 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 12:30:22 +00:00
Jacopo Cappellato eb6d01b066 New implementation of the two-way cryptographic services of OFBiz based on Apache Shiro:
* two-way encryption is now delegated to Apache Shiro, with stronger initialization vectors
* the mechanism is backward compatible
* new tools to update the encryption of private keys, useful to upgrade older versions of OFBiz and most of all to replace old keys with new ones (this is critical to implement stronger security practices as requested by PCI) 
* unit tests



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684608 13f79535-47bb-0310-9956-ffa450edef68
2015-06-10 09:01:30 +00:00
Adrian Crum a73c51bb49 Fix a thread-safety issue. Trivial unit test changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684216 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 16:12:30 +00:00
Jacques Le Roux af9ccf0c17 A patch from Taher Alkhateeb "Upgrade OFBiz to Java JDK 8" https://issues.apache.org/jira/browse/OFBIZ-6458
1st step: fixes a test which was not passing 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684042 13f79535-47bb-0310-9956-ffa450edef68
2015-06-07 16:03:04 +00:00
Taher A. Alkhateeb 62b0f73212 Translate the framework to Arabic
Another part of the translation of OFBiz to Arabic 
project found in JIRA OFBIZ-6432.

The commit translates the following files :
- framework/base/config/DateTimeLabels.xml
- framework/widget/config/conditional.xml

refs https://issues.apache.org/jira/browse/OFBIZ-6432


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682699 13f79535-47bb-0310-9956-ffa450edef68
2015-05-31 08:49:43 +00:00
Jacopo Cappellato 74e6dec22f OFBIZ-6380 Upgraded Log4j from 2.2 to 2.3.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680733 13f79535-47bb-0310-9956-ffa450edef68
2015-05-21 05:40:27 +00:00
Adrian Crum 240ba74d82 Replace ClassCastException with type check - https://issues.apache.org/jira/browse/OFBIZ-6291.
Ignoring a thrown ClassCastException is a common pattern in the project (one I have used myself), but it should be avoided in the future because it makes debugging difficult, plus it creates objects unnecessarily.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680058 13f79535-47bb-0310-9956-ffa450edef68
2015-05-18 17:18:54 +00:00
Jacques Le Roux 688da5d2d2 "Updates Log4j 2.2 to 2.3" https://issues.apache.org/jira/browse/OFBIZ-6380
Reverts r1679702

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1679723 13f79535-47bb-0310-9956-ffa450edef68
2015-05-16 10:52:41 +00:00
Deepak Dixit 6ce8d7d74d OFBIZ-6351 - Upload function does not work on Party Manager.
Upgrade commons-compress jar from 1.4.1 to 1.9

Thanks Supachai Chaima-ngua and Pierre Smits for reporting the issue, and thanks Supachai Chaima-ngua for providing the fix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1679709 13f79535-47bb-0310-9956-ffa450edef68
2015-05-16 09:01:01 +00:00
Jacques Le Roux 4bf39d2316 "Updates Log4j 2.2 to 2.3" https://issues.apache.org/jira/browse/OFBIZ-6380
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1679702 13f79535-47bb-0310-9956-ffa450edef68
2015-05-16 08:27:54 +00:00
Jacopo Cappellato 5c2e9841e8 Removed commons-cli jar that was not used: barcode4j has an optional dependency on it but only if used from the command line (which is not the case in OFBiz); Groovy has a dependency on Commons CLI, antlr, asm but it uses a copy of them bundled in groovy-all jar, so removing the pathelements set for the ant path id "groovy.class.path".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1677597 13f79535-47bb-0310-9956-ffa450edef68
2015-05-04 13:36:09 +00:00
Adrian Crum a84272b1ba Trivial code cleanup in ObjectType.java - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1677386 13f79535-47bb-0310-9956-ffa450edef68
2015-05-03 11:25:08 +00:00
Adrian Crum ebf03ea721 Some work on ComponentContainer.java:
1. Improved thread safety
2. Optimization
3. Code cleanup
4. Use String constant instead of hard-coded value


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676985 13f79535-47bb-0310-9956-ffa450edef68
2015-04-30 13:46:46 +00:00
Adrian Crum d82005c958 Use String constant instead of hard-coded value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676975 13f79535-47bb-0310-9956-ffa450edef68
2015-04-30 12:42:17 +00:00
Adrian Crum ec9d5d5416 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676974 13f79535-47bb-0310-9956-ffa450edef68
2015-04-30 12:41:26 +00:00
Adrian Crum ef710ed02f Some work on ComponentLoaderConfig.java:
1. Thread safety
2. Optimization
3. Code cleanup
4. Improved error handling

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676970 13f79535-47bb-0310-9956-ffa450edef68
2015-04-30 12:12:17 +00:00
Adrian Crum c2de699ca6 Fixed some bugs in startup code (https://issues.apache.org/jira/browse/OFBIZ-6268):
1. Class path loading was ignoring component settings, so class paths for disabled components were being loaded.
2. Configuration files were parsed twice.
3. Potential problem with unloading a loader that failed loading.

I was unable to test Cobertura because the necessary class (org.ofbiz.base.config.CoberturaInstrumenter) isn't being compiled for some reason.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676746 13f79535-47bb-0310-9956-ffa450edef68
2015-04-29 13:52:27 +00:00
Adrian Crum cd4f6cdbb3 Fixed a bug in UtilMisc.java where the List returned by the availableLocales() method included an empty Locale - causing errors in FreeMarker templates.
https://issues.apache.org/jira/browse/OFBIZ-6309

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676674 13f79535-47bb-0310-9956-ffa450edef68
2015-04-29 06:10:01 +00:00
Adam Heath 2dd530a51e Remove uesless exclusion of ofbiz crypto class compilation.
This was based on the availabily of javax.crypto.Cipher, which became
standard in java 1.4.  We require 1.7.  This is very old.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676154 13f79535-47bb-0310-9956-ffa450edef68
2015-04-26 23:30:20 +00:00
Nicolas Malin 5f6c13b369 correct String conversion to Set on StringUtil that not respect the field order, thanks to Francis Douet to raise it on the issue (OFBIZ-6299 Field order is not correct in the auto-complete for look-ups.)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1675998 13f79535-47bb-0310-9956-ffa450edef68
2015-04-25 07:00:42 +00:00
Adrian Crum a2fc70daff A small change to the behavior of the UtilProperties.createProperties() method: if the file is not found, return null instead of throwing an exception.
https://issues.apache.org/jira/browse/OFBIZ-6261

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674453 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 08:30:03 +00:00
Adrian Crum a1bb4ff6bc Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674064 13f79535-47bb-0310-9956-ffa450edef68
2015-04-16 13:05:55 +00:00
Adrian Crum f315f0d5be Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1669537 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 10:04:14 +00:00
Adrian Crum f5a0e74f27 Added comments for cache settings. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1668351 13f79535-47bb-0310-9956-ffa450edef68
2015-03-22 10:27:58 +00:00
Deepak Dixit bdba71d230 OFBIZ-6183: Update ComponentConfig code to allow empty mount point, as if need to mount website on root then mount-point should be "" instead of "/".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1668236 13f79535-47bb-0310-9956-ffa450edef68
2015-03-21 11:14:55 +00:00
Jacopo Cappellato 38017100b3 Upgraded the following commons jars:
- codec from 1.6 to 1.10
- validator from 1.4.0 to 1.4.1
- logging from 1.1.2 to 1.2
- net from 3.1 to 3.3
- csv from 1.0 to 1.1
Resolves OFBIZ-6157, OFBIZ-6158, OFBIZ-6159, OFBIZ-6160, OFBIZ-6161



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1667055 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 16:17:49 +00:00
Jacopo Cappellato 0db5888047 OFBIZ-6156: Upgraded commons-pool2 from 2.2 to.2.3 and commons-dbcp2 from 2.0.1 to 2.1
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1666958 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 10:58:26 +00:00
Jacopo Cappellato f69e599355 Upgrade to latest bug fix release of Freemarker: 2.3.22
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1666949 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 10:31:13 +00:00
Jacopo Cappellato 68723a2130 Upgrade to latest release of Log4j
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1666939 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 09:20:14 +00:00
Jacopo Cappellato 34beacd425 Relaxing default behavior of canonicalization in order to allow mixed and multiple encodings: with this change, in these cases, instead of throwing an error it will simply log a worning message.
This should fix, at least as a temporary solution, the recent issues happening after the upgrade to the new ESAPI.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1659224 13f79535-47bb-0310-9956-ffa450edef68
2015-02-12 11:17:46 +00:00
Jacques Le Roux b8ca5543c9 Changes in all labels files: <value xml:lang="(.*)_(.*)"> to <value xml:lang="$1-$2">
Changes also listLocales.ftl to show dashes rather than underscores

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1650880 13f79535-47bb-0310-9956-ffa450edef68
2015-01-11 09:59:32 +00:00
Adrian Crum 14e3b15252 Some small fixups for some of my previous commits.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1650347 13f79535-47bb-0310-9956-ffa450edef68
2015-01-08 17:53:59 +00:00
Adrian Crum 7c9aa8e489 Some optimizations for URL lookups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649979 13f79535-47bb-0310-9956-ffa450edef68
2015-01-07 00:24:28 +00:00
Adrian Crum b85eb53598 Removed an unused method from UtilURL.java, added some JavaDocs.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649971 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 23:22:56 +00:00
Adrian Crum 1df97ce20c Fixed a bug in FlexibleLocation.java where the optional locationresolvers.properties file was not being loaded due to static initializer recursion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649934 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 20:21:28 +00:00
Adrian Crum c201d5f6f3 Small change to Debug.java - to avoid static initializer recursion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649933 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 20:19:56 +00:00
Adrian Crum 38c358671f A new method for UtilProperties.java - to be used in upcoming changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649931 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 20:18:43 +00:00
Adrian Crum b20c4adfbc Make sure InputStream is closed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649701 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 01:05:29 +00:00
Adrian Crum a02828a34e Improvement: Remove unnecessary resource check from UtilURL.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649696 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 23:58:06 +00:00
Adrian Crum ffc11dc5a3 Some code cleanup in UtilProperties.java:
1. Removed redundant cache.
2. Removed unnecessary synchronized block.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649686 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 22:54:42 +00:00
Adrian Crum 184fe56ac1 Improvement: Enable XML validation for properties files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649675 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 21:46:54 +00:00