AO Lang Changelog

ao-lang-4.17.0

Release Notes

  • New ContentType constants for multipart/form-data and application/x-www-form-urlencoded.

ao-lang-4.16.0

Release Notes

  • New functional interfaces that may throw IOException and, optionally, an arbitrary secondary exception:
    1. IOBiConsumer
    2. IOBiConsumerE
    3. IOConsumer
    4. IOConsumerE
    5. IOFunction
    6. IOFunctionE
    7. IOPredicate
    8. IOPredicateE
    9. IORunnable
    10. IORunnableE
    11. IOSupplier
    12. IOSupplierE

ao-lang-4.15.0

Release Notes

  • Coercion improvements:
    1. Using optimized writer for all writes. This can help maintain string identity for in-context translation tools.
    2. trim(…) methods convert to empty string in more cases.
    3. trim(…) methods return original char[] when non-empty and not trimmed. This is to allow subsequent writes to use the char[] directly.
    4. Added optimization for Segment to write the underlying char[] directly.
    5. Added support for Optional by unwrapping the value.

ao-lang-4.14.0

Release Notes

  • Coercion moved out of AO Encoding:
    1. Non-localized parts moved to this project.
    2. Localized parts moved to AOCode Public and renamed to MarkupCoercion.
    3. New pluggable CoercionOptimizer to allow this decoupling.
    4. Servlet-specific optimizations moved to AO Servlet Util.

ao-lang-4.13.0

Release Notes

  • New functional interfaces:
    1. BiConsumerE
    2. LocalizedConsumer
    3. LocalizedConsumerE
    4. LocalizedSupplier
    5. LocalizedSupplierE

ao-lang-4.12.2

Release Notes

  • Eliminated unnecessary uses of java.io.ObjectInputValidation where immediate validation from readObject(…) or readExternal(…) is sufficient.

ao-lang-4.12.1

Release Notes

  • No longer printing localized exception message when it is identical to the non-localized message.

ao-lang-4.12.0

Release Notes

  • May now register SQL statements that cause an exception directly with ErrorPrinter. This is preferred over the use of WrappedSQLException, which is now deprecated in favor of this mechanism. The issue with wrapping exceptions is it hides the original exception from subtype-specific catch blocks.

ao-lang-4.11.1

Release Notes

  • Fixed bug in Strings.convertByteArrayFromHex(char[]) that was using characters from the hexChars lookup array instead of the given argument. This method was not previously used within our projects, so the impact is limited in scope.
  • Deprecated hexadecimal conversion methods of Strings in favor of the Apache Commons Codec implementation: Hex.

ao-lang-4.11.0

Release Notes

ao-lang-4.10.0

Release Notes

  • New functional interfaces, based on the standard ones, but that support generic checked exceptions:
    1. ConsumerE
    2. FunctionE
    3. PredicateE
    4. SupplierE

ao-lang-4.9.1

Release Notes

  • Bug fix: Added missing "." in resource prefixes generated by class names.

ao-lang-4.9.0

Release Notes

  • Added overload of Projects.readVersion(String, InputStream, String, String).

ao-lang-4.8.0

Release Notes

  • Renamed ApplicationResourcesAccessor to Resources and moved to a new com.aoindustries.i18n package. This new package will develop into its own project once internationalization (i18n) classes are consolidated.
  • New methods in Resources for obtaining resources relative to a Class or Package.

    Being accessed relative to the package, the application resources can still be correctly located after packages are renamed by code obfuscation.

  • Resources now supports an optional prefix, which is combined with keys on lookups. When using a Class to locate the resources, defaults to the class' simple name.
  • New method Throwables.isSuppressed(…) to check if a throwable is already suppressed.
  • Split development-only classes into a new sub-project in devel/. This sub-project is used only for development and is never deployed to artifact repositories.
  • Fixed bug in Resources.getMessage(…) where listeners were not notified from the no-args overloads.

ao-lang-4.7.0

Release Notes

  • Now maintains InterruptedIOException.bytesTransferred during surrogate creation. This was an oversight in the previous release.
  • New method Throwables.isSuppressed(…) to check if a throwable is already suppressed.

ao-lang-4.6.1

Release Notes

  • Added additional constructors on WrappedException that specifically take an IOException for the purposes of deprecating wrapping of IOException in favor of the new UncheckedIOException in Java 8+.

ao-lang-4.6.0

