Commit Graph

2100 Commits

Author SHA1 Message Date
Sebastian Bazley 491a1d6e88 LANG-581 - Javadoc bug in org.apache.commons.lang.StringUtils.removeEndIgnoreCase()
Add some case-insensitive examples

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@899242 13f79535-47bb-0310-9956-ffa450edef68
2010-01-14 15:37:42 +00:00
Sebastian Bazley a7b7e11461 Fix JUnit message to agree with test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@899239 13f79535-47bb-0310-9956-ffa450edef68
2010-01-14 15:31:13 +00:00
Sebastian Bazley 9a5da72bbf LANG-581 - Javadoc bug in org.apache.commons.lang.StringUtils.removeEndIgnoreCase()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@899231 13f79535-47bb-0310-9956-ffa450edef68
2010-01-14 15:12:47 +00:00
Henri Yandell 86e893cc6d Removing unnecessary <p> and Class variable
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@897533 13f79535-47bb-0310-9956-ffa450edef68
2010-01-09 20:23:13 +00:00
Henri Yandell 5494a87bbb Replacing the creation of a List in the core of each Builder class to test contains on the excludeFields with a call to ArrayUtils.contains. Reported by Anthony Whitford in LANG-575
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@897421 13f79535-47bb-0310-9956-ffa450edef68
2010-01-09 11:44:06 +00:00
Henri Yandell 8d518b7786 Performance improvement per Anthony Whitford in LANG-574. Check for isArray to short-circuit the 9 instanceof checks. Improves both non-arrays and Object[] in tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@897419 13f79535-47bb-0310-9956-ffa450edef68
2010-01-09 11:20:49 +00:00
Henri Yandell 72e4ab4b00 Synchronizing the COMMON Map so that getInstance doesn't miss a put from a subclass in another thread. LANG-494
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@897408 13f79535-47bb-0310-9956-ffa450edef68
2010-01-09 10:06:42 +00:00
Henri Yandell 2493294550 Removing unused imports
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@897406 13f79535-47bb-0310-9956-ffa450edef68
2010-01-09 10:02:59 +00:00
Henri Yandell 069d15e863 Removing unused WordUtils import
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@897404 13f79535-47bb-0310-9956-ffa450edef68
2010-01-09 10:02:25 +00:00
Henri Yandell 18b3e505cf Renaming media for the simple reason that two directories pisses off my tab completion :)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895915 13f79535-47bb-0310-9956-ffa450edef68
2010-01-05 06:11:37 +00:00
Oliver Heger ee00c7a6f7 [LANG-560] Added TimedSemaphore class to concurrent package.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895466 13f79535-47bb-0310-9956-ffa450edef68
2010-01-03 19:04:08 +00:00
Paul C. Benedict Jr 76e14e483c Push down WordUtils to "text" sub-package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895335 13f79535-47bb-0310-9956-ffa450edef68
2010-01-03 07:13:31 +00:00
Paul C. Benedict Jr 08d51233f9 LANG-559: Added validState()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895334 13f79535-47bb-0310-9956-ffa450edef68
2010-01-03 06:39:04 +00:00
Paul C. Benedict Jr 8104e916b4 Move test source into src/test/java
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895324 13f79535-47bb-0310-9956-ffa450edef68
2010-01-03 02:14:46 +00:00
Paul C. Benedict Jr fc5c081e22 Move main source to src/main/java
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895322 13f79535-47bb-0310-9956-ffa450edef68
2010-01-03 02:11:26 +00:00
Henri Yandell 1fe031e6ca Added deprecation for 4.0 notices. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895132 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 06:13:25 +00:00
Henri Yandell d7a5c76170 Removed the support for exceptions with a field named 'detail'. It's been there since the beginning, but does not seem like a very important use case. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895131 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 06:07:11 +00:00
Henri Yandell 99b21a45ef Removed unnecessary private toArray method. It was only invoked from one location. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895130 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 06:02:33 +00:00
Henri Yandell e539bde396 Removed the ability to modify the static store of cause method names. If that feature is wanted, it's easy for the user to pass in their own list, or use the newly added getDefaultCauseMethodNames and modify that before calling. This removes the need for synchronization code. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895129 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 05:58:57 +00:00
Henri Yandell e87ee0a705 Removing now unnecessary static initializer block. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895128 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 05:47:45 +00:00
Henri Yandell e6e7f16e57 Removing setCause method. JDK 1.4 provided an initCause method and this method was to support both pre and post JDK 1.4 use cases. I don't see much of a reason to keep supporting Exceptions that have setCause as well as the inherited initCause. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895126 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 05:44:35 +00:00
Henri Yandell 00a4628d4e Removing unused NestableRuntimeException legacy class. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895123 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 05:24:18 +00:00
Henri Yandell 228527bd83 Removing the selfCause tests. This is not a legal state for JDK Throwable cause properties, and I'm going to drop the support for people creating methods named 'setCause'. I can't find a lot of examples of this method naming in search engines. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895122 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 05:15:05 +00:00
Henri Yandell 64f0e8ecb0 Removing SQLException usage per LANG-539. This leads to removing getCauseUsingWellKnownTypes and dropping the optimization step for SQLException and InvocationTargetException; plus a simplification of the code in getCause(String,String[]) for LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895118 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 04:57:10 +00:00
Henri Yandell ebfb96b0a9 Removing isThrowableNested, isNestedThrowable and getFullStackTrace as they were all types of no-op once you got to JDK 1.4. LANG-491
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895097 13f79535-47bb-0310-9956-ffa450edef68
2010-01-02 00:06:06 +00:00
Henri Yandell 1a433d2ec7 Adding parseDateStrictly method per LANG-486
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@895055 13f79535-47bb-0310-9956-ffa450edef68
2010-01-01 19:01:18 +00:00
Henri Yandell edc4514e15 Removing commented out code.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@893703 13f79535-47bb-0310-9956-ffa450edef68
2009-12-24 07:13:17 +00:00
Joerg Schaible bcfc180f37 Add ArrayUtils.toArray (LANG-537).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@893547 13f79535-47bb-0310-9956-ffa450edef68
2009-12-23 15:27:38 +00:00
Henri Yandell 26bc3fe010 isNumber(String) and createNumber(String) both modified to support "2.". LANG-521
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@893088 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:52:42 +00:00
Henri Yandell 506bd018b3 Making class final, switching getMin/Max usage to this.min/max usage. LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@893083 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:23:27 +00:00
Sebastian Bazley 5739bba3eb LANG-568 - @SuppressWarnings("unchecked") is used too generally
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892343 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 18:44:24 +00:00
Sebastian Bazley 352a4ef2a3 Propagate original exception (LANG-567); update docs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892326 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 18:02:11 +00:00
Henri Yandell e5ccf09656 Switching from getTime() to getTimeInMillis() per Sebb's report that it still fixes LANG-538 and is going to be lighter weight
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892161 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 07:21:10 +00:00
Sebastian Bazley 8fdfbff87c LANG-568 - @SuppressWarnings("unchecked") is used too generally
Partial fix - some warnings remain to be addressed

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892136 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 05:04:11 +00:00
Sebastian Bazley ed3d84438b LANG-568 - @SuppressWarnings("unchecked") is used too generally
Partial fix - some warnings remain to be addressed

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892135 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 05:03:42 +00:00
Sebastian Bazley fd7450f301 Check remove on non-Object array.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892132 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 04:59:25 +00:00
Sebastian Bazley a7bbdfb54b Remove unnecessary main() and suite() methods from tests
Also remove setUp() and tearDown() methods with no useful code.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892118 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 03:39:13 +00:00
Sebastian Bazley 2f8f67ab29 LANG-567 - ArrayUtils.addAll(T[] array1, T... array2) does not handle mixed types very well
Also remove unnecessary main() and suite() from test class

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892114 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 02:50:21 +00:00
Henri Yandell eb2b517b46 Improving doc to indicate null->false for elementBefore(T) and elementAfter(T). LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@891635 13f79535-47bb-0310-9956-ffa450edef68
2009-12-17 11:13:39 +00:00
Henri Yandell a926c717c0 Making ComparableComparator Serializable. This doesn't stop people putting non-Serializable comparators in a Range, but it does mean the default case can be serialized. LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@891627 13f79535-47bb-0310-9956-ffa450edef68
2009-12-17 11:02:53 +00:00
Henri Yandell 1b85d8ba9e Applying 'fix' for LANG-530. DateUtils.parseDate now protects the common use case of FastDateFormat ZZ output, namely ZZ on the end of the pattern, from being passed to SimpleDateFormat as is. Use of ZZ elsewhere in the pattern isn't protected and will want to consider emulating the String changes made in this patch.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@891572 13f79535-47bb-0310-9956-ffa450edef68
2009-12-17 07:21:25 +00:00
Henri Yandell 825481f019 Fixing LANG-538 - you need to call getTime() on a calendar sometimes to get it in the right state, otherwise the timezone gets out of whack.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@891542 13f79535-47bb-0310-9956-ffa450edef68
2009-12-17 06:04:28 +00:00
Henri Yandell 91ac16e0b4 Applying Niall's patch from LANG-569 adding indexOfIgnoreCase() and lastIndexOfIgnoreCase() methods to StringUtils
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@891528 13f79535-47bb-0310-9956-ffa450edef68
2009-12-17 03:35:39 +00:00
Sebastian Bazley 84522bed5d Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@891316 13f79535-47bb-0310-9956-ffa450edef68
2009-12-16 17:04:47 +00:00
Sebastian Bazley 8beafc0da1 Fix Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@891268 13f79535-47bb-0310-9956-ffa450edef68
2009-12-16 14:54:48 +00:00
Henri Yandell 425dcadca5 Applying my patch from LANG-469 - adding a lastOrdinalIndexOf method to complement the existing ordinalIndexOf method
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@891142 13f79535-47bb-0310-9956-ffa450edef68
2009-12-16 07:32:30 +00:00
Sebastian Bazley aa5d2162e5 Fix generic map type
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890413 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 17:54:26 +00:00
Sebastian Bazley db9b110a7e Fix up some raw types.
May need to adjust some types if lookup() is made generic (see LANG-564)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890360 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 15:06:14 +00:00
Sebastian Bazley 8f80cedd8c Make autoboxing explicit
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890337 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 14:11:31 +00:00
Sebastian Bazley a05e28d6e2 Changing appendAll and appendWithSeparators methods to take Iterable instead of Collection. LANG-548 - part two, change Javadoc references
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890336 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 14:10:55 +00:00
Sebastian Bazley 62a047cc69 Fix up raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890329 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 13:54:27 +00:00
Sebastian Bazley 7a8356e0fb Fix up raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890328 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 13:54:06 +00:00
Sebastian Bazley 128b94d1d9 Fix Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890327 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 13:53:17 +00:00
Henri Yandell 56550bf277 Applying fix for LANG-552. StringUtils.replaceEach(String, String[], String[]) no longer NPEs when null appears in the last String[]
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890212 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 07:51:05 +00:00
Henri Yandell dafb8e85dc Adding stripAccents method to StringUtils. It requires JDK 1.6 (and accesses it via reflection until Lang becomes 1.6 dependent). LANG-285
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890205 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 07:31:42 +00:00
Henri Yandell 0c6c23076f Adding a reset() method to EqualsBuilder. LANG-466
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@890196 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 06:40:42 +00:00
Henri Yandell 2851806365 Changing appendAll and appendWithSeparators methods to take Iterable instead of Collection. LANG-548
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@889236 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 12:28:50 +00:00
Henri Yandell 3745c67bd2 Making noNullElements methods take Iterable types rather than Collection types. LANG-548
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@889235 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 12:28:15 +00:00
Henri Yandell 14e9231cb0 Fixing package name. LANG-563
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@889227 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 12:08:23 +00:00
Henri Yandell 4c560e85a2 Removing package name from comment - unnecessary. LANG-563
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@889225 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 12:06:34 +00:00
Henri Yandell cf429f5324 Moving back from lang3 to lang for the exception stack traces in these test documentation comments as they indicate historical cases. LANG-563
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@889222 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 12:04:56 +00:00
Henri Yandell dc0509f7eb Fixing @links to point to new lang3 package. LANG-563
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@889219 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 12:02:50 +00:00
Henri Yandell c6e8f706dc Renaming class package names and unit test data to use org.apache.commons.lang3. LANG-563
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@889215 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 11:56:38 +00:00
Henri Yandell debc02c6d9 Changing directory name from lang to lang3. Build will fail (probably) until Java code is changed in subsequent commit. LANG-563
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@889202 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 11:33:51 +00:00
Niall Pemberton ea3f8ad774 LANG-508 Fix tests broken by r885195
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@885913 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 20:27:40 +00:00
Paul C. Benedict Jr e51cf4380e LANG-508: Allow exception message parameters as varargs, employ String#format to format exception message, full documentation update
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@885195 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 06:30:23 +00:00
Henri Yandell e346542745 Removing broken @see
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@884498 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 10:52:59 +00:00
Henri Yandell 4bf376b34b Removing @author on method (not legal javadoc) and adding an @see to the jira issue
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@884494 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 10:42:27 +00:00
Henri Yandell d21300717e Fixing javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@884493 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 10:40:13 +00:00
Henri Yandell b1ac38cb1b Clone the passed in array
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@884490 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 10:29:33 +00:00
Henri Yandell 0abdedcd16 Removing imports from same package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@884489 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 10:27:34 +00:00
Henri Yandell ad953dc976 Fixing javadoc typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@884487 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 10:23:16 +00:00
Henri Yandell 823eb10825 Moving 'todo' to 'TODO' to match general style
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@884486 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 10:17:31 +00:00
Oliver Heger 63e4b09f23 [LANG-501] There was a problem with inconsistent line endings in the last commit, so the svn:eol-style property was not set. Fixing now.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@883101 13f79535-47bb-0310-9956-ffa450edef68
2009-11-22 17:03:10 +00:00
Oliver Heger 21df5c4fce [LANG-501] Added CallableBackgroundInitializer class with unit tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@883100 13f79535-47bb-0310-9956-ffa450edef68
2009-11-22 16:57:39 +00:00
Sebastian Bazley 37239c934b Generic fix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882971 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 19:05:52 +00:00
Sebastian Bazley 030babab20 Rename private variable to avoid shadowing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882970 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 19:05:38 +00:00
Sebastian Bazley 765963f423 Exceptions not thrown
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882969 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 18:58:57 +00:00
Sebastian Bazley a12632228f Suppress Eclipse warnings for deliberate behaviour
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882968 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 18:58:33 +00:00
Sebastian Bazley 9a76dcf3c9 Suppress Eclipse warnings for deliberate name shadowing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882964 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 18:48:48 +00:00
Sebastian Bazley 38ac11d0b7 Add some basic Comparator tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882960 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 18:30:09 +00:00
Sebastian Bazley 229f41046f Fix most Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882950 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 18:11:07 +00:00
Sebastian Bazley 55559050cf Fix generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882949 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 18:07:15 +00:00
Henri Yandell d45e05d584 Adding a char Range test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882855 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 08:08:52 +00:00
Henri Yandell 5adce14980 Switched to static builder methods, allowing two of the constructors to restrict T to Comparables, and removed javadoc that discussed subclasses optimising methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882854 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 08:05:55 +00:00
Sebastian Bazley 5839d3e011 Javadoc fixes; add missing @Overrides
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882197 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 16:40:21 +00:00
Sebastian Bazley c4e87426ff Unused imports
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@882193 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 16:29:01 +00:00
Henri Yandell fef34b82eb Implementing Serializable - part of LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881689 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 07:11:41 +00:00
Henri Yandell 8550f4da08 Removing ArrayUtils.hashCode per LANG-492; it is now available as java.util.Arrays.hashCode
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881685 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 06:43:23 +00:00
Paul C. Benedict Jr 87c4b35e52 LANG-555: Add IS_OS_WINDOWS_7 constant
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881672 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 05:58:06 +00:00
Paul C. Benedict Jr 0698ab208a LANG-554: Add 1.7 check
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881671 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 05:52:01 +00:00
Stephen Colebourne 34b9c73a6d Fix to handle null input array, and remove check for NULL
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881209 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 09:30:41 +00:00
Stephen Colebourne ac719ec4ab Move firstNonNull() to better place in file
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881205 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 09:19:05 +00:00
Stephen Colebourne a14051481e Enhance Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881204 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 09:13:49 +00:00
Henri Yandell 0714795b6f Removing the EscapeUtils/UnescapeUtils classes, and making StringEscapeUtils the replacement. Writer variants of StringEscapeUtils are dropped - instead you hit those via the translator objects. Some javadoc/testing cleanup needed.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881197 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 08:45:55 +00:00
Henri Yandell c090db27a4 Remove SQL from javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@881181 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 07:52:35 +00:00
Henri Yandell ab1bf739da Changing the note on high > 0x7f characters being escaped. LANG-516
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@836152 13f79535-47bb-0310-9956-ffa450edef68
2009-11-14 10:46:04 +00:00
Henri Yandell 000bac6b94 Changing the standard escapeXml method to not escape high characters. It's easier to add that back on that remove it. LANG-516 and LANG-517
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@836151 13f79535-47bb-0310-9956-ffa450edef68
2009-11-14 10:45:27 +00:00
Henri Yandell 9adbbb0bbf Rolling back r611543 for LANG-393, and removing the special handling of BigDecimal to use compareTo instead of equals because it creates an inequality with HashCodeBuilder [reported in LANG-467 by David Jones]
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@836149 13f79535-47bb-0310-9956-ffa450edef68
2009-11-14 10:10:19 +00:00
Matthew Jason Benson 5646355247 [LANG-553] Add TypeUtils
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@835975 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 20:17:47 +00:00
Henri Yandell 56e830a235 Removing old Range classes per LANG-551. New lang.Range class replaces these
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@835780 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 08:54:04 +00:00
Henri Yandell 452a6c0cd8 Adding elementCompareTo method as requested in LANG-386 (which called the method positionOfXxx)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@835777 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 08:51:08 +00:00
Henri Yandell 4c124cea28 Adding @throws and test for the ClassCastException thrown by the ComparableComparator
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@835771 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 08:05:11 +00:00
Matthew Jason Benson 89af393b32 generics fixup
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@834663 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 20:59:16 +00:00
Oliver Heger caf3f0c3c3 [LANG-545] Added ability to create a ConstantFuture object. Thanks to Stephen Colebourne for the patch.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@833709 13f79535-47bb-0310-9956-ffa450edef68
2009-11-07 16:37:05 +00:00
Henri Yandell 5bfa8aaf14 Adding todo note to consider final/field-usage - LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@833363 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 11:53:38 +00:00
Henri Yandell da7e4f3840 Adding more tests, plus a rename of lessThan to elementBefore; greaterThan to elementAfter and bugfix so the new code works - LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@833358 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 11:45:38 +00:00
Henri Yandell b7a34131b8 containsRange test added - LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@833343 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 11:11:38 +00:00
Henri Yandell bd900f6be7 Added test for contains method, along with a null fix for contains and improved javadoc - LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@833337 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 10:47:15 +00:00
Henri Yandell ff1102d68d Committing work in progress version of a new Range class to replace the math.*Range classes as discussed in LANG-551
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@833308 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 07:56:22 +00:00
Henri Yandell acb16f7348 Applying Jörg Gottschling's patch from LANG-358 with Thomas Menzel's naming from LANG-550 and some of his tests. This adds a firstNonNull method to ObjectUtils.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@833016 13f79535-47bb-0310-9956-ffa450edef68
2009-11-05 07:25:54 +00:00
Stephen Colebourne 928950c9bf LANG-493 - Remove allElementsOfType as generics handles this pretty well now
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@831709 13f79535-47bb-0310-9956-ffa450edef68
2009-11-01 17:10:02 +00:00
Stephen Colebourne dab4ca0812 Add generic return types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@831704 13f79535-47bb-0310-9956-ffa450edef68
2009-11-01 16:54:34 +00:00
Stephen Colebourne 661832fb35 LANG-546 - Validate.validIndex()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@831689 13f79535-47bb-0310-9956-ffa450edef68
2009-11-01 15:45:09 +00:00
Stephen Colebourne c1590455d2 LANG-290 - Rename isEnum to isValidEnum
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@831687 13f79535-47bb-0310-9956-ffa450edef68
2009-11-01 15:29:04 +00:00
Stephen Colebourne de820ce189 LANG-487 - Make default style thread-safe (better Javadoc)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@831686 13f79535-47bb-0310-9956-ffa450edef68
2009-11-01 15:25:10 +00:00
Oliver Heger a3e3a0b08f [LANG-501] Added MultiBackgroundInitializer class with JUnit tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@831587 13f79535-47bb-0310-9956-ffa450edef68
2009-10-31 19:52:58 +00:00
Oliver Heger 8c413aecd8 [LANG-501] Added BackgroundInitializer class with JUnit tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@831586 13f79535-47bb-0310-9956-ffa450edef68
2009-10-31 19:48:52 +00:00
Stephen Colebourne 86008e6c48 LANG-548 - Use Iterable instead of Collection
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830042 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 01:14:57 +00:00
Stephen Colebourne 77e3dcc393 LANG-487 - Make default style thread-safe (better Javadoc)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830040 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 00:59:15 +00:00
Stephen Colebourne bf626b85ba LANG-290 - Add more enum utility methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830038 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 00:51:38 +00:00
Stephen Colebourne 9e2d954177 Remove my author tag, add ASF author tag
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830032 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 00:15:00 +00:00
Stephen Colebourne 2d31aaf4f0 Add isTrue/isFalse methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830029 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 23:53:41 +00:00
Stephen Colebourne 6bc82fa5f6 Reorder methods for consistency within package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830028 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 23:50:31 +00:00
Stephen Colebourne ffeea79694 Javadoc clarifications and tidy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830027 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 23:49:25 +00:00
Stephen Colebourne 45008b994b Javadoc clarifications and tidy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830024 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 23:43:09 +00:00
Stephen Colebourne 283fa00f77 Use valueOf() to convert primitive to wrapper class
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830016 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 23:12:05 +00:00
Stephen Colebourne bbab0a4b4c Enhance Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829993 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 22:06:13 +00:00
Stephen Colebourne d55299a055 LANG-487 - Make default style thread-safe
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829991 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 21:56:46 +00:00
Sebastian Bazley 61800cce67 Drop unthrown Exception
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829941 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 20:34:50 +00:00
Sebastian Bazley ababfcf843 No longer need to suppress warning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829684 13f79535-47bb-0310-9956-ffa450edef68
2009-10-26 01:33:25 +00:00
Stephen Colebourne 93a3b6b251 Remove generics as they provide little value and get in the way
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829635 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 19:59:31 +00:00
Sebastian Bazley b1cf6305e5 Fix internal raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829549 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:45:55 +00:00
Sebastian Bazley 6627b34cbf Drop unthrown Exception
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829548 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:45:41 +00:00
Sebastian Bazley ebb466c417 Fix internal raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829547 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:44:48 +00:00
Sebastian Bazley 7072a549e5 Fix some raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829545 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:44:15 +00:00
Sebastian Bazley f4ace74c76 Fix some raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829541 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:26:24 +00:00
Sebastian Bazley 509e3d2e3a Be more generous in the types we accept
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829540 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:24:27 +00:00
Sebastian Bazley c21e66257b Fix some raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829538 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:17:49 +00:00
Sebastian Bazley 14cde02867 Fix some raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829537 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:08:55 +00:00
Sebastian Bazley 5ca6b02849 Fix some raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829535 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:07:57 +00:00
Sebastian Bazley 64712a4fd3 Fix internal raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829534 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:07:08 +00:00
Sebastian Bazley 1da31f43a9 Unused variables
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829533 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 11:06:52 +00:00
Henri Yandell e2ccc014f8 Rolling back 826960 - IOException would need to be added to the API
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829487 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 03:37:21 +00:00
Stephen Colebourne dc200f42a4 Remove references to Labeled in method names as it is unecessary and the spelling looks poor/confusing in British English
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829405 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 16:45:42 +00:00
Stephen Colebourne 0a72dbad5a Allow contexted exception to store non-serializable objects (more flexible, and doesn't prevent serialization)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829404 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 16:38:08 +00:00
Stephen Colebourne 926ed9ea0e Tidy up contexted exception classes, better Javadoc, final variables, etc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829400 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 16:27:30 +00:00
Sebastian Bazley f61c229c74 Fix internal raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829398 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 16:17:13 +00:00
Sebastian Bazley 2f941fb8d6 Unused
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829397 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 16:16:42 +00:00
Sebastian Bazley 96dea6c4f6 Fix internal raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829395 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 16:04:22 +00:00
Sebastian Bazley a80284f4c5 Document unused items
Raw types

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829394 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 16:02:23 +00:00
Sebastian Bazley 223eafb8c9 Drop unused fields
Raw types

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829393 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 16:01:37 +00:00
Sebastian Bazley 835085d912 Fix Eclipse case drop-thru warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829391 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 15:48:10 +00:00
Sebastian Bazley c341321e0c Document impossible unchecked cast warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829388 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 15:38:31 +00:00
Stephen Colebourne ab6b8d8d57 LANG-547 - Remove unused field
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829385 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 15:18:48 +00:00
Sebastian Bazley 6fea27514a Fix some raw types and other Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829375 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 14:26:35 +00:00
Sebastian Bazley 823e75f9b3 Fix some raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829374 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 14:15:08 +00:00
Sebastian Bazley 6622091f9b Fix internal raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829367 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 13:43:11 +00:00
Sebastian Bazley fdb8010676 Fix raw Class types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829364 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 13:37:46 +00:00
Sebastian Bazley 6eab86bafd Missing @Override
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829360 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 12:55:00 +00:00
Sebastian Bazley 726835ef8c Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829359 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 12:54:21 +00:00
Stephen Colebourne 17748e482d Apply generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829352 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 12:08:55 +00:00
Stephen Colebourne 14224204d9 Fix test case tear down that causes other tests to break
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829348 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 11:44:07 +00:00
Stephen Colebourne d87e7f52c0 Reorder methods and adjust Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829345 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 11:23:53 +00:00
Stephen Colebourne 58bf5f3aa3 Apply generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829343 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 11:08:52 +00:00
Henri Yandell 4f9c1c3777 Changing the hashCode() method to return toHashCode() per the request in LANG-520
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829285 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 00:04:07 +00:00
Henri Yandell 3d17fad6d6 Patch from Michael Rudolf in LANG-522 applied with additional String constructor tests added
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829283 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 00:00:47 +00:00
Henri Yandell 51a130b544 Applying patch from Vincent Ricard in LANG-514. CharRange constructors removed and replaced with readable static builder methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829282 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 23:59:02 +00:00
Henri Yandell ba0205c202 Making the private fields final via Sebb's patch from LANG-540
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828944 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 06:46:02 +00:00
Henri Yandell 6ef494b6f4 Making private fields final per Sebb's patch to LANG-540
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828943 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 06:44:45 +00:00
Henri Yandell 37405f1efe Adding back the empty constructor per Sebb's comment on LANG-540
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828942 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 06:43:26 +00:00
Sebastian Bazley f20df89b6f LANG-541 - Switched StringBuffer to StringBuilder when only used internally
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828910 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 01:46:25 +00:00
Sebastian Bazley 749c4c66c5 LANG-541 - Switched StringBuffer to StringBuilder when only used internally
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828909 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 01:37:07 +00:00
Sebastian Bazley e226ac7de9 Make private field final to improve thread safety
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828899 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 00:24:27 +00:00
Sebastian Bazley 8ee228155c Unnecessary semi-colon;
Remove TODO which has been addressed

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828897 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 00:23:15 +00:00
Henri Yandell 711e204e73 Applying the final part of Benjamin Bentmann's patch to LANG-432, improving our handling of case-insensitive Strings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828317 13f79535-47bb-0310-9956-ffa450edef68
2009-10-22 05:46:33 +00:00
Henri Yandell 7d3fbbfd43 Applying Tomasz Nurkiewicz's patch from LANG-533 adding notBlank methods to Validate
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828310 13f79535-47bb-0310-9956-ffa450edef68
2009-10-22 05:33:21 +00:00
Henri Yandell 7e83efc1d1 Removing tabs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826970 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 06:11:39 +00:00
Henri Yandell 13a0cc63cd Applying Robert Scholte's patch from LANG-422, adding a appendSeparator with an alternative default separator if the StrBuilder is currently empty
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826969 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 06:10:10 +00:00
Henri Yandell dbf4cd5f42 Moved identityToString(StringBuffer, Object) to identityToString(Appendable, Object) per LANG-542
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826960 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 05:46:43 +00:00
Henri Yandell 6d8ed9be2c Switched StringBuffer to StringBuilder whenever a local usage (and not subsequently used in an API) as per LANG-541
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826958 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 05:35:46 +00:00
Henri Yandell 7f837535c6 Adding a StringUtils.repeat(String, String separator, int) method per request in LANG-348
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826955 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 05:18:57 +00:00
Henri Yandell 5b601a3d6b Applying Sebb's patch from LANG-540 making the NumericEntityEscaper class immutable
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826947 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 04:19:47 +00:00
Henri Yandell d68da319fa Fixing compile error introduced after making variable final but leaving a path in which it can miss getting initialized
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826946 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 04:16:38 +00:00
Henri Yandell c9a918a842 Making private options variable final at Sebb's pointing out of thread safety improvement
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826584 13f79535-47bb-0310-9956-ffa450edef68
2009-10-19 04:38:32 +00:00
Henri Yandell bdb8ae03b6 Changing Param to Option. A Parameter is a user supplied value; an Option is a user supplied choice. LANG-507 related.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826518 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 20:32:40 +00:00
Henri Yandell 0fd4b3afe1 Sebb pointed out that the implementation for LANG-507 was not thread safe. Rewriting to pass parameters in to the constructor, but doing so in an experimental way - comments very much desired on whether this makes for a nice API or not
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826514 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 20:14:30 +00:00
Sebastian Bazley b3cec0c2c3 Add missing @Override markers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826421 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 12:21:31 +00:00
Sebastian Bazley b287ebae61 Remove unused imports and throws
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826420 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 12:16:50 +00:00
Sebastian Bazley c634f0c64c Constructors, fields and nested classes do not inherit doc comments.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826413 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 11:40:46 +00:00
Henri Yandell 64c615346f Implementing an option to UnicodeUnescaper in which the syntax '\u+0047' is supported. By default it remains unsupported to match Java's method of parsing. Request in LANG-507
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826370 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 07:25:59 +00:00
Henri Yandell 2dc5618257 Applying my patch from LANG-535 - adding support to getShortClassName and getPackageName for arrays, including primitive arrays and multi-dimensional arrays. Also stopped getPackageName relying on the underlying class.getPackage as it's sometimes null
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@825420 13f79535-47bb-0310-9956-ffa450edef68
2009-10-15 07:31:32 +00:00
Henri Yandell bb8709f3e3 Prefering the Class methods (and thus JDK) over the String methods for getShortClassName/getPackageName when you already have an Object
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@824597 13f79535-47bb-0310-9956-ffa450edef68
2009-10-13 05:50:51 +00:00
Henri Yandell 1e282a9643 Upgrading to JUnit 4.7. Changing two classes (ClassNotFoundSerializationTest and CharUtilsPerfTest) to not end with Test as that was throwing them into the JUnit setup. CharUtilsPerfTest renamed to CharUtilsPerfRun. ClassNotFoundSerializationTest becomes ClassNotFoundSerialization.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@824595 13f79535-47bb-0310-9956-ffa450edef68
2009-10-13 05:40:15 +00:00
Oliver Heger 169a20fb98 [LANG-499] Test class for ConcurrentUtils
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@820071 13f79535-47bb-0310-9956-ffa450edef68
2009-09-29 19:14:56 +00:00
Oliver Heger 13ef1d725f [LANG-499] Added ConcurrentException and ConcurrentUtils classes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@820070 13f79535-47bb-0310-9956-ffa450edef68
2009-09-29 19:14:17 +00:00
Sebastian Bazley 826adcfbaf Fixup raw types for private variables (non-API)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819703 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 20:14:36 +00:00
Sebastian Bazley e6c395c5d8 unused import
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819701 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 20:08:27 +00:00
Sebastian Bazley 5beb105d6b Use Eclipse comment-style to suppress drop-thru warning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819700 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 20:07:53 +00:00
Sebastian Bazley d3391ff4aa unused import
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819698 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 20:06:18 +00:00
Oliver Heger c7ee4f6d32 Accidently changed formatting in the previous commit.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819148 13f79535-47bb-0310-9956-ffa450edef68
2009-09-26 15:07:07 +00:00
Oliver Heger 1e060c6e35 [LANG-496] Added a comment why a temporary variable is used in get().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819146 13f79535-47bb-0310-9956-ffa450edef68
2009-09-26 15:03:06 +00:00
Oliver Heger 8958fdcc73 [LANG-496] Added LazyInitializer class plus test class.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819141 13f79535-47bb-0310-9956-ffa450edef68
2009-09-26 14:27:32 +00:00
Oliver Heger 31a812e4eb [LANG-529] Created new concurrent package.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819140 13f79535-47bb-0310-9956-ffa450edef68
2009-09-26 14:26:43 +00:00
Matthew Jason Benson 7cdd4ed1d8 generics for addAll(Object[], Object[]) + varargs for all addAll addends
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@818214 13f79535-47bb-0310-9956-ffa450edef68
2009-09-23 19:16:19 +00:00
Matthew Jason Benson 014c032b16 add quick type compatibility check
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@813984 13f79535-47bb-0310-9956-ffa450edef68
2009-09-11 18:56:24 +00:00
Matthew Jason Benson 3d69a1f2cd ArrayUtils generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@813971 13f79535-47bb-0310-9956-ffa450edef68
2009-09-11 18:27:18 +00:00
Henri Yandell ab66a1d87c Applying Boris' patch in LANG-481 to improve thread safety in the Range classes. The previous code's reuse of the hashCode variable for local operations means it is utterly non-thread-safe. Now uses a local variable so that the worst case should be the hashCode being calculated multiple times, but not ending up with different values.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@812236 13f79535-47bb-0310-9956-ffa450edef68
2009-09-07 17:56:30 +00:00
Henri Yandell 02f510c204 Applying Ivan Bilenjkij's patch such that the Mutable classes implement an appropriately typed Mutable interface. LANG-528
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@812235 13f79535-47bb-0310-9956-ffa450edef68
2009-09-07 17:52:53 +00:00
Henri Yandell bb75332087 Reverting accidental commit in r811944.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@811948 13f79535-47bb-0310-9956-ffa450edef68
2009-09-06 23:00:28 +00:00
Henri Yandell 86c1cfa637 Applying Stefan Zeller's performance improvement to StrBuilder (LANG-523) by doubling the size of the String in ensureCapacity. Tests indicate a hundredhold improvement in appending speed, which seems worth the doubling of data size.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@811944 13f79535-47bb-0310-9956-ffa450edef68
2009-09-06 22:56:09 +00:00
Sebastian Bazley da95cca2f3 Remove JCIP annotations
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@807425 13f79535-47bb-0310-9956-ffa450edef68
2009-08-24 22:57:52 +00:00
Sebastian Bazley 48abc2fb74 Remove references to obsolete files that have been deleted
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@807420 13f79535-47bb-0310-9956-ffa450edef68
2009-08-24 22:41:50 +00:00
Henri Yandell 62aef1a558 Making inner class private fields final per LANG-474
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@803006 13f79535-47bb-0310-9956-ffa450edef68
2009-08-11 06:39:39 +00:00
Joerg Schaible 7bd9b8ada1 Fix failing unit test of Contexted(Runtime)Exception, adjust formatted message.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@802569 13f79535-47bb-0310-9956-ffa450edef68
2009-08-09 18:06:58 +00:00
Joerg Schaible ad922624da Add ExceptionContext package (LANG-497, contributed by Derek Ashmore).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@802566 13f79535-47bb-0310-9956-ffa450edef68
2009-08-09 17:46:13 +00:00
Henri Yandell 2e165be127 Improving performance of getAllInterfaces per LANG-500's patch from Pino Silvaggio
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@802477 13f79535-47bb-0310-9956-ffa450edef68
2009-08-09 02:44:56 +00:00
Henri Yandell f957d81625 Fixing classes to not need UnhandledException and IllegalArgumentException
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796078 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:55:30 +00:00
Henri Yandell 5e58c2cfd8 Moving IncompleteArgumentException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796076 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:51:04 +00:00
Henri Yandell d8ae0bdbef Moving NullArgumentException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796075 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:50:56 +00:00
Henri Yandell 687dc10a61 Moving NotImplementedException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796074 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:50:47 +00:00
Henri Yandell f04f89bfda Moving IllegalClassException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796073 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:50:42 +00:00
Henri Yandell 26b587c7ba Moving UnhandledException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796071 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:50:16 +00:00
Henri Yandell a2773b230e Fixing classes to not need NullArgumentException
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796070 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:46:42 +00:00
Henri Yandell 72913ae9d7 Moving IncompleteArgumentException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796068 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:43:08 +00:00
Henri Yandell 4af0d359b4 Moving IllegalClassException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796067 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:41:01 +00:00
Henri Yandell 13ad49b575 Moving NotImplementedException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796066 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:40:38 +00:00
Henri Yandell eb888eb2ef Moving UnhandledException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796065 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:40:09 +00:00
Henri Yandell 9a0e5f8c0f Moving NullArgumentException to backcompat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796064 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:39:08 +00:00
Henri Yandell cc6281fc3e Improving code coverage with more tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@796062 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 23:28:45 +00:00
Henri Yandell 75b967beaa Improving code coverage by testing exceptions and empty constructor
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795895 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 16:14:34 +00:00
Henri Yandell 84beb062c1 Improving code coverage for a couple of null cases
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795894 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 16:14:16 +00:00
Henri Yandell 4a30af0280 Removing missing import
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795893 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 16:13:10 +00:00
Henri Yandell d0e667d278 Updating TODOs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795892 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 16:12:53 +00:00
Henri Yandell be336df54a Improving Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795891 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 16:12:35 +00:00
Henri Yandell 944f642f0b Applying my patch to LANG-355, making StrBuilder implement Appendable
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795604 13f79535-47bb-0310-9956-ffa450edef68
2009-07-19 19:41:50 +00:00
Henri Yandell 4351e7a1a1 Applying Arnaud Brunet's patch from LANG-355 to make StrBuilder implement CharSequence
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795600 13f79535-47bb-0310-9956-ffa450edef68
2009-07-19 19:30:40 +00:00
Henri Yandell 49e68a3f96 Applying Robert Scholte's patch to Travis Reeder's request for a DateUtils.ceiling(...) method to complete truncate(...) and round(...) in LANG-434
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795597 13f79535-47bb-0310-9956-ffa450edef68
2009-07-19 19:21:04 +00:00
Henri Yandell 784e93e61d Refactoring the array of Java ctrl characters to be in EntityArray rather than embedded in their own escape/unescape
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795596 13f79535-47bb-0310-9956-ffa450edef68
2009-07-19 19:15:14 +00:00
Henri Yandell dff12292a0 Updating javadoc to note new '/' difference between Java and JavaScript (LANG-421)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795594 13f79535-47bb-0310-9956-ffa450edef68
2009-07-19 19:04:30 +00:00
Henri Yandell 0bfa6b451e Adding unit test to show the problem reported in LANG-339 - namely that Chinese, Japanese etc characters are escaped. Furthermore the test notes that they are not subsequently unescaped; which means a lack of symmetry.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@795593 13f79535-47bb-0310-9956-ffa450edef68
2009-07-19 18:41:14 +00:00
Henri Yandell 489cc2fd6f Applying Ivan Bilenjkij's patch from LANG-513, improving the generics of the getEnumMap method
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@792051 13f79535-47bb-0310-9956-ffa450edef68
2009-07-08 06:45:02 +00:00
Henri Yandell 8f9a5889e0 Updating comment to explain why a public constructor exists
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@792050 13f79535-47bb-0310-9956-ffa450edef68
2009-07-08 06:35:53 +00:00
Henri Yandell 2a7a320d63 synchronized removed from availableLocaleSet per LANG-488
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@792049 13f79535-47bb-0310-9956-ffa450edef68
2009-07-08 06:30:04 +00:00
Henri Yandell a4325e5559 Moving availableLocaleSet and availableLocaleList to both lazily initialize in a separate synchronized method. This brings the two pieces of code into line with each other, allows availableLocaleSet() to be unsynchronized as desired in LANG-488 and removes the static initialization of availableLocaleList() as requested in LANG-511
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@791726 13f79535-47bb-0310-9956-ffa450edef68
2009-07-07 07:10:02 +00:00
Henri Yandell 76555b1480 Deprecating StringEscapeUtils
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@791721 13f79535-47bb-0310-9956-ffa450edef68
2009-07-07 06:56:22 +00:00
Henri Yandell ee930ccac2 Splitting out the \b \n \t \f \r Java ctrl chars as their own translator to help with the request in LANG-498
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@789589 13f79535-47bb-0310-9956-ffa450edef68
2009-06-30 07:04:06 +00:00
Henri Yandell 9d917f24ce Making the EntityArrays class public by cloning the arrays when they are accessed. API might need a sanity check as this is the old Entities stuff. Also changing the arrays to be private and the rest of the code to use the cloning methods. This does add performance overhead, but I think it'll be negligible and better to practice safe coding. Part of LANG-505
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@789584 13f79535-47bb-0310-9956-ffa450edef68
2009-06-30 06:47:18 +00:00
Henri Yandell 5ead3906e2 Moving a few of the StringUtils methods over to accepting CharSequence instead of String as part of LANG-510
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@789575 13f79535-47bb-0310-9956-ffa450edef68
2009-06-30 06:34:01 +00:00
Henri Yandell b395162258 Applying Vincent Ricard's patch in LANG-471 (reported by Ivica Mikic) adding isAllUpperCase and isAllLowerCase to StringUtils
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@789573 13f79535-47bb-0310-9956-ffa450edef68
2009-06-30 06:24:20 +00:00
Henri Yandell 697cb0fc1a Performance improvement. Switching from looping through a doubled array to using a Map. This probably costs more for simple cases like Java/EcmaScript/Xml, but makes up for it in the Html case. This gets performance of the testUnescapeHexCharsHtml method back down to near the same region as the original code
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@789567 13f79535-47bb-0310-9956-ffa450edef68
2009-06-30 05:47:39 +00:00
Henri Yandell df0d0cc96a Adding a simple unit test for text translate. More needed, though StringEscapeUtils does do a good job of hitting a high level of coverage for these classes already. It's easier to debug when you have tighter testing.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@789566 13f79535-47bb-0310-9956-ffa450edef68
2009-06-30 05:46:08 +00:00
Henri Yandell 78d29f75f9 Added todo note
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@789561 13f79535-47bb-0310-9956-ffa450edef68
2009-06-30 05:09:01 +00:00
Henri Yandell f3ac86a292 Applying patch from LANG-461 from Vincent Ricard to add toByte and toShort methods to NumberUtils
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788276 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 07:09:30 +00:00
Henri Yandell 275f3fa088 Refactoring to avoid code duplication - LANG-458
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788275 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 06:58:11 +00:00
Henri Yandell 47cd2e5536 Generifying the general Mutable, and the underlying MutableObject. This then allows for typed checking of a MutableBigDecimal for example as per LANG-276
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788263 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 05:25:23 +00:00
Henri Yandell 171fa698d3 Removing unnecessary Escape*AsciiAsUnicode classes. UnicodeEscaper now handles the range concept directly and the ctrl character lookup table is now a direct LookupTranslator defined in EscapeUtils. cf LANG-505
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788259 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 05:00:39 +00:00
Henri Yandell bda5d16000 Fixing bug in below/above implementations found while implementing NumericEntityEscaper
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788257 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 04:57:19 +00:00
Henri Yandell b4bdbdfe9c Replacing the NonAsciiAsNumericEntity class with a more generic NumericEntityEscaper. cf LANG-505
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788256 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 04:56:18 +00:00
Henri Yandell f8a77fc872 Adding some todo notes
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788255 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 04:54:48 +00:00
Henri Yandell 05107d6474 Indentation fix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788254 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 04:52:32 +00:00
Henri Yandell cec3b9ff20 Updating ESCAPE_JAVA to use the new .with() approach and to fold the two unicode escape methods into one.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788245 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 03:55:18 +00:00
Henri Yandell b9ab7659bc Rather than writing specific translators to handle unicode between different ranges, UnicodeEscaper now supports a range filter. cf LANG-505
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788244 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 03:54:43 +00:00
Henri Yandell a11f380774 Adding a method to chain translators together. I've gone back and forth on the name, currently with() is my preference. So you could say: BASIC_XML.with(HTML4_ENTITIES). cf LANG-505
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788243 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 03:54:03 +00:00
Henri Yandell a027b12acf Adding escapeXxx(String) and unescapeXxx(String) methods to EscapeUtils + UnescapeUtils, and changing StringEscapeUtils to use them. LANG-505
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@787903 13f79535-47bb-0310-9956-ffa450edef68
2009-06-24 04:41:51 +00:00
Henri Yandell c159ace15b Removing Suite classes per agreement on mailing list back in March
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@787896 13f79535-47bb-0310-9956-ffa450edef68
2009-06-24 04:03:36 +00:00
Henri Yandell c5ef7421d9 Removing IntHashMap. Without Entities it's not needed.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@787895 13f79535-47bb-0310-9956-ffa450edef68
2009-06-24 04:01:35 +00:00
Henri Yandell 8a57de11ee Updating the @since as I don't expect a 2.5
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@787893 13f79535-47bb-0310-9956-ffa450edef68
2009-06-24 03:59:23 +00:00
Henri Yandell c404121979 Committing a rewrite of StringEscapeUtils guts - LANG-505. Entities.java can now go away. Most of the code is in the new text.translate package. More work is needed, including what to actually define as 'ESCAPE_XML' etc, but it's now easy for someone to look at the source to EscapeUtils and UnescapeUtils and put their own ESCAPE_XML variable together, and with lots of reuse value.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@787560 13f79535-47bb-0310-9956-ffa450edef68
2009-06-23 06:15:50 +00:00
Henri Yandell bc1104da49 Removing escapeSql per LANG-493
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@786942 13f79535-47bb-0310-9956-ffa450edef68
2009-06-21 05:35:04 +00:00
Henri Yandell 9209200145 Moving isEmpty to generics as per LANG-504
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775797 13f79535-47bb-0310-9956-ffa450edef68
2009-05-18 03:15:33 +00:00
Henri Yandell f38cdfbf8c Cloning the output from getExcludeFieldNames, adjusting the code to use the attribute directly so it doesn't pay the clone() cost every time and changing the attribute from private to protected to let subclasses retain the ability to modify the field names (if that is why a getExcludeFieldNames method existed). Document in LANG-489
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775432 13f79535-47bb-0310-9956-ffa450edef68
2009-05-16 08:26:07 +00:00
Henri Yandell 58178ddfd8 Started cloning the input character array. Record in LANG-489 for migration guide.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775429 13f79535-47bb-0310-9956-ffa450edef68
2009-05-16 08:18:46 +00:00
Henri Yandell 0d231cb285 Commented out unused field
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775428 13f79535-47bb-0310-9956-ffa450edef68
2009-05-16 08:17:21 +00:00
Henri Yandell 226801cebc Removing unused imports
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775425 13f79535-47bb-0310-9956-ffa450edef68
2009-05-16 07:27:40 +00:00
Henri Yandell 373624c4f0 Removing unused import
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775420 13f79535-47bb-0310-9956-ffa450edef68
2009-05-16 06:32:52 +00:00
Henri Yandell bb7775388f Fixing javadoc, unused import
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775411 13f79535-47bb-0310-9956-ffa450edef68
2009-05-16 03:46:27 +00:00
Henri Yandell e9b32bccfa Fixing javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775410 13f79535-47bb-0310-9956-ffa450edef68
2009-05-16 03:44:06 +00:00
Henri Yandell 7c7fea8957 Commiting my variant patch from LANG-336 to Henrik Maryn's genericizing code
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775048 13f79535-47bb-0310-9956-ffa450edef68
2009-05-15 07:34:17 +00:00
Henri Yandell ed49378250 Genericizing per LANG-336. Removed two lines in the test that were trying to build a to string up to a class that was not in the hierarchy. The compiler now protects against this.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@775045 13f79535-47bb-0310-9956-ffa450edef68
2009-05-15 07:33:02 +00:00
Henri Yandell a60f59ac93 Type doesn't need to be ArrayList, and updating for loops
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@772553 13f79535-47bb-0310-9956-ffa450edef68
2009-05-07 08:42:01 +00:00
Henri Yandell 7d744b2267 Genericizing excludeFieldList variable and updating for loop to foreach - LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@772551 13f79535-47bb-0310-9956-ffa450edef68
2009-05-07 08:41:42 +00:00
Henri Yandell ca3a3baa65 Genericizing excludeFieldList variablle - LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@772548 13f79535-47bb-0310-9956-ffa450edef68
2009-05-07 08:31:48 +00:00
Henri Yandell bab78e92bb Type doesn't need tobe ArrayList
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@772544 13f79535-47bb-0310-9956-ffa450edef68
2009-05-07 08:28:13 +00:00
Henri Yandell 97631fd612 Adding generics - LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@772541 13f79535-47bb-0310-9956-ffa450edef68
2009-05-07 08:12:25 +00:00
Henri Yandell a373714575 Updating to java 5 foreach - LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@772540 13f79535-47bb-0310-9956-ffa450edef68
2009-05-07 08:11:38 +00:00
Henri Yandell 3d2c545acb Updating to java 5 foreach - LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@772539 13f79535-47bb-0310-9956-ffa450edef68
2009-05-07 08:10:59 +00:00
Henri Yandell 73ac4a0289 Applying Hendrik Maryns' generics changes for Entities + Validate from LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@770891 13f79535-47bb-0310-9956-ffa450edef68
2009-05-02 05:20:35 +00:00
Henri Yandell 8b7956d27f Applying a set of updates for new Java features from Hendrik Maryns in LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@770105 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 08:08:48 +00:00
Henri Yandell f89a50b528 Simplifying for loop
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@770101 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 07:50:19 +00:00
Henri Yandell c58bbaaa4b Applying Hendrik Maryns' generics changes for Mutable classes from LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@770100 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 07:40:02 +00:00
Henri Yandell 0904ecd4fa Removing NumberUtils.compare(float,float) and NumberUtils.compare(double,double). These are now foud in Float and Double respectively. Keeping the unit tests, but pointing to the JDK methods as a regression. LANG-492
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@770078 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 06:03:16 +00:00
Henri Yandell 574493d175 Improving getPackageName(Class) to be class.getPackage().getName(). This method then becomes one of the null-protection only methods... which are imo struggling for justification
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@763561 13f79535-47bb-0310-9956-ffa450edef68
2009-04-09 08:38:53 +00:00
Henri Yandell 9adc537013 Removing BooleanUtils.toBooleanObject(boolean) as JDK 1.4 provides Boolean.valueOf(boolean) - even if we ignore autoboxing. LANG-492
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@763559 13f79535-47bb-0310-9956-ffa450edef68
2009-04-09 08:34:47 +00:00
Sebastian Bazley 07c1324202 Generic fix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@756852 13f79535-47bb-0310-9956-ffa450edef68
2009-03-21 01:00:21 +00:00
Sebastian Bazley 6cf9814780 ObjectUtils.max(null,null) requires casts to agree with signature; likewise min
Also use actual Date objects rather than generic Comparable.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@756844 13f79535-47bb-0310-9956-ffa450edef68
2009-03-21 00:17:43 +00:00
Sebastian Bazley b9e3bc72d5 LANG-495 - add generics for max and min
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@756634 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 17:10:39 +00:00
Sebastian Bazley b8a8046723 Test min and max are reflexive; test both nulls
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@755579 13f79535-47bb-0310-9956-ffa450edef68
2009-03-18 12:33:03 +00:00
Sebastian Bazley 6349c0d097 Generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@755573 13f79535-47bb-0310-9956-ffa450edef68
2009-03-18 12:05:47 +00:00
Sebastian Bazley e8512544ed LANG-369 - must use fixed object as lock target
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@755391 13f79535-47bb-0310-9956-ffa450edef68
2009-03-17 20:54:52 +00:00