KDGCommons Change Log

Release History

Version Date Description
1.0.17 2019-08-03 TBD
1.0.16 2018-07-22 grab-bag of additions
1.0.15 2017-01-22 A variety of new functions, across utils
1.0.14 2014-01-21 Multiple additions
1.0.13 2013-08-29 Collections, Serialization
1.0.12 2013-06-30 Introspection
1.0.11 2013-06-15 Lang, Collections
1.0.10 2013-05-26 Collections
1.0.9 2013-04-07 Collections, Lang
1.0.8 2013-02-16 Collections, IO, Utils
1.0.7 2012-08-26 Collections, IO
1.0.6 2012-06-30 Lang
1.0.5 2012-05-17 Beans, Collections, Threads
1.0.4 2012-04-28 Buffer, Lang, IO
1.0.3 2012-04-22 Collections
1.0.2 2012-04-16 Collections, Html, IO
1.0.1 2011-12-29 Collections, Html
1.0.0 2011-08-27 Initial public release

Release 1.0.17 – 2019-08-03

Type Changes By
Add Counters: add toString() kdgregory
Add JDBCUtil: add functions to support simple SQL operations kdgregory
Update CollectionUtil.last(): optimization for linked lists kdgregory
Update Counters: work-around signature change in ConcurrentHashMap (was producing an invalid artifact when compiling with JDK 8) kdgregory
Update HashMultimap: Behavior enum was not public kdgregory
Update SelfMock: retain invocation arguments kdgregory

Release 1.0.16 – 2018-07-22

Type Changes By
Add ClassUtil.getFieldValue(): retrieves a field's value from wherever it's defined in the class hierarchy kdgregory
Add CollectionUtil.isEmpty(), isNotEmpty(): now accept Maps kdgregory
Add CollectionUtil.partition(): breaks a passed collection into a list of max-size lists kdgregory
Add CollectionUtil.submap(): extracts mappings for a set of keys. kdgregory
Add NumericAsserts: add assertApproximate() for long and double values kdgregory
Add NumericAsserts.assertInRange(): allows caller to assert that the actual value is within an arbitrary range +/- of the expected value kdgregory
Add StringAsserts.assertNotEmpty() kdgregory
Add SelfMock: a reflection-based mock object that invokes methods on itself; used to mock a portion of an interface without a long if-else chain in the invocation handler kdgregory

Release 1.0.15 – 2017-01-22

Type Changes By
Add BufferUtil.toArray: returns the entire contents of a ByteBuffer as an array kdgregory
Add CollectionUtil.asMap(): produce a HashMap from a list of values kdgregory
Update CollectionUtil.asSet(): be explicit that we return a HashSet kdgregory
Add CollectionUtil.cast(): add variant for maps kdgregory
Add CollectionUtil.getVia(): traverses hierarchies of maps, lists, and arrays kdgregory
Add CollectionUtil.putIf(), putIfNotNull(): conditional stores for maps kdgregory
Add ReadThroughCache: a size-limited LRU cache that uses a retriever function to load values kdgregory
Add StringUtil.substr: flexible substring that's null-safe, bounds-safe, and allows selection of the right side of the string kdgregory

Release 1.0.14 – 2014-01-21

Type Changes By
Add ArrayAsserts: JUnit assertions for primitive arrays kdgregory
Add Base64Codec: translates between byte[] and String using a Base-64 representation kdgregory
Add HexCodec: translates between byte[] and String using a hex representation kdgregory
Add CharSequenceUtil: utility methods common to all character sequences; initial methods are startsWith(), endsWith(), and containsAt() kdgregory
Add CollectionUtil.compare(): compares the elements of two collections in iterator order kdgregory
Add CollectionUtil.putIfAbsent(Map,Map): adds all mappings not present in base kdgregory
Add Object.compare(): null-safe comparison, where null is optionally low or high when compared to not-null kdgregory
Add StringUtil.valueOf(): a replacement for String.valueOf() that returns an empty string when passed null kdgregory
Add Tuple2, ComparableTuple2: parameterized holder for a pair of values kdgregory
Add UnclosingInputStream, UnclosingOutputStream: stream decorators that silently ignore close(); used to multiplex output onto a single stream kdgregory
Update Base64Converter: deprecated in favor of Base64Codec kdgregory

Release 1.0.13 – 2013-08-29

Type Changes By
Add CollectionUtil: add first() and .last(): null-safe, empty-safe retrieval of first or last element of a list kdgregory
Add Added equals() and hashCode() to DefaultMap, Hashmultimap kdgregory
Update The following classes are now Serializable: CompoundKey, DefaultMap, HashMultimap, NameValue kdgregory

Release 1.0.12 – 2013-06-30

Type Changes By
Add CollectionUtil.addIfNotNull(): used to progressively build a collection where the source data may use null as a flag value kdgregory
Add CollectionUtil.putIfAbsent(): a simple way to add default values to maps kdgregory
Add StringUtil.length(): a null-safe length check (although StringUtil.isBlang()) is a better choice in most situations) kdgregory
Update Introspection and IntrospectionCache now allow an optional setAccessible(true) on introspected methods kdgregory

