947 Commits

Author SHA1 Message Date
Steven Caswell
c4df48e565 changed modify method to calculate the field offset and use the set method, rather than adding the offset and letting Calendar perform the calculation - this fixes http://issues.apache.org/bugzilla/show_bug.cgi?id=25560;
updated javadocs on round method to explain how rounding across daylight saving time is handled


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137866 13f79535-47bb-0310-9956-ffa450edef68
2004-07-05 17:54:48 +00:00
Henri Yandell
cddc22f28c Adding in new Interpolation class for opinions. It is, apart from cleaning up,
creation of a unit test and renaming to 'interpolate', the submission from Ken
Fitzpatrick in Bugzilla: #18962.

Lang has had a class much like this before so opinions saught (I'm in fact suffering
from some major deja vu with this, need to research how many times I've committed this
type of code to Lang :) ).

Submitted by:	Ken Fitzpatrick


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137865 13f79535-47bb-0310-9956-ffa450edef68
2004-07-04 04:51:25 +00:00
Henri Yandell
18baf613e5 Tomcat uses getThrowable for its nested exception method, so adding this to ExceptionUtils' list.
Bugz: #29673
Submitted by: Lars Beuster


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137864 13f79535-47bb-0310-9956-ffa450edef68
2004-07-04 03:24:57 +00:00
Gary D. Gregory
8e45d583ee PR: http://issues.apache.org/bugzilla/show_bug.cgi?id=27876
[lang] ReflectionToStringBuilder.toString(null) throws exception by design
new ToStringBuilder(null).toString() == the style's nullText.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137863 13f79535-47bb-0310-9956-ffa450edef68
2004-07-01 17:58:09 +00:00
Gary D. Gregory
6c34babbe5 javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137862 13f79535-47bb-0310-9956-ffa450edef68
2004-07-01 17:52:07 +00:00
Gary D. Gregory
03d0a45c02 Javadoc typo.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137861 13f79535-47bb-0310-9956-ffa450edef68
2004-07-01 17:50:37 +00:00
Gary D. Gregory
439a9c3965 PR: http://issues.apache.org/bugzilla/show_bug.cgi?id=27876
[lang] ReflectionToStringBuilder.toString(null) throws exception by design
new ToStringBuilder(null).toString() == the style's nullText.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137860 13f79535-47bb-0310-9956-ffa450edef68
2004-07-01 17:40:10 +00:00
Gary D. Gregory
eec2c4c798 PR: http://issues.apache.org/bugzilla/show_bug.cgi?id=27876
[lang] ReflectionToStringBuilder.toString(null) throws exception by design
Javadoc updates.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137859 13f79535-47bb-0310-9956-ffa450edef68
2004-07-01 17:10:47 +00:00
Gary D. Gregory
14164d88eb Bugzilla Bug 27877
[lang][patch] Make ClassUtils methods null-safe and not throw an IAE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27877


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137858 13f79535-47bb-0310-9956-ffa450edef68
2004-06-30 18:33:58 +00:00
Gary D. Gregory
be6e4802f4 PR: http://issues.apache.org/bugzilla/show_bug.cgi?id=27876
[lang] ReflectionToStringBuilder.toString(null) throws exception by design
ReflectionToStringBuilder.toString is now null-safe and returns the style's nullText.
ToStringBuilder constructors are now null-safe. A new ToStringBuilder on a null followed by a call to toString returns "".


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137857 13f79535-47bb-0310-9956-ffa450edef68
2004-06-30 18:22:22 +00:00
Henri Yandell
5f7e26a978 flipped from being hardcoded to GregorianCalendar to using getInstance. Cannot think of any reason why a GregorianCalendar was being created directly
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137855 13f79535-47bb-0310-9956-ffa450edef68
2004-06-27 06:29:29 +00:00
Henri Yandell
680f38995b added newline to end of file
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137854 13f79535-47bb-0310-9956-ffa450edef68
2004-06-27 06:28:32 +00:00
Henri Yandell
2b47976319 fixed return type of getValue
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137853 13f79535-47bb-0310-9956-ffa450edef68
2004-06-27 05:23:47 +00:00
Henri Yandell
6ca1ffce84 This adds an array-argument based version of primitiveToWrapper. Apart from the argument of not having array based versions for every method, I can't see any reason not to add it, so have patched, modified and committing.
The origonal version optimised by returning the passed in array if there were no primitives. This seems a bit magical.

