Commit Graph
1801 Commits
Author SHA1 Message Date
Jacques Le Roux 0757ed8a24 A patch from Gareth Carter for "last index for paging is not calculated correctly" https://issues.apache.org/jira/browse/OFBIZ-5497
The last index (used on the last button) is not calculated correctly in ftl or the renderer classes. It currently users floor which works only for list sizes that are not multiples of the view size. When you have a list size which is a multiple of the view size, it does not subtract 1 for zero based index and therefore the last button goes to the last page + 1

Examples

listSize = 1
viewSize = 10
listSize / viewSize = 0.1
floor(0.1) = 0
This one produces the correct value

listSize = 20
viewSize = 10
listSize / viewSize = 2
floor(2) = 2
Last index should be 1 because of zero based index but never occurs

To reproduce, enter a view with a list and paging functionality, the list size must be a multiple of the view size


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1560176 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 20:53:29 +00:00
Adrian Crum 6a42559853 Updated XStream library to latest version.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557440 13f79535-47bb-0310-9956-ffa450edef68
2014-01-11 19:23:58 +00:00
Adrian Crum fe9cd1f776 Added the ability to exclude certain classes from XML serialization/deserialization.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557427 13f79535-47bb-0310-9956-ffa450edef68
2014-01-11 17:39:38 +00:00
Jacques Le Roux b3767764d7 Updates java mail-1.4.jar to mail-1.5.1.jar (tests passes)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557410 13f79535-47bb-0310-9956-ffa450edef68
2014-01-11 15:24:10 +00:00
Jacques Le Roux a08c142ee7 Updates icu4j-49_1.jar to icu4j-52_1.jar (tests passes)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557409 13f79535-47bb-0310-9956-ffa450edef68
2014-01-11 14:52:23 +00:00
Jacopo Cappellato 692a5ab569 Upgrade to the latest official major version of Groovy: 2.2.1
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554242 13f79535-47bb-0310-9956-ffa450edef68
2013-12-30 14:44:32 +00:00
Jacques Le Roux 398aeffd7f Oops my bad, I forgot that I had downloaded the cobertura-1.9.4.1.jar locally so I had no issues after an ant clean but Buildbot had
So finally removes last change in framework/base/build.xml related to Cobertura

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554018 13f79535-47bb-0310-9956-ffa450edef68
2013-12-29 12:15:47 +00:00
Jacques Le Roux 5b7572d537 Finally commits change in framework/base/build.xml, the Buildbot error was not related to this change (did not make sense, as long this target is not used at least)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554016 13f79535-47bb-0310-9956-ffa450edef68
2013-12-29 11:52:15 +00:00
Jacques Le Roux 92525ea290 I was too fast with the Cobertura changes in previous commit, I forgotI did not test those yet.
So I revert them for now, they are not needed yet for the INFRA-3590 progresses anyway, only the portoffset parameter is needed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553975 13f79535-47bb-0310-9956-ffa450edef68
2013-12-28 23:43:53 +00:00
Jacques Le Roux 4c0b42b9d2 This completes "set different ports for testing in a CI environment (e.g. Jenkins)" https://issues.apache.org/jira/browse/OFBIZ-4794
This was waiting for a moment in my working copy after I found that there was an issue with testSOAPSimpleService when portoffset was used with run-tests target.
I have still no resolved this issue, but since I got a better way to run simultaneous Buildbot instances this is no longer an issue for run-tests target.
So I commit these small pending changes in order to allow to run Sonar on OFBiz https://issues.apache.org/jira/browse/INFRA-3590.
The cobertura target does not work yet but what's committed here is needed anyway to progress with INFRA-3590.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553962 13f79535-47bb-0310-9956-ffa450edef68
2013-12-28 23:09:01 +00:00
Jacques Le Roux 4c3e9b7ec8 No functional changes:
Removes all remaining unchecked warnings
Automatically adds some @Override

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1551207 13f79535-47bb-0310-9956-ffa450edef68
2013-12-16 13:30:46 +00:00
Jacques Le Roux 082d2ec52f In r1533839 (related to https://issues.apache.org/jira/browse/OFBIZ-4794 "Set different ports for testing in a CI environment (e.g. Jenkins)"
Which will mostly be used to simultaneously run official demos without having to create patches, I forgot the portOffset for websites and url.properties ports values.
This fixes this point. I also did in it RequestHandler class though the getDefaultServerRootUrl() method is now deprecated.
To be consistent with r1547186 I will backport in R13.07

People should be aware that this will change the ports values of websites and url.properties ports values which in some cases could be an unwanted side effect. 
Anyway the portOffset feature is not destined to be used in production environments where websites and url.properties ports values are often changed purposely

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1549015 13f79535-47bb-0310-9956-ffa450edef68
2013-12-08 10:48:18 +00:00
Adrian Crum 63462fa908 Added a new attribute to the ofbiz-component.xml <webapp> element - access-permission. It is used to specify an explicit permission to allow access to the web application, instead of the implied permissions specified in the base-permission attribute (which causes unpredictable behavior).
Also moved web application authorization code from the Flat Grey visual theme to LoginWorker.java. This change needs to be copied to other visual themes as well.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1546891 13f79535-47bb-0310-9956-ffa450edef68
2013-12-02 04:19:48 +00:00
Jacques Le Roux a38a21fc0a This closes "Introduce Tomcat's JreMemoryLeakPreventionListener and why" https://issues.apache.org/jira/browse/OFBIZ-5395
The idea is to avoid ThreadLocal with custom classes, this can lead to memory leaks when an external application server is used.
Reverts r1075322 (commit for OFBIZ-4107) hence removes CompilerMatcher 
Uses PatternFactory instead of CompilerMatcher class (from CompilerMatcher keeps the compiled patterns cache idea)
In UtilHttp.java
  Removes dead code
  Removes useless "UtilHttp." for class methods and constants calls (moot point, have we conventions on this?).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542960 13f79535-47bb-0310-9956-ffa450edef68
2013-11-18 09:46:35 +00:00
Jacques Le Roux de40fb6041 Makes createOrGetPerl5CompiledPattern static
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542959 13f79535-47bb-0310-9956-ffa450edef68
2013-11-18 09:45:33 +00:00
Jacques Le Roux 98e992fc1d Renames the Perl5 method createOrGetPerl5CompiledPattern, in case later we want to implement other regex flavors
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542725 13f79535-47bb-0310-9956-ffa450edef68
2013-11-17 13:52:11 +00:00
Jacques Le Roux 6387735b0d Changes module and method names
Uses | instead of & in compile mask options
Adds a comment about when to use or not

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542709 13f79535-47bb-0310-9956-ffa450edef68
2013-11-17 11:35:49 +00:00
Jacques Le Roux 950192c0d0 No functional change, just simplify code.
Also some trailing spaces removed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542708 13f79535-47bb-0310-9956-ffa450edef68
2013-11-17 11:30:43 +00:00
Adrian Crum 39eb2da06e Small fixup for me previous commit - Perl5 pattern compiler needs to be told the patterns will be shared among threads.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542551 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 19:03:17 +00:00
Adrian Crum dbc3a522fb Created a PatternFactory class to replace the existing CompilerMatcher class.
https://issues.apache.org/jira/browse/OFBIZ-5395


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542544 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 18:30:08 +00:00
Paul Foxworthy 46392f7649 FORMATTING: Fix misspelling in comment
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542162 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 02:52:56 +00:00
Adrian Crum 7043dd0c6b Fixed a bug introduced in rev 1534264 - unable to log into web applications that do not have a base-permission attribute.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1540475 13f79535-47bb-0310-9956-ffa450edef68
2013-11-10 14:02:47 +00:00
Jacopo Cappellato 4c6d49b735 Upgrade to the latest version of Groovy: 2.1.9
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1537086 13f79535-47bb-0310-9956-ffa450edef68
2013-10-30 13:43:08 +00:00
Adrian Crum 6b416318af Expose the TestSuiteInfo constructor so it can be used outside its containing class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1536586 13f79535-47bb-0310-9956-ffa450edef68
2013-10-29 04:27:07 +00:00
Adrian Crum a770f0e853 Small fix for StringUtil.toMap method - avoid array index exceptions when a Map element is missing a value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1536170 13f79535-47bb-0310-9956-ffa450edef68
2013-10-27 18:06:15 +00:00
Adrian Crum 69b5d92007 Use parameterized return type in FreeMarkerWorker.unwrap method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535245 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 00:42:12 +00:00
Adrian Crum 185d02da45 ComponentConfig.java refactor - JavaDocs, no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534343 13f79535-47bb-0310-9956-ffa450edef68
2013-10-21 19:41:27 +00:00
Adrian Crum cd43d99579 ComponentConfig.java refactor - improved thread-safety for the WebappInfo inner class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534331 13f79535-47bb-0310-9956-ffa450edef68
2013-10-21 19:22:21 +00:00
Adrian Crum 3183961741 ComponentConfig.java refactor - thread-safety for the ComponentConfig inner classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534264 13f79535-47bb-0310-9956-ffa450edef68
2013-10-21 16:17:26 +00:00
Adrian Crum 618fcfa6cf ComponentConfig.java refactor - thread-safety for the ComponentConfig instance.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534178 13f79535-47bb-0310-9956-ffa450edef68
2013-10-21 14:23:29 +00:00
Adrian Crum b888457923 ComponentConfig.java refactor second pass - thread-safety for the static collections. Also fixed some flawed logic in the getComponentConfig factory method that caused redundant parsing of the XML file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534012 13f79535-47bb-0310-9956-ffa450edef68
2013-10-20 23:57:31 +00:00
Adrian Crum 6d6ccf33ff ComponentConfig.java refactor first pass - eliminate Javolution, small code cleanups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533960 13f79535-47bb-0310-9956-ffa450edef68
2013-10-20 20:22:38 +00:00
Adrian Crum 777d1aefa6 Reformatted ComponentConfig.java - no functional change. This is in preparation for some refactoring.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533946 13f79535-47bb-0310-9956-ffa450edef68
2013-10-20 18:42:07 +00:00
Adrian Crum 3f673c7bfe Allow JSONWriter to handle Iterators.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533927 13f79535-47bb-0310-9956-ffa450edef68
2013-10-20 16:54:32 +00:00
Jacques Le Roux c386f6ab30 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*What's for?*
Finally, OOTB the port offset is interesting in 2 cases:
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590
# To simultaneously run the demos without having to change much things, just one parameter (this will need to have the same commited in R13.07... to be discussed...)

Of course, It can be used for other purposes outside of the ASF context...

*How it's done?*
Basically, I just added a portoffset integer parameter to 3 ant targets (of course this JVM param can also be used in a Java call from command line): start, start-pos, start-both,

The portoffset parameter is set to zero by default in ClassLoaderContainer.java. 
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.

 The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests

To avoid hardcoding locations in services definitions, I also created 2 service-locations: main-http and main-soap

*To summarize:* these changes will be used to run "ant start" with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time. R13.07 could have a similar patch applied since it's not yet released...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533839 13f79535-47bb-0310-9956-ffa450edef68
2013-10-19 22:07:35 +00:00
Jacques Le Roux 6e93e48ea3 Renames owasp-esapi-full-java-1.4.jar to owasp-esapi-full-java-1.4-patched-by-OFBIZ-3135.jar to reflect the reality
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530678 13f79535-47bb-0310-9956-ffa450edef68
2013-10-09 15:31:16 +00:00
Jacques Le Roux c8ce55ecc9 A patch from Anahita Goljahani for Fixed mispelling of "occurred" https://issues.apache.org/jira/browse/OFBIZ-5342
jleroux: this includes a safe change in jquery.validate.js and jquery.validate.min.js

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530341 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 16:35:40 +00:00
Adrian Crum 55f80f4fd9 Replaced HashSet with LinkedHashSet in UtilMisc.java to preserve original ordering. Suggested by Leon on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527212 13f79535-47bb-0310-9956-ffa450edef68
2013-09-28 18:24:53 +00:00
Jacques Le Roux 0ef1ff543e Reverts revisions: 1525909 + 1526533 + 1526560, OFBIZ-4794 is not yet ready
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526583 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 15:44:40 +00:00
Jacques Le Roux c86a579cf8 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*What's for?*
OOTB the port offset is interesting in at least 3 cases:
# To simultaneously run tests on the same Buildbot machine. This is related to http://mail-archives.apache.org/mod_mbox/www-builds/201209.mbox/%3C002101cd991b$0a16de50$1e449af0$@16degrees.com.au%3E
# To simultaneously run the demos without having to change much things, just one parameter
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590

*How it's done?*
Basically, I just added a portoffset integer parameter to some ant targets (of course this JVM param can also be used in a Java call from command line):
* in trunk and R13.07: start, start-batch, start-debug, start-pos, start-both, run-tests and run-test
* in R12.04 and R11.04: run-tests, run-test. I did not set start targets because anyway it would miss the admin port offset, withouh much changes. So can't be used to demonstrate. We will continue to use the current paches for those.

The portoffset parameter is set to zero by default in ClassLoaderContainer.java. 
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.

 The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value in R13.07 and trunk.
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests

To avoid hardcoding locations in services definitions, I also had to create some service-locations: main-local-soap and main-remote-soap 

*What are the constraints?*
* For demos: the offset should not be applied to trunk because <service-location name="main-remote-soap" location="http://demo-trunk.ofbiz.apache.org:8080/webtools/control/SOAPService"/> is used for tests by trunk *and all releases*. It's useless to apply to trunk anyway,  offsetting port in releases is enough.
* I did not take into account the Ideal payment harcoded port values in IdealPaymentServiceTest.java. Weirdly I did not cross error during tests, though it seems there are tests using an harcoded port in url.

*What is the status?*
Locally (on Win XP)  I ran many tests combinations with <<ant load-demo run-tests>>.  
Applying the portoffset on a sole running test instance has no effects. I have still some fails (no errors) but those are not related to my changes, they appear also without.
But when I run a combination of any releases/trunk but with R11.04, I get a time out error with testSOAPSimpleService, that I can't explain so far. 
If I run the trunk alone with the portoffset no errors occur. Same if I run a release with portoffset and only testSOAPSimpleService in trunk (w/ or w/o portoffset)

*To summarize:* these changes will be used to run Buildot tests instances simultaneously . And, for coming releases, to run demos without having to create patches. Simply running ant start with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time.

*What I will to do for now:* commit the patches and test if I cross the same issue on Buildbot. If it's the same (99% chances it will) I will revert and will continue to locally try to find the reason . I believe this issue is unrelated to the changes I implemened.  And it's just because it's now possible to simultaneously run tests that it appears. 

BTW I just noticed that when you run R11.04 with R12.04, R12.04 takes almost all the CPU (XP is not very, while when running any combinations w/o R11.04 the CPU load is shared. 
Also there are far less tests in R11.04, which coul be the reason when I run it with another test run instance there are no issues.  Because R11.04 tests finish before the other instance gets to run testSOAPSimpleService.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1525909 13f79535-47bb-0310-9956-ffa450edef68
2013-09-24 14:47:30 +00:00
Jacopo Cappellato 367ac26332 Upgraded Fop to 1.1 (the latest bug fix release) and barcode4j to 2.1 (version compatible with Fop 1.1).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524835 13f79535-47bb-0310-9956-ffa450edef68
2013-09-19 20:47:37 +00:00
Adrian Crum 0e1449137d Small improvement to String-to-Date conversion: Accept either JDBC escape format or localized format.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524133 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 17:16:50 +00:00
Adrian Crum c276d17fa4 Small change to ObjectType.java - log warning on conversion failures so we can see what went wrong.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524132 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 17:15:20 +00:00
Adrian Crum ecb1c8e8d6 Fix a trivial compiler warning - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524131 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 17:13:52 +00:00
Jacques Le Roux 5c4bb0a2b4 Reverts r1518777
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1522675 13f79535-47bb-0310-9956-ffa450edef68
2013-09-12 17:36:45 +00:00
Jacques Le Roux d6eaefbeb6 This fixes "Net before overhead report generates an error" https://issues.apache.org/jira/browse/OFBIZ-5267
This is related with r1361130, where the birt component was moved from framework to specialpurpose.

The fix is to create the possibility of a loose coupling from applications controllers to specialpurpose controllers. For that an if-present attribute is added to the include element. When used, if the included controller does not exist, instead of an error and a stack trace, a warning is thrown (only in English, for developers) suggesting to checkout the component from trunk. Indeed, in the current case, this situation should only arise in release after 12.04 where the birt component, like all others but the ecommerce component, had been removed. This can be used in other cases, but for now only the component level is covered.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1518777 13f79535-47bb-0310-9956-ffa450edef68
2013-08-29 19:37:44 +00:00
Adrian Crum 2eb8a4ddfb Added a FIXME note for a bug introduced in revision 1089946.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1513195 13f79535-47bb-0310-9956-ffa450edef68
2013-08-12 16:55:57 +00:00
Hans Bakker afb70f3469 corrections of errors introduced with r1511742
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1512129 13f79535-47bb-0310-9956-ffa450edef68
2013-08-09 02:35:39 +00:00
Jacques Le Roux 1956e731a3 No functional changes, only formatting.
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 12:28:01 +00:00
Adrian Crum 9d76e3b412 Improved the parsing logic in FlexibleStringExpander.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1506151 13f79535-47bb-0310-9956-ffa450edef68
2013-07-23 16:41:02 +00:00