Release Notes

  • New utility classes AutoCloseables, Runnables, and Throwables.
  • New method SysExits.getSysExit(Throwable) that provides sysexit values matching common exception types.
  • Deprecated Disposable and DisposedException in favor of AutoCloseable and IllegalStateException.
  • Moved CallableE from package com.aoindustries.lang to package com.aoindustries.util.concurrent, so that the package structure better matches the standard Java API.
  • CallableE now has upper-bound generic Throwable.
  • New interface RunnableE, intended for uses like Runnable, but that must be able to throw checked exceptions.
  • Added methods for Runnable and RunnableE to ThreadLocale.
  • New utility class ExecutionExceptions for working with ExecutionException. Currently provides functions to selectively wrap ExecutionException based on its cause. This way the exception types may be maintained without losing full stack traces, which happens when rethrowing the cause directly.
  • Added methods for CallableE and RunnableE to WrappedException.
  • Moved the com.aoindustries.sql package to the new AO SQL project.
  • Deprecated methods of FileUtils that are now reasonably handled by the standard Java API:
    • createTempDirectory(…)
    • delete(…)
    • deleteRecursive(…)
    • mkdir(…)
    • mkdirs(…)
  • Temporary files are now created with more secure default permissions.
  • WrappedException and ReflectionException now use the message of the cause when no message has been provided.
  • New class WrappedError that is much like WrappedException, except for use in the rare contexts Error is required (such as wrapping arbitrary Throwable as causes to exception types that only allow Error).
  • New interface ExtraInfo that any type of throwable may implement to provide extra information lines to ErrorPrinter. WrappedException implements this new interface, as does the new WrappedError class.
  • New method Throwables.newSurrogate(Throwable) that supports creating new instances of throwables in order to have caller stack trace. When wrapped, the new throwable has a state compatible with the original, and the original throwable is the cause of the new throwable. When not wrapped, the original throwable is used directly and caller stack trace is lost.

    This is used to maintain exception types and states across thread boundaries, such as when an exception cause is obtained from an ExecutionException.

ao-lang-4.5.0

Release Notes

  • New getter methods on InvalidResult, which can be used to defer message bundle lookups. For example, the invalid result may be converted to any of the various Localized*Exception exceptions.
  • Moved Freezable and FrozenException from SemanticCMS Core Model.
  • XmlUtils improvements:
    1. Made isNameStartChar(int), isNameChar(int), and isHyphen(int) public.
    2. Renamed isValidId(String) to isValidName(String), since IDs are defined as being valid Name.
    3. Created variant of isValidName(String,int,int) to validate a substring without allocation.
  • Additional utility methods for working with project version numbers.
  • Added Web development MIME types text/x-sass and text/x-scss, per css - MIME type as text/plain for Sass stylesheet in chrome - Stack Overflow.

ao-lang-4.4.0

Release Notes

  • New methods WrappedException.wrapChecked(Callable, …) that invoke a callable while wrapping any checked exceptions. This is especially helpful when using methods with checked exceptions within Java 8+ functional/stream contexts.

ao-lang-4.3.1

Release Notes

  • ZipUtils.unzip(…) now throws IOException when unable to create directories.

ao-lang-4.3.0

Release Notes

ao-lang-4.2.0

Release Notes

ao-lang-4.1.0

Release Notes

ao-lang-4.0.0

Release Notes

  • Minimum Java version changed from 1.7 to 1.8.
  • Reduced use of property substitutions in pom.xml. This is to help 3rd-party parsers that fail to perform full Maven-compatible substitutions.
  • New wrappers to avoid closing streams and writers.
  • New appendTo(…) methods on Writable for use with Appendable. Reasonably efficient default interface methods are provided, but implementations may provide more optimal solutions.
  • New class AppendableWriter that adapts Writer to Appendable.
  • Added support for trimming String and CharSequence based on code points, with a value considered whitespace when it is either <= '\u0020' (for compatibility with String.trim()) or Character.isWhitespace(int).
  • Writable now trims based on code points, with a value considered whitespace when it is either <= '\u0020' (for compatibility with String.trim()) or Character.isWhitespace(int).
  • New static constants for various common content-type: ContentType.
  • Deprecated com.aoindustries.time package since now redundant with Java 8.
  • New package com.aoindustries.exceptions.
  • New static SmartComparator.ROOT for comparisons done in Locale.ROOT.
  • Strings now splits based on code points, with a value considered whitespace when it is either <= '\u0020' (for compatibility with String.trim()) or Character.isWhitespace(int).
  • New @FunctionalInterface interface SerializableFunction, that unions Function and Serializable.
  • New class Iterables with a set of various Iterable over common Java types, useful to avoid conflict after type erasure.

    Sometimes different method overloads want to accept different types of Iterable, but they cannot due to conflict after type erasure.

  • Updated dependencies.
  • Moved and renamed classes:
    1. com.aoindustries.util.StringUtilityStrings
  • com.aoindustries.security.NotAuthenticatedException moved here from the old AOCode Public project. Resolves this split-package with AOCode Public.
  • Split collection-related utilities into new AO Collections project.
  • Moved a few general-purpose exceptions to the new com.aoindustries.exception package:
    1. NotImplementedException
    2. WrappedException
    3. WrappedExceptions
  • Renamed Strings.splitString(…) to Strings.split(…).
  • Deprecated SafeMath.multiply(long, long), please use Math.multiplyExact(long, long).

