Commit Graph

1653 Commits

Author SHA1 Message Date
Stephen Colebourne 37b2a3f215 Avoid new Boolean() via BooleanUtils
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@491052 13f79535-47bb-0310-9956-ffa450edef68
2006-12-29 17:16:37 +00:00
Stephen Colebourne f40b71e33d LANG-291 - Move min/max methods above inner class, add javadoc and format
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@491050 13f79535-47bb-0310-9956-ffa450edef68
2006-12-29 17:04:00 +00:00
Henri Yandell 6847ebcf5e Improved #LANG-303 test to prove the formatting works on each side of the serializing
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@490388 13f79535-47bb-0310-9956-ffa450edef68
2006-12-26 22:10:10 +00:00
Henri Yandell e9e167f9eb Applying test for #LANG-303, and a fix.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@490387 13f79535-47bb-0310-9956-ffa450edef68
2006-12-26 22:05:47 +00:00
Henri Yandell c47d6ce534 Removed some commented out reports; added a commented out findbugs report
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@490385 13f79535-47bb-0310-9956-ffa450edef68
2006-12-26 22:04:27 +00:00
Henri Yandell 17f5eaed71 Starting on Lang 2.3 release notes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@490374 13f79535-47bb-0310-9956-ffa450edef68
2006-12-26 21:23:20 +00:00
Henri Yandell 815f63670e StrBuilder no longer implements Cloneable. #LANG-302
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@490355 13f79535-47bb-0310-9956-ffa450edef68
2006-12-26 18:58:06 +00:00
Henri Yandell b57c699e69 Rolling back r489734 - Boolean.valueOf(boolean) only available from JDK 1.4 onwards
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@490161 13f79535-47bb-0310-9956-ffa450edef68
2006-12-25 18:57:37 +00:00
Henri Yandell cf20d13c64 Applying test for LANG-304 and fix to LocaleUtils
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@489749 13f79535-47bb-0310-9956-ffa450edef68
2006-12-22 20:34:37 +00:00
Henri Yandell 848a8144bc Fixed import. Also optimised list.toArray(..) to use new Token[list.size()] so that the passed in array is used and not reflection. Latter reported by FindBugs
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@489740 13f79535-47bb-0310-9956-ffa450edef68
2006-12-22 19:51:19 +00:00
Henri Yandell 5a4594cd37 new Boolean -> Boolean.valueOf. (Reported by FindBugs)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@489734 13f79535-47bb-0310-9956-ffa450edef68
2006-12-22 19:31:28 +00:00
Henri Yandell 37875137e9 Removing the Serializable implements. As far as I can tell, Number has been serializable since at the least Java 1.2. (Reported by FindBugs)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@489733 13f79535-47bb-0310-9956-ffa450edef68
2006-12-22 19:29:53 +00:00
Henri Yandell 03cc852bef Added a test for the under a day range in formatPeriod
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@488929 13f79535-47bb-0310-9956-ffa450edef68
2006-12-20 06:24:00 +00:00
Henri Yandell 4f514d5eb3 More tests, more bugfixes (aka rewrite of the guts).
It's looking much better, the only edge case that throws it for a loop is if things start on the 29th of February in a year. I've hacked it in the day mode, but I'm not sure why I had to do that - however I trust the brute force test to be right in day mode. 
In month mode, it's even trickier as to what the correct answer is. How many months between 29th Feb and 28th of Feb the next year? The answer is 11, or with days included it's 11 months and 28 days. I can't see any reason to define that better, so I'm declaring that law. 

