Norconex Commons Lang

2.x Release Notes

Release History

Version Date Description
2.0.1 2022-08-29 Maintenance release.
2.0.0 2022-01-01 Major release. NOT a drop-in replacement for 1.x.

2.0.1 Maintenance release. Release date 2022-08-29 Download

Updated Improved URL scheme detection in HttpURL.

2.0.0 Major release. NOT a drop-in replacement for 1.x. Release date 2022-01-01 Download

Updated Improved XML matching of partial "class" names to prioritize exact segment matches (class names and package segments).
Updated Configuration variable resolution order now is: system properties, environment variables, properties file, variables file.
Fixed Fixed CachedInputStream sometimes returning invalid bytes when re-read from cache and byte values are higher than 127.
New New XMLFlow class for treating XML block as being a mix of predicate and consumer classes to create an execution "flow" (if, then, else...).
New New "stream" and "iterator" methods added to XML.
New New XMLUtil#createXMLEventReader(Object) method.
New New Operator class for quick comparable evaluation (lower than, greater than, etc.).
New New XML methods: remove(), insertBefore(XML), and insertAfter(XML).
New Added InputStream support for creating XML.
New New function-related utility classes: FunctionUtil, Consumers, PredicatedConsumer, and Predicates.
New New FileLock class.
New New Properties#toProperties() method.
New TextMatcher now implements BiFunction and Predicate.
Updated XML now implements Iterable.
Fixed Fixed PercentFormatter throwing exception on zero-value denominator.
New New ExceptionUtil class.
New New configurable TextMatcher class supporting different methods of matching/replacing (basic, csv, wildcard, regex).
New New MutableImage class facilitating performing basic image operations.
New New event-related classes for facilitating the listening and firing of events.
New New Converter class to convert over 20 types from/to strings.
New New BeanUtil class to facilitate basic reflection operations as well as traversing bean graph.
New New DurationFormatter.
New New CollectionUtil.
New New SystemUtil.
New New MapUtil.
New New ClassUtil.
New New WebFile.
New New OSResource.
New New CertificateUtil.
New New KeyStoreBuilder.
New New Credentials.
New New Host.
New New Event-related classes (Event, IEventListener, EventManager).
New New Regex and KeyValueExtractor classes.
New New Properties#loadFromBean and Properties#storeToBean methods.
New New FileUtil#isDirEmpty(...) methods.
New New Properties set, add, getValue/getLists method simplifying dealing with generics.
New New Properties#match, Properties#matchKeys, and Properties#matchValues methods.
New New XML class replacing XMLConfigurationUtil. Now relying on Java XML/XPath instead of Apache Configuration and white spaces are now always preserved. Also supports JAXB mappings.
New New XMLValidationError class now returned by XML validation methods.
New New XML ErrorHandler classes: ErrorHandlerCapturer, ErrorHandlerFailer, and ErrorHandlerLogger.
New New XMLUtil class helping with the creation of XML-related objects with XML Schema 1.1 support and taking care of security vulnerabilities (XXE).
New New XMLFormatter.
New New DateUtil class for converting between java.util.Date to/from local date/time.
New New FileUtil#createDateFormattedDirs and FileUtil#toDateFormattedDir methods.
New New ClassFinder methods accepting a Predicate to filter returned classes.
New New FileUtil#toURLDir methods.
New New CachedInputStream#isEmpty method.
New New CachedStreamFactory can now be initialized without arguments, using default initialization values or system properties.
New New accessors for LocalDateTime on Properties.
New New PropertyMatchers collection.
New New PropertyMatcher methods to retreive matching values, replace them, or match them more effectively using different methods (basic, regex, wildcard).
New New PropertySetter for encapsulating different ways to add value(s) to a Properties.
New New VersionUtil class.
New New "javadoc" package containing useful Taglets for formatting code blocks and perform dynamic includes from other files.
New New FluentPropertyDescriptor class.
New New IOUtil methods: #isEmpty(Reader), #isEmpty(InputStream), #toNonNullReader(Reader), #toNonNullInputStream(InputStream), #burrowCharacters(Reader, int), #consume(InputStream), #consume(Reader), #consumeUntil(...), #consumeWhile(...), and #closeQuietly(Closeable)
New New CachedInputStream#cache(...) methods.
New New CountingIteragor class.
New New FifoMap class.
New New DataUnitParser.
New DataUnitFormatter is now mutable, and has new settings added: "binaryNotation", and "roundingMode".
New New methods on several other classes.
Updated DataUnit now aligns with the international standard system of units by treating decimal and binary notations distinctively.
Updated Now relies on Norconex Commons Maven Parent.
Updated Configuration loader now tries to resolve undefined variables to system property or environment variable (in that order).
Updated Improved Javadoc generation, putting more focus on class documentation.
Updated PropertyMatcher now Predicate functional interface.
Updated New SLF4JUtil class.
Updated Now requires Java 8 or higher.
Updated Now uses SLF4J instead of Log4J for logging.
Updated New convenience methods on EnhancedXMLStreamWriter.
Updated EncryptionXMLUtil is now deprecated (methods moved to EncryptionKey).
Updated DurationParser now returns a Duration and must be instantiated. Now supports parsing French durations.
Updated EqualsUtil now uses CharSequence instead of String where String was used as argument.
Updated Many dependency updates, including: Apache Commons Lang 3.7, Apache Velocity 2, Junit 5, Xerces 2.12.0.
Updated Some of the load/store methods in Properties have been renamed for consistency.
Updated Now using Path instead (or in addition) of File in many cases.
Updated *.lang.config.IXMLConfigurable now deprecated in favor of *.lang.xml.IXMLConfigurable which deals with XML object instead.
Updated DurationUtil now deprecated in favor of DurationFormatter.
Updated Most method arguments accepting File now accept Path also/instead.
Updated Most places where regular expressions could be used now also support "basic" matching and "wildcard" as well as being able to ignore diacritical marks (e.g., accents).
Updated Properties setXXX(...) and addXXX(...) methods are now deprecated in favor of add(...) and set(...) methods.
Updated PropertyMatcher now implements Predicate and provide static methods for loading/saving as XML.
Updated JarCopier can now run headless with new "onConflict" argument.
Updated HttpURL#getQueryString() is now never null.
Fixed Properties#load(Map) now handles primitive array values properly, as well as Class, Date, and File types.
Removed Removed some deprecated classes and methods from version 1.x.
Removed Removed CountingConsoleAppender, MemoryUtil#getFreeMemory(boolean).
Removed Removed Apache Configuration dependency.
Removed XMLConfigurationUtil removed in favor of XML.