ao-lang-3.3.0

Release Notes

ao-lang-3.2.0

Release Notes

  • Added new variants of StringUtility.indexOf(…) that accept a BitSet of the characters to find.

ao-lang-3.1.0

Release Notes

  • Fixed bug in CalendarUtils.parseDate(…) that failed to set the month before verifying date is valid within the month.
  • Moved the following classes from the old AOCode Public project:
    1. com.aoindustries.util.StringUtility
  • Added missing char to String replacement methods in StringUtility.
  • New methods in XmlUtils for element ID validation and generation.

ao-lang-3.0.0

Release Notes

  • Breaking changes (source-compatible, rebuild required):
    1. CalendarUtils returns GregorianCalendar instead of Calendar where appropriate.
  • New class Monies for processing multiple monetary values in different currencies at once.
  • New class CurrencyUtil for help working with Currency.
  • Changed from Calendar.getInstance() to new GregorianCalendar() to work correctly independent of locale settings.
  • Created TimeZone variants of date/time conversion methods.
  • Deprecated AoCollections.emptyIterator() in favor of Collections.emptyIterator() available since Java 1.7.
  • ErrorPrinter now includes all suppressed exceptions from Throwable.getSuppressed().

ao-lang-2.1.0

Release Notes

  • New method SafeMath.castShort(long) to safely cast from long to short with bounds checks.
  • Using managed dependencies:
    1. This project uses managed dependencies.
    2. This project's managed dependencies may also be imported by other projects.
  • Resolved Javadoc warnings.

ao-lang-2.0.0

Release Notes

ao-lang-1.0.0

Release Notes

  • Pulling small, general-purpose extensions to the standard Java libraries out of AOCode Public into a new AO Lang project.
  • New AoArrays.sortParallelArrays method to sort parallel arrays.
  • ProcessResult improvements:
    1. exec method now allows varargs.
    2. Now uses only one additional thread to read standard error.
    3. Delays the allocation of StringBuilder objects until needed.
    4. Provides an appropriate starting buffer size to the StringBuilder objects.
    5. Reduces the amount of synchronization.
  • BufferManager improvements:
    1. Uses soft references to avoid potential runaway memory leaks.
    2. Provides additional statistics including the number of buffers zero-filled and detected as garbage collected.
    3. Javadoc comment improvements.
  • ApplicationResourcesAccessor improvements:
    1. Added Listener hook for code interested in calls to getMessage.
    2. Used this new hook to decouple AO Lang from AOCode Public.
  • FastObjectOutput improvements:
    1. writeFastUTF compares strings with .equals to find all duplicates.
    2. Removed internal quick-scan arrays. We've learned to not underestimate the performance of HashMap.
    3. Improved Javadocs.
  • FastObjectInput improvements:
    1. Improved Javadocs.
  • Also moving some of the small, general-purpose extensions to the standard Java libraries out of AOServ Client into this new AO Lang project.
  • AoCollections improvements:
    1. New filterByValue methods to get the key set from maps for all entries matching a given value.
    2. unmodifiableCopy* methods allow wider generic bounds for more versatility.
    3. optimalUnmodifiable* methods allow wider generic bounds for more versatility.
    4. unmodifiableIterator method allows wider generic bounds for more versatility.
    5. filter method allows wider generic bounds for more versatility.
    6. filterByValue methods allow wider generic bounds for more versatility.
  • New method XmlUtils.getChildTextContent(Element, String) to get child text content with a one-liner.
  • New method FileUtils.readFileAsString(File, Charset) to provide the character set when reading a file into a string.
  • New localized exception LocalizedIllegalStateException.
  • Updated dependencies.