Henri Yandell
9f2efa84a2
Bug #19756 dealt with.
...
Submitted by: Phil Steitz
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137312 13f79535-47bb-0310-9956-ffa450edef68
2003-05-14 02:41:26 +00:00
Henri Yandell
eb6a2942c0
Tenfold improvement in performance for leftPad, rightPad and repeat when repeat is over a String of length 1, by implementation of a padding method. The padding method is kept private for the moment.
...
Also a modification of containsOnly so it has a partner method indexOfAnyBut. Unit Test added for indexOfAnyBut.
Submitted by: Robert Simpson
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137299 13f79535-47bb-0310-9956-ffa450edef68
2003-04-16 04:37:33 +00:00
Henri Yandell
92a9a68b72
Integrated WordWrapUtils testing in.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137298 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 14:29:01 +00:00
Henri Yandell
fb2548b304
Return of WordWrapUtils, fresh with bugs fixed in StringTaglib. Part of the
...
reason for dropping it originally was that I knew my methods [wordWrap rather than wrapText or wrapLine] had nasty die-a-death bugs and hadn't had time to fix them. These got fixed as a part of String Taglib so I'm now personally happy with the code. As happy as you can ever be anyway without more tests to hurt it.
Submitted by: Henning Schmiedehausen
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137297 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 14:28:41 +00:00
Alex Chaffee
49d5add385
improving javadoc
...
added apos entity to XML escape/unescape
add test for "unknown entity" behavior
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137293 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 21:30:18 +00:00
Alex Chaffee
69cc0e40e6
Extracted Entities class (instead of inner class)
...
Added support for full HTML 4.0 entity set
Separated XML, ISO8859-1 (HTML 3.2), and HTML 4.0 entities inside Entities object
Added escapeXml and unescapeXml public API methods
Escape now uses entities for values 0x80 or greater (previously 0x100)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137292 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 20:55:33 +00:00
Alex Chaffee
6af3b80369
Escaping unicode uses capital letters e.g. \uABCD
...
Found and fixed bug when unicode character is at the end of a string to unescape
Added unit tests for above bug to both StringUtilsTest and StringEscapeUtilsTest
StringUtils.[un]escape now call StringEscapeUtils.[un]escapeJava
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137291 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 18:45:29 +00:00
Alex Chaffee
2e862e0c47
make test strings 7-bit clean (bug 18836)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137290 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 17:30:29 +00:00
Henri Yandell
3ac32dd142
Patch for RandomString bug in which counts of 0 or negative counts would cause array exceptions.
...
Submitted by: ville.skytta@iki.fi (Ville Skytt�)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137289 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 14:13:03 +00:00
Gary D. Gregory
ccde85985d
Removed unused import.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137285 13f79535-47bb-0310-9956-ffa450edef68
2003-04-08 23:45:16 +00:00
Alex Chaffee
4b0aeca9f2
StringEscapeUtils: escape/unescape Java/JavaScript/HTML
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137278 13f79535-47bb-0310-9956-ffa450edef68
2003-03-31 03:53:52 +00:00
Alex Chaffee
5b83eb9358
changed chomp() to match Perl
...
deprecated chomp* methods in favor of new slice methods
improved unit tests and documentation
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137277 13f79535-47bb-0310-9956-ffa450edef68
2003-03-29 16:17:21 +00:00
Gary D. Gregory
edb0e8d284
Fix bug 16676: StackOverflow due to ToStringBuilder
...
(http://issues.apache.org/bugzilla/show_bug.cgi?id=16676 )
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137276 13f79535-47bb-0310-9956-ffa450edef68
2003-03-27 08:55:22 +00:00
Stephen Colebourne
67bdcb0f1a
Add trimToNull
...
Add trimToEmpty
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137274 13f79535-47bb-0310-9956-ffa450edef68
2003-03-24 00:47:02 +00:00
Stephen Colebourne
3f8418c654
Update licence date to 2003
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137272 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 21:51:51 +00:00
Stephen Colebourne
eb68e2a6f2
Update licence date to 2003
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137268 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 17:36:16 +00:00
Henri Yandell
f64ecf1cd7
Added a CharSetUtils.keep method which is the reverse of the delete method.
...
In part, it fulfills the StringUtils.getNumerics(String) method that Bug
#13771 requests.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137267 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 05:50:51 +00:00
Henri Yandell
8e54ccc4be
Bug 17882 submitted [by hand as the patch was out of date].
...
join and split now take chars as separators as well as Strings.
Submitted by: Henning P. Schmiedehausen
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137266 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 05:26:23 +00:00
Gary D. Gregory
1a3ba6816d
Remove unused variables in the testMixedArray method.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137264 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 05:41:23 +00:00
Gary D. Gregory
2ba51c13fb
Apply patch for bug 17250 ( http://issues.apache.org/bugzilla/show_bug.cgi?id=17250 ) with some additional minor improvements.
...
Added tests for reflection methods with array arguments.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137263 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 05:33:35 +00:00
Gary D. Gregory
804ccc397d
Removed an unused import statement.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137261 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 02:50:42 +00:00
Henri Yandell
47fc18a02e
Added a test case for isNestedThrowable
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137260 13f79535-47bb-0310-9956-ffa450edef68
2003-03-18 06:14:23 +00:00
Alex Chaffee
a50e6215b2
Purpletech code import: abbreviate, difference, differenceAt
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137258 13f79535-47bb-0310-9956-ffa450edef68
2003-03-17 05:28:37 +00:00
Stephen Colebourne
4c63a72053
Add support for indexOf, lastIndexOf and contains for ArrayUtils
...
from Nikolay Metchev, bug ref 15438
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137249 13f79535-47bb-0310-9956-ffa450edef68
2003-02-04 22:06:24 +00:00
Stephen Colebourne
85cbed66ff
Update Enum classes to support hierarchy Enum definitions
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137247 13f79535-47bb-0310-9956-ffa450edef68
2003-02-04 18:30:08 +00:00
Henri Yandell
d9bc18e804
Applied patch from Tomasz Skutnik which allows a Random object to be passed
...
in. This means that method calls to RandomStringUtils can be predictable.
Submitted by: Tomasz Skutnik <Tomasz.Skutnik@e-point.pl>
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137238 13f79535-47bb-0310-9956-ffa450edef68
2003-02-02 03:46:13 +00:00
Daniel Rall
ab53513741
* src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java
...
testPrintThrowables(): Previously printing some stack traces to
stdout as part of its tests which at first glance looks like a test
failure (but in reality isn't). Here's a truncated example:
test.exception:
[echo] Running exception package tests ...
[java] .........................................
[java] ......org.apache.commons.lang.exception.ExceptionUtilsTestCase$Ex
[java] at org.apache.commons.lang.exception.ExceptionUtilsTestCase.c
[java] [wrapped] org.apache.commons.lang.exception.ExceptionUtilsTestCa
[java] at org.apache.commons.lang.exception.ExceptionUtilsTestCase.c
[java] [wrapped] org.apache.commons.lang.exception.ExceptionUtilsTestCa
[java] at org.apache.commons.lang.exception.ExceptionUtilsTestCase.c
[java] at org.apache.commons.lang.exception.ExceptionUtilsTestCase.t
* src/java/org/apache/commons/lang/exception/ExceptionUtils.java
WRAPPED_MARKER: New constant for the " [wrapped] " text used when
printing exception stack traces.
getRootCauseStackTrace(Throwable): Replaced inline " [wrapped] "
text with use of new WRAPPED_MARKER constant.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137234 13f79535-47bb-0310-9956-ffa450edef68
2003-01-20 23:04:19 +00:00
Daniel Rall
69819f8787
* src/test/org/apache/commons/lang/StringUtilsTest.java
...
testCaseFunctions(): Added single character string tests for
capitalise() and uncapitalise() methods.
* src/java/org/apache/commons/lang/StringUtils.java
capitalise(), uncapitalise(): Clarified code path -- no functional
change.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137233 13f79535-47bb-0310-9956-ffa450edef68
2003-01-20 22:15:13 +00:00
Stephen Colebourne
984bc76cd3
Fix infinite recursion in inner classes reflection methods
...
from Per Velschow
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137232 13f79535-47bb-0310-9956-ffa450edef68
2003-01-19 18:49:05 +00:00
Stephen Colebourne
c2d07cc3f0
Fix infinite recursion in replace() when blank string used
...
from Holger Krauth
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137231 13f79535-47bb-0310-9956-ffa450edef68
2003-01-19 18:15:38 +00:00
Stephen Colebourne
158a5104d0
Add additional testing for hashcode and equals integration
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137229 13f79535-47bb-0310-9956-ffa450edef68
2003-01-19 17:42:18 +00:00
Stephen Colebourne
5c40090fec
Add superclass behaviour to builder classes
...
from Gary Gregory
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137228 13f79535-47bb-0310-9956-ffa450edef68
2003-01-19 17:35:21 +00:00
Henri Yandell
f76f9bf04d
Oops. Meant to check this in a day or so ago. Hooked the FastDateFormat test up.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137224 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 03:55:01 +00:00
Henri Yandell
601000d724
Reformatted [dos2unix]. A newline was introduced after the licence so that cvs
...
would allow the commit.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137223 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 21:21:43 +00:00
Henri Yandell
a99f7965b3
A thread-safe, faster version of java.text's DateFormat. While JODA contains
...
better, this version is religion-free.
Permission given by Brian S O'Neill:
http://archives.apache.org/eyebrowse/ReadMsg?listName=commons-dev@jakarta.apache.org&msgNo=20612
Submitted by: Sean Schofield
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137221 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 19:55:55 +00:00
Stephen Colebourne
2f50297e5e
Fix to enable anonymous inner classes as Enums for functionality
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137220 13f79535-47bb-0310-9956-ffa450edef68
2002-12-31 22:39:39 +00:00
Stephen Colebourne
6c4d516563
Fix to handle anonymous inner classes
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137219 13f79535-47bb-0310-9956-ffa450edef68
2002-12-31 22:32:23 +00:00
Stephen Colebourne
891b71ff2c
Fix to include superclass fields in reflection toString
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137217 13f79535-47bb-0310-9956-ffa450edef68
2002-12-31 20:17:53 +00:00
Stephen Colebourne
a84055c530
Validate relocated to new util subpackage
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137215 13f79535-47bb-0310-9956-ffa450edef68
2002-12-29 22:09:54 +00:00
Stephen Colebourne
33113bfe79
Add Identifier generators to Lang from Util
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137212 13f79535-47bb-0310-9956-ffa450edef68
2002-12-29 21:35:04 +00:00
Stephen Colebourne
4036dc881d
Add StopWatch
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137205 13f79535-47bb-0310-9956-ffa450edef68
2002-12-22 22:59:58 +00:00
Stephen Colebourne
af15108a55
Add negate(Boolean) method
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137204 13f79535-47bb-0310-9956-ffa450edef68
2002-12-22 21:33:12 +00:00
Stephen Colebourne
24968c2cfa
Re-enable fraction testing
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137203 13f79535-47bb-0310-9956-ffa450edef68
2002-12-22 21:18:51 +00:00
Stephen Colebourne
8d72d21954
Add Fraction class and associated tests
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137198 13f79535-47bb-0310-9956-ffa450edef68
2002-12-22 19:39:39 +00:00
Stephen Colebourne
491b26ddd1
Creation of math subpackage
...
Addition of Range class, and specific subclasses
Tests for Range
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137196 13f79535-47bb-0310-9956-ffa450edef68
2002-12-22 16:20:29 +00:00
Stephen Colebourne
9c4166dbb2
Create time subpackage
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137194 13f79535-47bb-0310-9956-ffa450edef68
2002-12-18 23:30:20 +00:00
Henri Yandell
ef292354c6
BitField moved over from the [util] project.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137192 13f79535-47bb-0310-9956-ffa450edef68
2002-12-18 02:50:36 +00:00
Dmitri Plotnikov
f1cc6ec3ff
Added printRootCauseStackTrace
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137191 13f79535-47bb-0310-9956-ffa450edef68
2002-12-16 23:05:29 +00:00
Henri Yandell
3d82f12dbd
CalendarUtils from the sandbox, for merger with DateUtils. Or parallel living.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137190 13f79535-47bb-0310-9956-ffa450edef68
2002-12-16 21:55:20 +00:00
Henri Yandell
26c6a7c28f
A DateUtils class from Ant. Still needs lots of thinking etc, but might as
...
well be doing these things in the cvs head as we're not near an obvious release.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137189 13f79535-47bb-0310-9956-ffa450edef68
2002-12-16 21:48:41 +00:00