Release 1.0.11 – 2013-06-15

Type Changes By
Add CollectionUtil.addIfNotNull(): used to progressively build a collection where the source data may use null as a flag value kdgregory
Add CollectionUtil.filter(): the third common list-processing higher-order function kdgregory
Add ObjectUtil.equals() variants that compare int and long with their object wrappers, to avoid null pointer exceptions from auto-unboxing kdgregory

Release 1.0.10 – 2013-05-26

Type Changes By
Add CollectionUtil.map() / reduce(): because every utilities library needs these kdgregory
Add Counters: a threadsafe map of longs, used to summarize a stream of data kdgregory

Release 1.0.9 – 2013-04-07

Type Changes By
Add EnumerationIterable: allows old-style enumerations to be used in a for-each loop kdgregory
Add IteratorIterable: allows arbitrary iterators to be used in a for-each loop kdgregory
Add ClassUtil.getPrimitiveType(): returns the TYPE value for primitive wrapper instances kdgregory
Add ClassUtil.getDeclaredMethodsByAccess(): slices and dices the result of Class.getDeclaredMethods() kdgregory
Add ClassUtil.getVisibleMethods(), ClassUtil.getVisibleMethodMap(): returns all methods that a given class either declares or inherits from ancestors kdgregory
Add ClassUtil.getBestMethod(): returns compiler's method selection rules to runtime arguments kdgregory
Add StringUtil.trimToNull(): trim that produces a flag value on blank string kdgregory
Update ClassUtil.getAnnotatedMethods(): now uses getVisibleMethods() kdgregory
Update ClassUtil.getAllMethods(): deprecated in favor of getVisibleMethods() kdgregory

Release 1.0.8 – 2013-02-16

Type Changes By
Add SimpleCLIParser: processes an argument vector, extracting recognized options kdgregory
Add CollectionUtil.addIf(): optionally adds an element to a collection kdgregory
Add IOUtil.skipFully(): offers a higher level of skipping than InputStream.skip() kdgregory
Add StringUtil.equalOrEmpty(): equality test where null is treated as an empty string kdgregory

Release 1.0.7 – 2012-08-26

Type Changes By
Add CollectionUtil.combine(): combines collections, returning result kdgregory
Add CollectionUtil.isEmpty(), isNotEmpty(): null-safe tests for collection contents kdgregory
Add CollectionUtil.defaultIfNull(): enables a null-safe for loop without explicit test/replace (applies to any iterable) kdgregory
Add CollectionUtil.defaultIfEmpty(): used to eliminate "if for action else action" constructs kdgregory
Update IOUtil.createTempFile(InputStream): now closes stream after copy kdgregory
Update This library no longer establishes a transitive dependency on JUnit 3.8.x. If you use the assertion classes, you will need to provide your own JUnit dependency kdgregory

Release 1.0.6 – 2012-06-30

Type Changes By
Add ClassUtil.internalNameToExternal(): turns the type names from reflective signatures into actual classes kdgregory
Add ObjectUtil.defaultValue(): replaces nulls with a default value, either literal or created from a factory kdgregory
Add StringUtil.extractLeft(), extractRight(), extractLeftOfLast(), extractRightOfLast(): methods to partition a string around a delimiter kdgregory
Add StringUtil.isIn(): tests a string against multiple candidates kdgregory
Add StringBuilderUtil.appendUnless(): used to build up argument lists, where a comma goes before every element but the first kdgregory

Release 1.0.5 – 2012-05-17

Type Changes By
Add Introspection, IntrospectionCache: a replacement for the JDK's introspector; originally written for PracticalXml kdgregory
Add MapBuilder: create and populate a Map in one expression kdgregory
Add NamedThreadFactory: allows thread pools to name their threads kdgregory
Add ThreadUtil.sleepQuietly(): catches and ignores InterruptedException kdgregory

Release 1.0.4 – 2012-04-28

Type Changes By
Add ClassUtil: utilities to muck with Class objects kdgregory
Add IOUtil.readFully(): actually does what everyone things InputStream.read() does kdgregory
Add UnreachableCodeException: a trap for branches that should never execute kdgregory
Update ByteArray: String conversions now enforce 8-bit character limitation kdgregory
Update ByteArray: fixed bug in remove() kdgregory

Release 1.0.3 – 2012-04-22

Type Changes By
Add CollectionUtil.filter(): produces one list from another by applying a regex kdgregory

Release 1.0.2 – 2012-04-16

Type Changes By
Update HtmlUtil.escape(): bugfix for escaped single quotes; add escaping of all non-ASCII characters kdgregory
Update CollectionUtil.join(): turns a collection into a string, with separator kdgregory
Add IOUtil.copy(): copies input stream to output stream; exists to eliminate dependencies kdgregory
Add IOUtil.createTempFile(): variant that will fill file from InputStream kdgregory

Release 1.0.1 – 2011-12-29

Type Changes By
Add CombiningIterable: use a single loop to iterate multiple collections kdgregory
Update HtmlUtil.escape(): bugfix for escaped single quotes; add escaping of all non-ASCII characters kdgregory

Release 1.0.0 – 2011-08-27

No changes in this release.