$Id: RELEASE-NOTES.txt,v 1.26 2003/08/19 02:39:59 bayard Exp $
Commons Lang Package
Version 2.0
Release Notes
INTRODUCTION:
This document contains the release notes for this version of the Commons
Lang package. Commons Lang is a set of utility functions and reusable
components that should be a help in any Java environment.
This release has involved a major clean and tidy exercise.
Javadoc and Tests are now much more thorough.
All methods should now be much clearer in what they do in unusual cases.
INCOMPATIBLE CHANGES:
Some StringUtils methods have changed functionality from 1.0:
isEmpty()
chomp(String)
chomp(String,String)
swapCase(String)
Numerous other methods have changed null handling to accept nulls gracefully.
As with all major version releases, check your code for incompatibilities.
NEW FEATURES:
Since the release of the 1.0 package the following classes have been added:
lang package:
ArrayUtils
BitField
BooleanUtils
CharRange (previously package scoped)
ClassUtils
StringEscapeUtils
WordUtils
IllegalClassException
IncompleteArgumentException
NotImplementedException
NullArgumentException
SerializationException
UnhandledException
Validate
math sub-package:
IntRange
LongRange
Range
DoubleRange
JVMRandom
NumberRange
FloatRange
NumberUtils
Fraction
RandomUtils
time sub-package:
DateFormatUtils
FastDateFormat
DateUtils
StopWatch
Since the release of the 1.0 package the following classes have been changed:
lang:
CharSet:
Added factory method, equals and hashCode().
Better defined and tested the set syntax.
CharSetUtils:
added keep method: keep any characters specified in the CharSet string
RandomStringUtils:
random method: overloaded to allow passing in of a Random class
SerializationUtils:
added empty constructor
StringUtils:
isEmpty() changed to not trim
chomp() changed to be more like Perl.
swapCase() no longer word based, but no difference if you pass in ASCII
Various methods changed in the handling of null (less exceptions).
Many new methods.
Various methods deprecated.
SystemUtils:
isJavaVersionAtLeast(int) added. getJavaVersion() deprecated.
host of new constants.
enum:
Enum:
getEnumClass(Class) added
EnumUtils:
Removed irrelevant Comparable/Serializable interfaces.
exception:
NestableDelegate:
Gained many new methods for dissecting an Exception.
ExceptionUtils:
Gained many new methods to improve handling of nested stack traces.
builder:
ReflectionToStringBuilder:
Handy class added for creating default toStrings.
All other builder classes received a set of new methods.
BUG FIXES:
ID Sev Pri Plt Owner State Result Summary
13367 [PATCH] StringUtil enhancement
13391 Javadoc nit
13771 Additional Lang Method Suggestions
14306 NullPointerException in CompareToBuilder
14357 static option for reversing the stacktrace
14447 ToStringBuilder doesn't work well in subclasses
14883 StringUtils.countMatches loops forever if substring empty
14884 NumberRange inaccurate for Long, etc.
14985 More flexibility for getRootCause in ExceptionUtils
15154 SystemUtils.IS_JAVA_1_5 Javadoc is wrong
15257 Hierarchy support in ToStringBuilder.reflectionToString()
15438 ArrayUtils.contains()
15439 Enum does not support inner sub-classes
15986 Infinite loop in ToStringBuilder.reflectionToString for inne
16076 Example in Javadoc for ToStringBuilder wrong for append.
16193 Hierarchy support in EqualsBuilder.reflectionEquals()
16202 typo in the javadoc example code
16204 Infinite loop in StringUtils.replace(text, repl, with) + FIX
16227 Added class hierachy support to CompareToBuilder.reflectionC
16228 Added class hierachy support to HashCodeBuilder.reflectionHa
16284 MethodUtils: Removed unused code/unused local vars.
16341 No Javadoc for NestableDelegate
16622 Removed compile warning in FastDateFormat
16669 JavaDoc Errata
16676 StackOverflow due to ToStringBuilder
16689 ExceptionUtils new methods.
16690 Specify initial size for Enum's HashMap.
16787 Removed compile warning in ObjectUtils
17250 [Lang] Should ToStringBuilder.reflectionToString handle arra
17654 EnumUtils nit: The import java.io.Serializable is never used
17882 Add join(..., char c) to StringUtils (and some performance f
18077 StringUtils.chomp does not match Perl
18723 RandomStringUtils infloops with length < 1
18836 test.lang fails if compiled with non iso-8859-1 locales
18948 Resurrect the WordWrapUtils from commons-sandbox/utils
19296 [Lang] What to do with FastDateFormat unused private constru
19364 [Lang] time unit tests fail on Sundays
19756 [lang] java.lang.ExceptionInInitializerError thrown by JVMRa
19880 [lang] patch and test case fixing problem with RandomStringU
20165 [LANG] SystemUtils does not play nice in an Applet
20538 [lang] NumberUtils.isNumber allows illegal trailing characte
20592 [lang] RandomStringUtils.randomAlpha methods omit 'z'
20603 [lang] Make NestableDelegate methods public instead of packa
20632 Refactored reflection feature of ToStringBuilder into new Re
20652 StringUtils.chopNewLine - StringIndexOutOfBoundsException
21021 [PATCH] reduce object creation in ToStringBuilder
21068 [lang] [PATCH] NumberUtils min/max, BooleanUtils.xor, and Ar
21099 [lang][PATCH] Unused field 'startFinal' in DateIterator
21715 The javadoc says "Mac" instead of "OS/2"
21734 [PATCH] all NumberUtils.createXXX(String) methods handle null
21750 [lang] StringUtils javadoc and test enhancements
21758 [lang] lang.builder classes javadoc edits (mostly typo fixes)
21797 [lang] Add javadoc examples and tests for StringUtils
21809 [lang] maven-beta10 checkstyle problem
21904 NumberUtils.createBigDecimal("") NPE in Sun 1.3.1_08
21952 [lang] Improved tests, javadoc for CharSetUtils, StringEscapeUtils
22091 Adding tolerance to double[] search methods in ArrayUtils
22094 A small, but important javadoc fix for Fraction proper whole/numerator
22095 [lang] Javadoc, tests improvements for CharSet, CharSetUtils
22098 [lang] Improve util.Validate tests
22245 [lang] test.time fails in Japanese (non-us) locale.
22286 [lang] Missing @since tags
22367 Typo in documentation
22386 [lang] Improve javadoc and overflow behavior of Fraction
DEPRECATIONS:
lang:
NumberRange:
now deprecated, see math subpackage
NumberUtils:
now deprecated, see math subpackage
CHANGES: [In 'diff' format]
Jar changes
===========
> org.apache.commons.lang.math.Range
> org.apache.commons.lang.math.FloatRange
> org.apache.commons.lang.math.NumberUtils
> org.apache.commons.lang.math.JVMRandom
> org.apache.commons.lang.math.IntRange
> org.apache.commons.lang.math.LongRange
> org.apache.commons.lang.math.DoubleRange
> org.apache.commons.lang.math.NumberRange
> org.apache.commons.lang.math.Fraction
> org.apache.commons.lang.math.RandomUtils
> org.apache.commons.lang.time.FastDateFormat
> org.apache.commons.lang.time.DateUtils$DateIterator
> org.apache.commons.lang.time.DateUtils
> org.apache.commons.lang.time.FastDateFormat$UnpaddedMonthField
> org.apache.commons.lang.time.FastDateFormat$StringLiteral
> org.apache.commons.lang.time.FastDateFormat$TwelveHourField
> org.apache.commons.lang.time.FastDateFormat$NumberRule
> org.apache.commons.lang.time.FastDateFormat$CharacterLiteral
> org.apache.commons.lang.time.FastDateFormat$TimeZoneNumberRule
commons-lang-2.0.zip
需积分: 0 116 浏览量
更新于2024-04-17
收藏 635KB ZIP 举报
《Apache Commons Lang 2.0:Java服务器端非空校验的基石》
Apache Commons Lang 是一个由Apache软件基金会开发的Java库,其中包含了大量实用的工具类,以补充Java核心类库的功能。在给定的"commons-lang-2.0.zip"压缩包中,我们找到了"commons-lang.jar",这是Apache Commons Lang项目的一个重要版本,主要用于服务器端的数据非空校验。此版本的发布,为Java开发者提供了更加便捷和强大的验证机制。
Apache Commons Lang 2.0的核心特性之一是其对Java对象的非空校验支持。在处理用户输入或者服务间交互时,确保数据的有效性至关重要,尤其是避免因为空指针异常(NullPointerException)导致的应用程序崩溃。Lang 2.0中的`StringUtils`类就提供了丰富的非空检查方法,例如`isBlank()`、`isEmpty()`等,这些方法可以帮助开发者快速地判断字符串是否为空或者仅包含空白字符,从而预防可能的运行时错误。
除了`StringUtils`,Lang 2.0还提供了`ArrayUtils`、`ClassUtils`、`DateUtils`等一系列工具类,覆盖了数组、日期、反射等多个领域。`ArrayUtils`可以进行数组的边界检查和转换操作,`ClassUtils`则简化了类和接口的检查及转换,而`DateUtils`则提供了对日期和时间的操作,包括格式化、比较和计算等。
在服务器端,这些工具类极大地提高了代码的健壮性和可维护性。例如,`ObjectUtils`的`notNull()`方法可以用于验证对象是否为null,这在处理依赖注入或方法参数时非常实用。此外,`NullArgumentException`等自定义异常的引入,使得开发者能够更明确地表达预期的输入条件,提高异常处理的可读性和可定制性。
Lang 2.0版本虽然相对较旧,但其设计思想和实现方式至今仍具有很高的参考价值。对于兼容老版本的系统或需要向后兼容的项目,这个版本的库仍然是一个可靠的选择。无论是在Windows还是Linux平台上,这个免费的库都易于获取和集成,为开发者提供了一致的跨平台体验。
Apache Commons Lang 2.0是Java服务器端开发中不可或缺的工具之一,它的存在极大地方便了开发者进行数据验证和通用操作,提升了代码质量和效率。通过深入理解和使用这个库,我们可以更好地应对各种编程挑战,构建更稳定、更健壮的Java应用程序。
段子手-168
- 粉丝: 4809
- 资源: 2745
最新资源
- (27424008)voc数据集转yolo格式
- (175846434)目标检测-将VOC格式的数据集一键转化为COCO和YOLO格式
- 技术资源分享-我的运维人生-《新年的奇妙团聚与希望之旅》
- Another-Redis-Desktop-Manager.1.5.2.exe
- (174502426)模式识别实验:基于感知函数准则线性分类器设计
- (33587448)Java版 愤怒的小鸟开源游戏
- (177354822)java小鸟游戏.zip
- (177453248)用python代 码放烟花.zip
- (175320424)python跨年烟花代码
- (1260406)Java学生成绩管理系统
- (177802446)uni-app uniApp蓝牙打印机安卓通用型
- osgEarht海量地名LOD根据距离的不同加载市、区、村镇
- (175506400)zotero插件合集,包含文献翻译,管理,预览等插件
- (4982018)Java 贪吃蛇 小游戏
- (180204840)变电站红外电压电流互感器绝缘子检测图像数据集
- (175695454)基于红外图像的变电站设备识别与热状态监测系统研究-尹阳.caj