PR: #27640
Submitted by:	Alban Peignier


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137852 13f79535-47bb-0310-9956-ffa450edef68
2004-06-27 04:42:54 +00:00
Henri Yandell
f16ee38329 rolled back the Mutable change. It doubled the size of a mutable instance, and as it wrapped another object, doubled the work for garbage collection
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137851 13f79535-47bb-0310-9956-ffa450edef68
2004-06-24 04:20:46 +00:00
Henri Yandell
9840e7e0e8 simplified code by moving a chunk of the functionality up into the superclass, MutableNumber. Still important that setValue turns the Number into the correct type however, so that method may not go up into the superclass
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137850 13f79535-47bb-0310-9956-ffa450edef68
2004-06-13 06:18:49 +00:00
Matthew Hawthorne
c0f14e226e Adding initial crack at mutables.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137849 13f79535-47bb-0310-9956-ffa450edef68
2004-06-11 02:26:32 +00:00
Henri Yandell
813952e3f4 applied patch #27778, also added an indexOf(char[]..).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137848 13f79535-47bb-0310-9956-ffa450edef68
2004-06-06 03:53:24 +00:00
Henri Yandell
7eab1e6a6c improved javadoc, and missing javadoc for new uncapitalize method added.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137847 13f79535-47bb-0310-9956-ffa450edef68
2004-06-04 03:58:27 +00:00
Henri Yandell
f90d753d06 and adding an overloaded method for uncapitalize to maintain symmetry
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137846 13f79535-47bb-0310-9956-ffa450edef68
2004-06-03 03:49:47 +00:00
Henri Yandell
f845e36c54 added an overloaded method for capitalize and capitalizeFully so people can do things like capitalize double-barrelled names
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137845 13f79535-47bb-0310-9956-ffa450edef68
2004-06-03 03:40:28 +00:00
Henri Yandell
53543bc6d7 simplified the implementation of capitalizeFully
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137844 13f79535-47bb-0310-9956-ffa450edef68
2004-06-03 03:08:33 +00:00
Stephen Colebourne
0357030737 Ensure Validate has no inter-lang dependencies
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137843 13f79535-47bb-0310-9956-ffa450edef68
2004-06-01 21:25:35 +00:00
Stephen Colebourne
2358ca2953 Add more nested exception names
bug 29082, from Lars Beuster


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137842 13f79535-47bb-0310-9956-ffa450edef68
2004-06-01 21:15:27 +00:00
Stephen Colebourne
eaf7441da0 Add ObjectUtils.hashCode() - a null safe hash code
bug 28554, from Mario Winterer


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137840 13f79535-47bb-0310-9956-ffa450edef68
2004-06-01 21:08:48 +00:00
Stephen Colebourne
96e23c0fca Fix since tag
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137839 13f79535-47bb-0310-9956-ffa450edef68
2004-06-01 20:56:44 +00:00
Stephen Colebourne
7bc6a98e28 Include enums package tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137838 13f79535-47bb-0310-9956-ffa450edef68
2004-06-01 20:55:28 +00:00
Stephen Colebourne
aa1e8866bb Fix Enum equals to work correctly by reflection
bug 28180, from Matthias Eichel


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137837 13f79535-47bb-0310-9956-ffa450edef68
2004-06-01 20:54:57 +00:00
Fredrik Westermarck
aa5c638764 PR: http://issues.apache.org/bugzilla/show_bug.cgi?id=28468
Fixed error in javadoc.
Submitted by: Christian d'Heureuse


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137836 13f79535-47bb-0310-9956-ffa450edef68
2004-05-24 20:15:44 +00:00
Gary D. Gregory
e93f9adf7b Bullet proofing.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137835 13f79535-47bb-0310-9956-ffa450edef68
2004-05-24 00:10:15 +00:00
Gary D. Gregory
e37963c279 typo noticed by Stephen...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137830 13f79535-47bb-0310-9956-ffa450edef68
2004-03-19 00:29:32 +00:00
Gary D. Gregory
1463a4e60d Tests the difference in performance between CharUtils and CharSet.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137829 13f79535-47bb-0310-9956-ffa450edef68
2004-03-18 22:37:39 +00:00
Stephen Colebourne
1047e3cdf6 Update with @since tags
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137828 13f79535-47bb-0310-9956-ffa450edef68
2004-03-16 22:42:58 +00:00
Gary D. Gregory
d58c692b20 PR: Bugzilla Bug 27661 [lang] [patch] ArrayUtils.addAll doesn't always return new array
Submitted by:	Maarten Coene
Reviewed by:	
Gary Gregory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137827 13f79535-47bb-0310-9956-ffa450edef68
2004-03-16 01:40:57 +00:00
Stephen Colebourne
694d1de4a9 Fix replaceChars() to complete bug 25454
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137826 13f79535-47bb-0310-9956-ffa450edef68
2004-03-10 23:54:48 +00:00
Stephen Colebourne
70ecaae8b1 Improve javadoc of various methods
bug 27306, from Janek Bogucki


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137825 13f79535-47bb-0310-9956-ffa450edef68
2004-03-10 23:31:53 +00:00
Stephen Colebourne
8774e0a985 Rename toCharacter to toChar
Rename  toInteger  to  toIntValue
Add  toCharacterObject(String)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137824 13f79535-47bb-0310-9956-ffa450edef68
2004-03-10 23:23:46 +00:00
Stephen Colebourne
172d1fa7f8 Fix javadoc descriptions
from Christian Ullenboom


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137823 13f79535-47bb-0310-9956-ffa450edef68
2004-03-10 22:59:45 +00:00
Stephen Colebourne
87f5f094fb Remove util package - Identifier code now in sandbox [id] project
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137822 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 21:00:02 +00:00
Stephen Colebourne
5e7cf0ed0e Make exception implement Nestable interface and use NestableDelegate
bug 26954 (alternate implementation)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137821 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 00:13:38 +00:00
Fredrik Westermarck
8ec0fe03ec Fixed some typos in javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137818 13f79535-47bb-0310-9956-ffa450edef68
2004-02-26 21:10:01 +00:00
Gary D. Gregory
c03bc5f6ce Add support for java.awt.headless (Java 1.4.)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137817 13f79535-47bb-0310-9956-ffa450edef68
2004-02-25 00:25:29 +00:00
Fredrik Westermarck
fd3858e7e1 Added isAsciiPrintable() http://issues.apache.org/bugzilla/show_bug.cgi?id=22489.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137815 13f79535-47bb-0310-9956-ffa450edef68
2004-02-24 22:31:43 +00:00
Fredrik Westermarck
0ca766679c Renamed methods so that they follow the "MethodNameEvenForAcronyms"-scheme.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137814 13f79535-47bb-0310-9956-ffa450edef68
2004-02-24 22:22:51 +00:00
Gary D. Gregory
687abc5024 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27054
Fixes to some Javadoc errors in ClassUtils
Submitted by:	Janek Bogucki
Reviewed by:	Gary Gregory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137813 13f79535-47bb-0310-9956-ffa450edef68
2004-02-24 06:01:28 +00:00
Gary D. Gregory
4dcfc2fbb1 lang.enum.*:
Deprecated and replaced by org.apache.commons.lang.enums.* and will be
	removed in version 3.0. All classes in this package are deprecated and 
	repackaged to org.apache.commons.lang.enums since enum is a Java 1.5 
	keyword.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137811 13f79535-47bb-0310-9956-ffa450edef68
2004-02-23 04:34:20 +00:00
Fredrik Westermarck
ccd24d26f8 Using ArrayUtils.isEmpty().
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137809 13f79535-47bb-0310-9956-ffa450edef68
2004-02-19 21:31:19 +00:00
Fredrik Westermarck
c2ee7dde50 Using StringUtils.isEmpty().
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137806 13f79535-47bb-0310-9956-ffa450edef68
2004-02-19 21:04:03 +00:00
Stephen Colebourne
a80c77930f Fix spelling and scope
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137805 13f79535-47bb-0310-9956-ffa450edef68
2004-02-19 01:34:38 +00:00
Gary D. Gregory
01114af165 Make CLASS_NAME_COMPARATOR and PACKAGE_NAME_COMPARATOR work on Java 1.2.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137804 13f79535-47bb-0310-9956-ffa450edef68
2004-02-19 01:24:50 +00:00