Things are weird if you start on Feb 29 :)

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@488926 13f79535-47bb-0310-9956-ffa450edef68
2006-12-20 06:10:26 +00:00
Henri Yandell 381ed0c0f6 Added new tests (failing) in comments. Improved output for debugging brute force tests.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@488859 13f79535-47bb-0310-9956-ffa450edef68
2006-12-20 00:00:51 +00:00
Henri Yandell 93aa88fded Updated comment
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@488858 13f79535-47bb-0310-9956-ffa450edef68
2006-12-19 23:59:51 +00:00
Henri Yandell 1536077409 Fixing LANG-300 (reported by Jeremy Lemaire) - 1L to 9L incorrectly throw exceptions when passed into NumberUtils.createNumber. Fixed in both the math.NumbersUtils and the deprecated NumberUtils classes.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@488819 13f79535-47bb-0310-9956-ffa450edef68
2006-12-19 21:50:04 +00:00
Henri Yandell 868dd28444 Let a few tab characters slip in - Eclipse wasn't configured yet. Replacing with spaces.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@486525 13f79535-47bb-0310-9956-ffa450edef68
2006-12-13 07:12:38 +00:00
Henri Yandell dd23ae863a More unit tests and bugfixes. The currently failing test is commented out, so more bugfixes to come.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@486523 13f79535-47bb-0310-9956-ffa450edef68
2006-12-13 07:09:24 +00:00
Henri Yandell 9b0b19a916 Applying a unit test for LANG-299 and the fix that Francisco Benavent suggests.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@486377 13f79535-47bb-0310-9956-ffa450edef68
2006-12-12 22:34:39 +00:00
Henri Yandell aaaa779108 Setting the maven repo - apologies if this borks anything
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@486363 13f79535-47bb-0310-9956-ffa450edef68
2006-12-12 22:11:41 +00:00
Henri Yandell 5fb6521ab9 More tests added to DurationFormatUtilsTest and discovered bugs fixed in the DurationFormatUtils.formatPeriod method.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@485481 13f79535-47bb-0310-9956-ffa450edef68
2006-12-11 03:33:09 +00:00
Henri Yandell ee4ad2727f Added javadoc to explain the quandry in how to count month/day differences
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@483891 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 09:05:52 +00:00
Rahul Akolkar 1554d439a5 Match groupIds for m1 and m2. We should account for the fact that its relatively easier to deploy snaps with m2 (such as IO was last night) and we shouldn't spray component artifacts in two different places (without relocation).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@483126 13f79535-47bb-0310-9956-ffa450edef68
2006-12-06 15:55:07 +00:00
Rahul Akolkar 3077b3b3fc Missing props on various m2 poms.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@483119 13f79535-47bb-0310-9956-ffa450edef68
2006-12-06 15:44:10 +00:00
Henri Yandell 012998b3d4 Applying max/min for Comparables as supplied by David Karlsen in LANG-291
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@475113 13f79535-47bb-0310-9956-ffa450edef68
2006-11-15 04:14:42 +00:00
Henri Yandell 11a4975580 Bit of an odd unit test, causes trouble under maven-2. So fixing it to make it more like the other tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@475111 13f79535-47bb-0310-9956-ffa450edef68
2006-11-15 04:11:55 +00:00
Henri Yandell 989f0caf65 Hooking to the newly released v1 commons-parent pom
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@474146 13f79535-47bb-0310-9956-ffa450edef68
2006-11-13 04:49:07 +00:00
Henri Yandell 50a532da55 Adding M2 pom for Lang. Two tests in Enums fail (well, 2 copies of the same one). Will dig into understanding why - I guess m2 classloading is different from m1
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@473654 13f79535-47bb-0310-9956-ffa450edef68
2006-11-11 06:38:53 +00:00
Henri Yandell ad895a71ef removing unnecessary part of the pom; no xml files in lang's test directory
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@473651 13f79535-47bb-0310-9956-ffa450edef68
2006-11-11 06:21:29 +00:00
Rahul Akolkar abd5f7e5dd Missing SVN properties, possibly some large diffs, no functional change.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@472712 13f79535-47bb-0310-9956-ffa450edef68
2006-11-09 00:14:44 +00:00
Henri Yandell 5387645b15 Removing @author query
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@471630 13f79535-47bb-0310-9956-ffa450edef68
2006-11-06 04:14:45 +00:00
Henri Yandell d8a6e05b5f Removing my @author tags
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@471626 13f79535-47bb-0310-9956-ffa450edef68
2006-11-06 04:02:09 +00:00
Henri Yandell 1a158281aa Fixng LANG-295 - thisBuf.length calls. There were two of the calls, so I've committed a unit test showing things are broken and a fix in both cases.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@469696 13f79535-47bb-0310-9956-ffa450edef68
2006-10-31 23:00:54 +00:00
Henri Yandell 8e52e2169b Fixing #LANG-294. The indexOf method did not take into account the size variable that limited the amount of the buffer that should be looked at.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@469677 13f79535-47bb-0310-9956-ffa450edef68
2006-10-31 22:15:00 +00:00
Henri Yandell d8b6f5b5c6 Applying unit test and fix for #LANG-292. Also fixes a couple of problems with the unescape(Writer..) overload that came up
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@469661 13f79535-47bb-0310-9956-ffa450edef68
2006-10-31 21:34:03 +00:00
Henri Yandell 8fde2caf64 Adding equals(int[], int[]) style methods to NumberUtils as requested by Paul Benedict in LANG-238
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@467482 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 21:02:56 +00:00
Henri Yandell 7a003412c6 Adding NumberUtils.max(byte[]) and NumberUtils.min(byte[]) as noted in LANG-289
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@467477 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 20:51:08 +00:00
Henri Yandell c1fad46c4c Adding in Holger and Stepan's names. I guess I should be doing this each time I apply a patch
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@467468 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 20:31:46 +00:00
Henri Yandell 285fc07c5a Applying optimisation from LANG-287. Thanks to Stepan Koltsov and Holger Hoffstatte.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@467467 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 20:29:44 +00:00
Henri Yandell 10bdedc90b Taking a stab at adding information on a Lang and Java 5.0 enum comparison
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@466285 13f79535-47bb-0310-9956-ffa450edef68
2006-10-20 22:36:21 +00:00
Henri Yandell fd206080b0 Adding note that using switch is not type-safe
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@466275 13f79535-47bb-0310-9956-ffa450edef68
2006-10-20 22:02:34 +00:00
Henri Yandell 94530f113e Refactored duration tests to make it simpler to add new ones. Added a few edge cases to test the replacement for the += 31 code
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@454427 13f79535-47bb-0310-9956-ffa450edef68
2006-10-09 16:57:28 +00:00
Henri Yandell 25ef9a58cb formetted to formatted - typo fix
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@454426 13f79535-47bb-0310-9956-ffa450edef68
2006-10-09 16:56:49 +00:00
Henri Yandell 1d5c03fac6 Adding a unit test for #LANG-281 and a fix. The fix involves removing the reduceAndCorrect method. It appears that this method was doing sod all - which is worrying as it used to be important. I'm guessing that it was a bad fix for a bug that was then subsequently fixed with other code. I'll create a JIRA issue to create more tests to test out the +31 block of code.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@453818 13f79535-47bb-0310-9956-ffa450edef68
2006-10-07 00:22:42 +00:00
Henri Yandell e91541fcbd Adding details of 2.2 release
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@452972 13f79535-47bb-0310-9956-ffa450edef68
2006-10-04 18:51:33 +00:00
Gary D. Gregory 5e864d372f // comments.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@451406 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 19:56:41 +00:00
Henri Yandell 320b0b259c Applying patch from Will Pugh in #LANG-268 - Addition of new variants of the join method.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@451394 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 19:20:03 +00:00
Henri Yandell c12c571215 Merging r451373 over from the https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/branches/LANG_2_2_X: Removing sourceModifications block as it does not appear to be doing anything for us. Also removing the aspect and integration tags as they are also unused.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@451374 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 18:17:09 +00:00
Henri Yandell ffc34e601f Merging r450528 from https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/branches/LANG_2_2_X - roll back the cobertura plugin
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@450529 13f79535-47bb-0310-9956-ffa450edef68
2006-09-27 18:05:05 +00:00