News and noteworthy - phax/ph-commons GitHub Wiki
- v12.x (Java 17) - is in development
- v11.x (Java 11) - critical fixes are backported
- v10.x (Java 1.8) - not maintained anymore
- v9.x and older (Java 1.8) - not maintained anymore
v12.5.1 - 2026-10-08
- Added the new interface
IHttpClientCredentialsas the common base of all client side credentials for the HTTPAuthorizationheader.BasicAuthClientCredentialsimplements it - Added
BearerAuthClientCredentialsandHttpBearerAuthin the new packagecom.helger.http.bearerauthto support HTTP Bearer Token authentication (RFC 6750). The scheme name is matched case-insensitively when parsing - Added
IJsonCollection.forEachJson (Consumer)to iterate all contained JSON children - the elements of anIJsonArrayand the values of anIJsonObject - Added
IJsonCollection.forEachMapped (Function, Consumer)andIJsonCollection.forEachMapped (Predicate, Function, Consumer)to iterate, filter and map all contained JSON children - Added
IJsonCollection.getAllMapped (Function)andIJsonCollection.getAllMapped (Predicate, Function)to map all contained JSON children into a new list, without the intermediate copy thatIJsonArray.getAll ()andIJsonObject.values ()create -
Security fix:
XMLTransformerFactory.makeTransformerFactorySecure (TransformerFactory, String...)denied nothing at all on Saxon, if no allowed scheme was passed in (which is the default, and whatcreateTransformerFactory (ErrorListener, URIResolver)does). It applied the empty String toXMLConstants.ACCESS_EXTERNAL_DTDandACCESS_EXTERNAL_STYLESHEET, which is what the JAXP specification defines for "deny all access to external references" - and what the JDK implementation does. Saxon however mapsACCESS_EXTERNAL_STYLESHEETonto its ownFeature.ALLOWED_PROTOCOLS, where the empty String is explicitly documented to be ignored and to fall back to the defaultall, so the call silently allowed every protocol. The two JAXP properties keep their specified value, and the Saxon featurehttp://saxon.sf.net/feature/allowedProtocolsis now additionally set to the Saxon keyword#nonewhen no scheme is allowed at all. It is applied as a separate, implementation specific attribute on purpose:#noneis not a valid value according to the JAXP grammar for these properties (a scheme isalpha *( alpha | digit | "+" | "-" | "." )), so using it as the value of the standard properties would leave an implementation that validates the value completely unrestricted. An implementation that does not know the Saxon attribute ignores it - that is logged on debug level only. -
AbstractStatisticsHandlerNumericandAbstractStatisticsHandlerKeyedNumericnow keep the sum in alongand only switch toBigIntegerif that overflows. Previously every single recorded value allocated a newBigInteger, which is noticeable in the hot path of the timer and size handlers - and for the keyed handlers it additionally meant one permanently retainedBigIntegerper key. ThegetSum ()methods keep returningBigIntegerand are unchanged in behaviour. -
Incompatible change:
AbstractWALDAOandAbstractSimpleDAOnow throw aDAOException, if the file to be read exists but cannot be parsed as XML. Previously this was only logged as an error and the DAO silently continued with no content at all. The next write then replaced the existing file and deleted the only copy of the data - for the ph-oton user, user group and role DAOs a single broken XML file therefore locked everybody out and discarded the file afterwards. The registered read exception handlers ofAbstractDAO.exceptionHandlersRead ()are now invoked for this case as well. See phax/ph-oton#11 - Deprecated
XMLMaskHelper.getXML11EntityReferenceString (char)andEXMLParserFeature.SAX_IS_XML11_PARSERbecause XML 1.1 is deprecated - see w3ctag/obsoletion#6
v12.5.0 - 2026-09-21
- Updated to BouncyCastle 1.86
- Added
StringHelper.is(Not)Blankin favour ofis(Not)EmptyAfterTrimusingString.isBlankinternally - Deprecated
StringHelper.is(Not)EmptyAfterTrim - Continued the "security by default" work of v12.3.2 in
ph-xml, after comparing it against the security measures of Apache Commons Secure XML. The central insight taken over from that project is that a resource resolver returningnullis not a block: every JAXP implementation treatsnullas "not handled" and then opens the URI itself. A blocked resource is therefore now resolved to an empty document instead, which cannot be bypassed.-
Security fix:
XMLTransformerFactory.createTransformerFactory (ErrorListener, URIResolver)now appliesmakeTransformerFactorySecure()to the returned factory. Previously only the internalgetDefaultTransformerFactory()instance was secured, so a factory created through the public method combined with aURIResolverthat blocked a remote scheme still let XSLTC fetch that URL itself - the remote content ended up in the transformation result (SSRF viadocument(),xsl:importandxsl:include). -
Incompatible change:
XMLFactory.defaultCustomizeTransformerFactory (TransformerFactory)now enablesFEATURE_SECURE_PROCESSING, which was prepared but disabled in the code before. It is the only setting that stops the fetch described above, and it therefore also affectsXMLFactory.createDefaultTransformerFactory (). Anxsl:import/xsl:includethat is resolved by aURIResolver- asDefaultTransformURIResolverdoes for all class path andfilebased resources - keeps working unchanged. A stylesheet that relies on the XSLT processor resolving an include on its own now fails; either install a resolver, or callXMLTransformerFactory.makeTransformerFactorySecure (aFactory, "file")to allow that scheme explicitly. -
DefaultTransformURIResolverreturns an emptyDOMSourceinstead ofnullfor a resource whose URL scheme is not allowed, so thatdocument()evaluates to an empty node set and the wrappedURIResolveris not consulted for a blocked resource either. -
SimpleLSResourceResolverreturns anLSInputwith an empty byte stream instead ofnullfor a blocked resource. Note that anLSInputcarrying only an empty string data is not sufficient - Xerces treats it like "no content at all" and opens the system ID anyway. -
DefaultEntityResolvernow performs the same URL scheme check as the other two resolvers, using the new methodssetAllowedRemoteSchemes(String...)andgetAllAllowedRemoteSchemes(). A blocked entity resolves to an empty document. Previously this resolver resolved every system ID without restriction, which was documented as a security warning only. - Added
XMLSchemaValidationHelper.makeValidatorSecure (Validator, String...)that denies the external DTD and schema access of a singleValidator. This is needed because the JAXP contract ofSchemaFactory.setResourceResolver()explicitly states that neither the resolver nor the properties of aSchemaFactoryare inherited by theSchema,ValidatorandValidatorHandlerobjects it creates - so aValidatorobtained from an unsecuredSchemaFactoryread the external DTD of the instance document. It is now applied byXMLSchemaValidationHelper.validate (...)and bySchemaCache.getValidatorFromSchema (Schema), the latter additionally propagating theLSResourceResolverof itsSchemaFactoryonto theValidator. Note thatXMLSchemaValidationHelper.validate (...)reports a blocked external entity as anIllegalArgumentExceptionand not in the error list, because that is how it handles all fatal parsing errors. - Added a secure StAX factory, which
ph-xmlwas missing completely:XMLFactory.createDefaultXMLInputFactory ()andXMLFactory.defaultCustomizeXMLInputFactory (XMLInputFactory)disablesupportDTDandisSupportingExternalEntitiesand install the newcom.helger.xml.stax.EmptyXMLResolveras a non-bypassable floor, for implementations that ignoresupportDTD. Contrary to all other XML APIs, StAX defines noFEATURE_SECURE_PROCESSINGcounterpart, so the limits on the internal entity expansion remain the ones of the implementation (seeXMLSystemPropertiesfor the JDK ones).
-
Security fix:
- Added
IPagingSpec.get(StartIndex|MaxCount)AsIntoverloads for all consumers bound to int range. -
Incompatible change:
CompareHelper.compareTrueBeforeFalse (boolean, boolean)andcompareFalseBeforeTrue (boolean, boolean)did the exact opposite of what their names say -compareTrueBeforeFalsesortedfalsefirst and vice versa. Both now match their names (the Javadoc ofcompareFalseBeforeTruewas wrong as well and now reads "false before true"). The only affected caller inside ph-commons isMutableBoolean.compareTo (MutableBoolean), which now sortsfalsebeforetrue, consistent withBoolean.compareTo. Code that sorted booleans with either method gets the reverse order than before. -
Bugfix:
ThreadDescriptorList.getAsString ()andgetAsMicroNode ()threw aNullPointerExceptionfor everyThread.Statethat had no thread, because the internal state map only contained the states that actually occurred. Both methods are now safe, and a thread that died in the meantime (and therefore has no state anymore) no longer causes aNullPointerExceptioneither. -
Incompatible change:
ICommonsOrderedSetandICommonsSortedSet(and thereforeICommonsNavigableSet) replaced the no-argumentgetFirst ()andgetLast ()withgetFirstOrNull ()andgetLastOrNull ()- the same changeICommonsListreceived in v11.1.5. The old no-argument methods were dead code since Java 21:SequencedCollection.getFirst ()/getLast ()of the implementation classes (ArrayList,LinkedHashSet,TreeSet, ...) shadow any interface default method of the same name, so the documented@Nullablecontract never applied and an empty collection threw aNoSuchElementExceptioninstead. ThegetFirst (default)andgetLast (default)overloads are unaffected. -
Bugfix:
MimeTypeInfo.getPrimaryGlob ()andgetPrimaryExtension (WithSource) ()are documented as@Nullablebut threw aNoSuchElementExceptionfor an info without globs resp. extensions, for the reason above. They now returnnullas documented. -
Bugfix:
ArrayIteratorByte.next ()ignored the offset, if the iterator was created withbCopyNeeded == false- it always started at index 0 of the source array instead of at the provided offset. The copying constructors were not affected, because they copy the requested range. -
Bugfix:
ICommonsSortedMap.copyOfEntrySet ()always threw aClassCastException, if the map used the natural ordering of the keys, becauseMap.Entryis notComparable. The returned set is now sorted by key in all cases - using the comparator of the map, if present, and the natural ordering of the keys otherwise. Additionally an entry with anullvalue no longer throws aNullPointerException, because the entries are copied withMapEntryinstead ofMap.Entry.copyOf. -
Incompatible change:
ICommonsSortedMap.copyOfKeySet ()andcopyOfKeySet (Predicate)now use the comparator of the map, so that the copy has the same ordering as the map. Previously the copy always used the natural ordering of the keys, and a map with non-Comparablekeys and a custom comparator could not be copied at all. -
Incompatible change:
equalsofWrappedCollection,WrappedListandWrappedSetnow unwraps the passed object, if it is one of these facades, so that two facades around equal collections are equal. Previously the wrapped collection was compared with the facade, so e.g. twoWrappedCollectionobjects around equalArrayLists were never equal, becauseAbstractList.equalsrejects a non-Listargument. A facade is still equal to the collection it wraps. - The
coverageprofile now enforces a minimum JaCoCo instruction coverage per module viajacoco:check- 80% for all modules, 90% forph-base(configurable via thejacoco.check.minimumproperty) - Extended the unit tests of
ph-base,ph-bc,ph-collection,ph-commons,ph-config,ph-dao,ph-datetime,ph-diagnostics,ph-graph,ph-http,ph-io,ph-jaxb,ph-jaxb-adapter,ph-json,ph-scopes,ph-security,ph-settings,ph-text,ph-tree,ph-typeconvert,ph-url,ph-wsclientandph-xmlto reach the new minimum code coverage. - All field names passed to the
ToStringGeneratorappend*methods now start with an uppercase character, so that thetoString ()output is consistent across all classes. This only changes the text of thetoString ()results, which is not part of the API contract. - Extended the
ValueEnforcerbased parameter validation of the public API ofph-config,ph-config-json,ph-jsonandph-xml. Methods that so far relied on an incidentalNullPointerException, anArrayIndexOutOfBoundsExceptionor on no check at all now fail fast with a named message. Parser and serializer callbacks that are only invoked by a parser (e.g. theIJsonParserHandlerimplementations,MicroSAXHandlerand the per-character helpers ofXMLCharHelper) were deliberately left unchecked.-
Incompatible change:
XMLHelper.getPathToNode (Node[, String])andgetPathToNode2 (Node[, String])now throw aNullPointerExceptioninstead of anIllegalStateExceptionfor anullnode or anullseparator. -
Incompatible change:
AbstractMicroNode.internalSetParentNode (AbstractMicroNodeWithChildren)now throws aNullPointerExceptioninstead of aMicroExceptionfor anullparent node. -
XPathHelper.createNewXPathExpression (XPath, String)now enforces the documented@Nonemptycontract of the XPath expression instead of only checking fornull.
-
Incompatible change:
v12.4.0 - 2026-08-30
-
ph-securityno longer requires BouncyCastle at runtime - theph-bcdependency was changed fromoptionaltotestscope (thanks to @gregjotau for https://github.com/phax/ph-commons/pull/57). The two remaining linkages were replaced: the "CRL Distribution Points" certificate extension is now decoded by the new package privateCRLDistributionPointParser, a deliberately strict DER parser for exactly that extension (RFC 5280, section 4.2.1.13), andEOCSPResponseStatususes the numerical values of RFC 6960, section 4.2.1 directly instead of importing them from BouncyCastle. The public API, the returned CRL URLs, the CRL caching and the revocation check implementation are all unchanged, and applications are of course still free to register the BouncyCastle provider viaph-bc. -
Incompatible change:
CRLHelper.getAllDistributionPoints (X509Certificate)now throws anUncheckedIOExceptionfor a "CRL Distribution Points" extension that is not valid DER. BouncyCastle additionally accepted a few BER encodings - e.g. the indefinite length form or trailing data after the extension - and reported structural problems asIllegalArgumentException. RFC 5280 requires certificate extensions to be DER encoded, so such certificates are now rejected instead of guessed. - The revocation check no longer lets a failure to decode the "CRL Distribution Points" extension escape from
RevocationCheckBuilder.build (). It is now handled like a failed CRL download, so the result isERevoked.UNKNOWN("the revocation status cannot be determined") instead of an exception. - Added the constant
CHttpHeader.REPORTING_ENDPOINTSfor theReporting-EndpointsHTTP response header of the Reporting API. It declares the named endpoints that the CSPreport-todirective (seeCSPDirective.createReportTo (String)) refers to. - Added a builder for the
Permissions-PolicyHTTP response header in the new packagecom.helger.http.permissionspolicy, modelled after the existing CSP builder.PermissionsPolicycollects an arbitrary number ofPermissionsPolicyDirectiveobjects andPermissionsPolicy.getAsString ()emits them comma separated, ready to be used as the value ofCHttpHeader.PERMISSIONS_POLICY.PermissionsPolicyAllowListbuilds the allow list of a single directive - the wildcard*viasetAll (), the empty list()that disables a feature everywhere,self,srcand quoted origins viaaddOrigin (String); the shorthandscreateNone (),createAll ()andcreateSelf ()cover the most common cases.PermissionsPolicyDirectiveoffers a static factory method for each of the 50 directives currently listed on https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy (e.g.createGeolocation (...)orcreatePictureInPicture (...)), and additionally supports the optional per-directive reporting endpoint viagetWithReportTo (String). Note that - contrary to CSP - an empty allow list is meaningful and is therefore emitted asgeolocation=(), whereas a directive without any value at all is silently skipped. - Added the new package
com.helger.collection.paginginph-collection, containing a data store independent parameter object for paged and sorted queries.SortFieldis a single logical field name plus anESortOrder,IPagingSpec/PagingSpeccombine a 0-based start index, a maximum count (both of typelong; all count values < 0 mean "no limit") and an ordered list ofSortFieldobjects. The intention is that a query API takes a singleIPagingSpecparameter, so that it does not need to be extended whenever another paging or sorting aspect is needed. Deliberately no assumption is made about the underlying data store - the mapping of a field name onto a database column, a document field or aComparatoris up to the caller.PagingHelper.getPage (...)applies a specification onto an in-memory collection, as the fallback for all data stores that cannot do it natively. It never modifies the source collection. - Added the new method
AbstractMapBasedWALDAO.getAllPaged (Predicate, boolean, IPagingSpec, Comparator)that applies a paging specification onto the contained items, as the in-memory implementation of a paged query.
v12.3.5 - 2026-08-12
- Added the strict version layout
major[.minor[.micro]][-qualifier]toVersion, consisting of the new methodsVersion.parseStrictOrNull (String)andVersion.getAsStringStrict ()plus the new constantsVersion.STRICT_QUALIFIER_SEPARATORandVersion.NUMERIC_PART_SEPARATOR. Contrary toVersion.parse (String)the qualifier is always introduced by the first-character, so that a purely numeric qualifier is retained as such.Version.parse ("1.4-03")returns the version1.4.3, because the-is treated like a.and03ends up as the micro version number, whereasVersion.parseStrictOrNull ("1.4-03")returns1.4.0with the qualifier03. This inconsistency ofVersion.parse (String)only shows up for numeric qualifiers -1.4-SNAPSHOTand1.4-RC1are parsed as expected - and it was left unchanged for backwards compatibility.getAsStringStrict ()is the exact inverse ofparseStrictOrNull (String), so every emitted string can be read back again. - Added the new overload
HasInputStream.create (byte [], int, int)to create a multi-readIHasInputStreamon a part of a byte array, without having to copy it first. - Fixed XML writing to no longer lose the namespace of an attribute whose namespace URI is identical to the default namespace URI that is currently in scope.
Such an attribute was written without a namespace prefix and therefore silently ended up in no namespace at all, because the default namespace never applies to attribute names (see https://www.w3.org/TR/xml-names/#defaulting).
A namespaced attribute now always gets a non-empty namespace prefix. This affects
XMLWriter/XMLSerializeras well asMicroWriter/MicroSerializer. - Fixed XML writing of elements without a namespace that are nested inside a default namespace.
Previously the invalid namespace declaration
xmlns:ns0=""was created - a namespace prefix can never be bound to the empty namespace URI - so that the created XML could not be parsed again. The default namespace is now correctly undeclared usingxmlns=""instead. -
XMLWriterSettings.setUseExistingNamespaceDeclarations (true)now creates the namespace declarations that are missing in the source node, instead of emitting undeclared namespace prefixes. That is relevant for DOM and MicroDOM trees that were created programmatically, because those usually don't carry anyxmlnsattributes at all. For that purpose the new methodAbstractXMLSerializer.NamespaceStack.ensureNamespaceDeclaration (String, String, Map)was added. Together with the fixes above,XMLWritercan now be used instead of the JAXP identity transformer to serialize XML signed documents (e.g. AS4/SOAP messages), as long assetUseExistingNamespaceDeclarations (true)is enabled - the namespace prefixes are part of the canonicalized form and must therefore be retained as-is. -
AbstractXMLSerializer.NamespaceStack.addNamespaceMapping (String, String)no longer requires a non-empty namespace URI, because the empty namespace URI is needed to undeclare a default namespace.
v12.3.4 - 2026-08-04
- Extended
EHttpMethodwith the newQUERYmethod according to RFC 10008.QUERYis idempotent (isIdempodent ()) and carries a payload in the request body (isPayloadInBody ()). - Added new constants in
CHttpHeaderforX-Forwarded-* -
ConfigWithFallbackno longer logs a "please rename" warning for outdated configuration keys that were resolved from a system property or an environment variable, as these sources usually cannot be renamed as easily as e.g. a configuration file. - Added iteration to the cache API. The new method
ICache.iterateCacheKey (Consumer)invokes the provided consumer for each non-expired cache key, andICache.iterateCache (BiConsumer)does the same for each non-expired key and value combination. Both are implemented inAbstractMapBasedCache(and therefore inManualCache) as well as inProviderCacheandCache. Cache implementations that map the cache key to a different storage key (MappedKeyManualCache,MappedKeyProviderCacheandMappedCache) throw anUnsupportedOperationException, because they don't retain the original keys -MappedKeyManualCache.iterateStorageCacheKey (Consumer)andMappedKeyManualCache.iterateStorageCache (BiConsumer)were added to iterate the storage keys instead. Note: this is a breaking change for classes implementingICacheoutside of ph-commons. - Added the two convenience methods
getAllCacheKeys ()(returning a copy of all non-expired cache keys) andremoveFromCacheIf (Predicate)(removing all entries with a matching key in one go) toAbstractMapBasedCache. All key iteration happens under the write lock, because the iterators of the underlying soft maps are not thread-safe. Therefore the provided consumer or predicate must not modify the cache.
v12.3.3 - 2026-07-15
- Updated to BouncyCastle 1.85 (fixing a myriad of CVEs)
- JSON writing now escapes all control characters (
U+0000-U+001F) as\u00XXper RFC 8259. Previously control characters like0x01were written raw, producing output that strict JSON parsers reject. - parsing a JSON number with a huge positive exponent like
1e999999999no longer lets anArithmeticExceptionescape the parser; it is now a regular, recoverable parse error. - added the new parser setting
maxExponent(default100000, aligned with Jackson'sMAX_BIGINT_SCALE_MAGNITUDE) that limits the absolute value of a numeric exponent, to bound the memory a single number token can force to be allocated. Configurable viaJsonReader.builder ().maxExponent (int). -
JsonEscapeHelper.jsonUnescapenow throws a documentedIllegalArgumentExceptionfor malformed input (a trailing escape char or an incomplete\uXXXXsequence) instead of anArrayIndexOutOfBoundsExceptionorStringIndexOutOfBoundsException. - reading a JSON object with a duplicate key now logs a warning (the last value still wins, as before).
- fixed
JsonStringBuilder.backup (int)to invalidate the cached String, sogetAsString ()no longer returns a stale value after a backup.
v12.3.2 - 2026-07-05
- Made the soft maps
AbstractSoftMap,SoftHashMapandSoftLinkedHashMapthread-safe to avoid weird effects in cache eviction. Previously the maps were completely unsynchronized, although none of their operations is truly read-only:get()removes garbage collected entries,size()drains the internalReferenceQueue, andSoftLinkedHashMapuses access order, so every read reorders the internal linked list. Concurrentget()calls (e.g. by multiple threads holding only a shared read lock, as in theph-cachemodule) could therefore corrupt the internal map - forSoftLinkedHashMaptypically by creating a cycle in the internal doubly linked list, so that a later iteration (likeevictExpired()) never terminated while holding the cache write lock, blocking all other cache access.- All map operations are now internally synchronized. Note that even seemingly read-only operations like
get()andsize()acquire the internal write lock, for the reasons outlined above. - Iterators and the collection views (
entrySet(),keySet(),values()) remain unsynchronized - as withCollections.synchronizedMap()the caller must ensure that the map is not modified concurrently while iterating. -
containsKey()is now O(1) and consistent withget(): entries whose value was garbage collected count as "not contained". The same applies to the newcontainsValue()implementation. - Fixed
entrySet().contains()andentrySet().remove()which always returnedfalsebecause they compared the internalSoftValuewrappers by identity. Additionally each such call registered a temporarySoftValuewith the internalReferenceQueue, which could silently remove a live map entry once the probe value was garbage collected. -
entrySet().add()andaddAll()now throw an explicitUnsupportedOperationException, in line with theMap.entrySet()contract. They never worked before either - the JDK entry set already rejected the addition. - The callbacks
AbstractSoftMap.onEntryRemoved()andSoftLinkedHashMap.onRemoveEldestEntry()are now invoked while the internal write lock is held.
- All map operations are now internally synchronized. Note that even seemingly read-only operations like
-
AbstractMapBasedCache.evictExpired()no longer throws aNullPointerExceptionwhen a cached value was garbage collected from the internal soft map but the stale entry was not yet cleaned up. Such stale entries are now dropped during the sweep, but are deliberately not counted as expired (neither in the return value nor in the$expiredstatistics counter). - The map returned by
AbstractMapBasedCache.createCache()MUST be thread-safe, because it may be accessed by multiple threads concurrently holding only the cache's read lock. The default soft maps fulfill this requirement; custom overrides need to be checked. - Security by default in the external XML resource resolvers: remote URL schemes are no longer resolved unless explicitly allowed, to prevent Server Side Request Forgery (SSRF).
Class path and file based resolution is unaffected, so setups where all XML Schemas and XSLT documents reside locally (the common case) keep working without any change.
- Added the new helper class
com.helger.xml.XMLResourceSchemeHelperthat decides whether a resolved resource may be accessed, based on its URL scheme. The schemeshttp,https,ftpandftpsare considered remote network schemes and are blocked by default; local schemes (file,jar,classpath, OSGibundle, ...) and non-URL based resources are always considered safe. -
SimpleLSResourceResolvernow blocks resolved resources with a remote URL scheme by default, preventing SSRF via XML Schemaxs:import/xs:includeor external entities. Use the new methodsetAllowedRemoteSchemes(String...)(plusgetAllAllowedRemoteSchemes()) to explicitly allow specific remote schemes. A blocked resolution is logged as a warning and returnsnull, so the parser applies its own (restricted) default resolution. -
DefaultTransformURIResolverapplies the same check to prevent SSRF via XSLTdocument(),xsl:importorxsl:include, with the same newsetAllowedRemoteSchemes(String...)/getAllAllowedRemoteSchemes()methods. The scheme is checked beforeexists()is called, becauseexists()may already open a remote connection. -
XMLTransformerFactory.makeTransformerFactorySecure()now always sets theACCESS_EXTERNAL_DTDandACCESS_EXTERNAL_STYLESHEETattributes - previously they were left untouched when no allowed scheme was provided. Providing no scheme now denies all external DTD and stylesheet access.TransformerFactoryimplementations that don't support these attributes no longer fail - theIllegalArgumentExceptionis caught and logged as a warning instead. - Added a security warning to the Javadoc of
DefaultEntityResolver: it resolves the passed system ID without restrictions and must not be installed when parsing untrusted XML. With the default (secure) parser configuration ofXMLFactory, DOCTYPE declarations and external entities are disallowed, so this resolver is not invoked for external entities.
- Added the new helper class
-
XMLEmitter.onProcessingInstruction()now throws anIllegalArgumentExceptionif the processing instruction target or data contains the PI end marker?>, as that would allow breaking out of the processing instruction (XML injection). - Deprecated
PasswordHashCreatorSHA512- it performs a single, unsalted SHA512 pass and is therefore vulnerable to brute force and rainbow table attacks. UsePasswordHashCreatorPBKDF2_SHA256_600000_48orPasswordHashCreatorBCryptfor hashing new passwords; the class is kept only to verify password hashes that were created with it in the past.
v12.3.1 - 2026-07-01
- Added a builder for
TrustedCACheckerwith a newsynchronizedRevocationCheckoption and deprecated the existing constructors for removal - Removed
ph-telemetryagain - resides now in a separate top-level project https://github.com/phax/ph-telemetry/
v12.3.0 - 2026-06-10
- Extended
IJsonObjectwith a newreplaceKey (String, IJson)method (and anObjectoverload) that replaces the value of an existing key while preserving the original insertion order of the keys. ReturnsEChange.CHANGEDwhen an existing key was replaced andEChange.UNCHANGEDwhen the key was not present (no implicit insert). Useful e.g. to replace a nestedIJsonObjectwith a plainIJsonValuewithout losing the key's position in the surrounding object. - Added time-based expiration to
ph-cache. Each cache may now be configured with ajava.time.Durationtime-to-live; entries past their TTL are treated as a cache miss on the next read, removed under the write lock, and refetched via the value provider. A newcache:<name>$expiredstatistics counter tracks the number of expired entries that were dropped (distinct from$removeand$clear). Caches without a TTL behave exactly as before.- New class
com.helger.cache.impl.CacheEntry<V>— immutable value+expiration holder used as the internal storage type, replacingWrapper<V>. Anullexpiration means "never expires". ProvidesofNoExpiration,ofExpirationDateTimeandofTimeToLivefactories. Mirrors the shape ofExpiringObjectbut lives inph-cacheto avoid a circular dependency onph-datetime. -
MappedCachegained a new constructor overload that takes a@Nullable Duration aTimeToLive. Existing constructors delegate withnull(no behavior change). New accessorsgetTimeToLive(),hasTimeToLive(),setClockSupplier(Supplier<LocalDateTime>)andgetClockSupplier(). The clock supplier defaults toLocalDateTime.now(ZoneOffset.UTC)and can be replaced by tests for deterministic expiration assertions. -
Cachegained a corresponding constructor overload accepting a@Nullable Duration aTimeToLive. - Common configuration (
name,maxSize,allowNullValues,expireAfterWrite(Duration),evictionInterval(Duration),clockSupplier(Supplier<LocalDateTime>)) was lifted into the new package-private base classcom.helger.cache.impl.CacheBuilderBase(extendingIGenericImplTrait).CacheBuilder(forCache), the newProviderCacheBuilder(forProviderCache) and the newManualCacheBuilder(forManualCache) all extend this base and only contribute their type-specific bits (e.g.valueProvider(Function)for the provider-driven variants). Eachbuild()rejects configurations where an eviction interval is set without a positive TTL (there would be nothing to evict). Zero or negative durations are treated as "disabled". -
ManualCache.builder()was added and returns aManualCacheBuilder.ProviderCache.builder()now returns aProviderCacheBuilder(previously a genericCacheBuilder). The previously availableCacheBuilder.buildManualCache()andCacheBuilder.buildProviderCache()convenience methods were removed in favor of the dedicated builders; callers should switch toManualCache.builder()/ProviderCache.builder()(or tonew ManualCacheBuilder<>()/new ProviderCacheBuilder<>()directly). - Added
IMutableCache.evictExpired()returning the number of removed expired entries. For caches without a TTL this is a no-op returning0. -
CRLCachewas migrated offExpiringObject<CRL>and now storesCRLdirectly in aManualCache<String, CRL>configured with the caching duration. The half-duration fallback ("re-fetch failed, keep the previous CRL forcachingDuration/2") is now expressed via the newputInCache(K, V, Duration)overload. Public API ofCRLCacheis unchanged. -
Breaking change for subclasses of
MappedCache: the storage type of the protected methodsgetFromCacheNoStats(...),getFromCacheNoStatsNotLocked(...),putInCacheNotLocked(...)andcreateCache()changed fromWrapper<VALUETYPE>toCacheEntry<VALUETYPE>. External subclasses need to recompile against the new signatures. The publicIMutableCache/Cache/CacheBuilderAPI stays source-compatible.
- New class
-
CertificateRevocationCheckerDefaultsgainedfreezeDefaults()andisDefaultsFrozen(). AfterfreezeDefaults()is called, every setter on the class (setDefaultCRLCache,setRevocationCheckMode,setExceptionHdl,setSoftFailExceptionHdl,setAllowSoftFail,setExecuteInSynchronizedBlock,setCacheRevocationCheckResults) throwsIllegalStateException. This is a defence-in-depth trust-boundary harden: applications can callfreezeDefaults()once during startup, after all legitimate configuration, to refuse any later (possibly malicious or accidental) attempt to swap the process-wide CRL cache or alter the revocation defaults. The freeze is irreversible by design. Note: this protects the defaults registry; it does not freeze aCRLCacheinstance whose reference is already shared - the new Javadoc onCRLCache.setCRLOfURL(String, CRL)explicitly calls out that method as a privileged API.- Added the singleton
com.helger.cache.eviction.CacheEvictionSchedulerproviding opt-in shared background eviction. One process-wide daemon thread (ph-cache-evictor-%d) serves all registered caches; the underlyingScheduledExecutorServiceis started lazily on the firstregister(IMutableCache, Duration)call and shut down automatically when the last cache is unregistered. Per-cache intervals are supported. A failingevictExpired()of one cache is caught and logged so it cannot stop the other caches.CacheCleanUpRegistrarSPInow also callsCacheEvictionScheduler.shutdown()during library cleanup.
- Added the singleton
- Relaxed
ExpiringObjectto accept a@Nullable LocalDateTimeexpiration in its constructor. Anullexpiration means "never expires", which aligns the implementation with the contract already documented onIExpirable.getExpirationDateTime(). Existing code that passes a non-null expiration continues to work unchanged - Added
IMutableCache.putInCacheas an explicit method
v12.2.6 - 2026-05-18
- Updated JAXB to 4.0.8
- Deprecated
EErrorLevel.SUCCESS(andSingleError.builderSuccess()) - success is not really an error level. UseINFORMATIONinstead. Marked asforRemoval = true, since = "12.2.6". - Added new submodule
ph-telemetryproviding a vendor-neutral tracing abstraction. ExposesTelemetry(static facade),ITelemetrySpan,ITelemetryTracerSPIandETelemetrySpanKindundercom.helger.telemetry. Resolves the registeredITelemetryTracerSPIviaServiceLoaderon first use and falls back to a built-in no-op tracer if none is on the classpath, so callers can write tracing code unconditionally. Span kinds mirror OpenTelemetry'sSpanKindso an OTel-backed implementation can translate one-to-one. Convenience helpersTelemetry.withSpan (name, kind, Function)andTelemetry.withSpanVoid (name, kind, Consumer)start a span, record exceptions on it, and end it in afinallyblock.
v12.2.5 - 2026-04-30
- Added
IConfig.getAsConfigDuration (String)andIConfig.getAsConfigDuration (String, Consumer<String>)for reading configuration values directly asjava.time.Duration. The optionalConsumer<String>is invoked once with a descriptive message on parse failure (so it can e.g. be logged); missing or blank values returnnullwithout invoking it. - Added the reusable parser
com.helger.config.value.parser.ConfigDurationParseraccepting human-friendly compound expressions like5ms,2d5m23ms, or3d 4h 22m 5s. Supported units arens,us,ms,s,m,h,d. Each segment may carry its own optional sign (e.g.5h -10m= 4h 50m). Whitespace between segments, between sign and number, and between number and unit is permitted but not required. Unit suffixes are matched case-insensitively. Decimal values are not accepted. Inputs longer thanConfigDurationParser.MAX_VALUE_LENGTH(100) characters are rejected without further processing to bound the parser's work and mitigate denial-of-service / overflow attacks via overly long configuration values. The parser never throws — failures are reported via the error handler and anullreturn value.
v12.2.4 - 2026-04-29
- Added new entries to
EMessageDigestAlgorithmfor the message digest algorithms guaranteed to be available on every Java 17+ runtime via the SUN provider:SHA_512_224(SHA-512/224),SHA_512_256(SHA-512/256),SHA3_224(SHA3-224),SHA3_256(SHA3-256),SHA3_384(SHA3-384) andSHA3_512(SHA3-512). - Hardened the CRL download path used by
AbstractRevocationCheckBuilder:-
IURLDownloader.createDefault()now sets a connect timeout of 10 seconds and a read timeout of 60 seconds. Previously no timeouts were configured, so a slow or unreachable CRL distribution point could block revocation checks indefinitely. - Added
IURLDownloader.createDefault(int nConnectTimeoutMS, int nReadTimeoutMS)to override the defaults, plus the new constantsDEFAULT_CONNECT_TIMEOUT_MSandDEFAULT_READ_TIMEOUT_MS. - Added new class
CRLAllowListwith case-insensitive prefix matching to restrict which CRL distribution point URLs may be downloaded. Mitigates SSRF and unbounded-download risk against attacker-controlled certificates. An empty allow list keeps the legacy behavior of allowing every HTTP(S) URL. -
CRLDownloadernow exposesallowList()and consults it before each download. Refused URLs are logged with a warning. Non-HTTP/HTTPS URLs are now also logged with a warning instead of being dropped silently.
-
-
AbstractRevocationCheckBuilder.build()no longer returnsERevoked.REVOKEDwhen CRL retrieval fails. Previously a missing CRL (e.g. unreachable distribution point) was indistinguishable from a real revocation, which could wrongly block valid certificates during a CRL endpoint outage. The check now returns the newERevoked.UNKNOWNvalue instead. The detection covers both directly observable CRL download failures (every distribution point of the certificate returnednull) and the JDK-levelCertPathValidatorExceptionwith reasonUNDETERMINED_REVOCATION_STATUS. - Added new enum value
ERevoked.UNKNOWNwithisRevoked()returningfalse(so existing callers do not start treating unverified certificates as revoked) and a newisUnknown()accessor. - Added default methods
IRevokedIndicator.isUnknown()andIRevokedIndicator.isKnown()so callers can distinguish "verified not revoked" from "could not be verified". - Propagated the
UNKNOWNrevocation state through the higher-level certificate check API. Previously a CRL download failure would silently surface asECertificateCheckResult.VALIDwhen revocation caching was enabled, because the cache only exposed aboolean isRevokedview.- Added new enum value
ECertificateCheckResult.REVOCATION_STATUS_UNKNOWNwithisValid()returningfalse. - Added new method
RevocationCheckResultCache.getRevocationStatus(X509Certificate)returning the fullERevokedstatus. The existingisRevoked(X509Certificate)is preserved and now delegates to it. -
CertificateHelper.checkCertificateandTrustedCAChecker.checkCertificatenow returnREVOCATION_STATUS_UNKNOWNwhenever the underlying revocation check could not determine the certificate status.
- Added new enum value
v12.2.3 - 2026-04-27
- Fixed a regression from 12.2.0 that configuration properties resolved via
IConfigWithFallback.getAs...OrFallbackdid not get their variables replaced. See phoss-smp#478 - thx @RohiNof
v12.2.2 - 2026-04-26
- Added new setting
XMLWriterSettings.setUseExistingNamespaceDeclarations(boolean)to preserve existingxmlns:attributes from the DOM as-is during serialization instead of filtering and rebuilding them via the namespace stack. This is important for documents like XSLT where namespace prefixes are referenced inside attribute values (e.g.xs:boolean,u:gln) and would otherwise be silently dropped. Default isfalse(backwards compatible). Supported by bothXMLWriter(W3C DOM) andMicroWriter(Micro DOM). - Added new
IMicroReaderSettingsacceptingboolean bSaveNamespaceDeclarationsto preservexmlns:attributes as regular attributes onIMicroElementduring SAX parsing. Use in combination withXMLWriterSettings.setUseExistingNamespaceDeclarations(true)for round-trip fidelity of namespace declarations. - Added new method
MicroSAXHandler.setSaveNamespaceDeclarations(boolean)to control whether namespace declarations are stored as attributes during SAX parsing. - Removed OSGI bundling
v12.2.1 - 2026-04-21
-
ERevocationCheckModenow implementsIHasID<String>and provides static lookup methods - Fixed XXE vulnerability in
XMLSchemaCache.createXSDSchemaFactory()- now setsACCESS_EXTERNAL_DTDto empty andACCESS_EXTERNAL_SCHEMAto "file" only - Fixed potential denial-of-service in
StreamHelper.readSafeUTF()by adding a maximum allocation size check (MAX_SAFE_UTF_BYTES= 64 MB) - Added new class
PasswordHashCreatorPBKDF2_SHA256_600000_48with 600000 iterations (OWASP 2023 recommendation) - Deprecated
PasswordHashCreatorPBKDF2_SHA256_1000_48- usePasswordHashCreatorPBKDF2_SHA256_600000_48for new password hashing - Added new overload
SerializationHelper.getDeserializedObject(byte[], ObjectInputFilter)accepting anObjectInputFilter - Deprecated
SerializationHelper.getDeserializedObject(byte[])without a filter - Extended
AbstractConfigurationSource.isSecretKey()to also detect keys containing "secret", "token", "apikey", "api_key", "api-key" and "credential" - Fixed potential resource leak in
AbstractSimpleDAOandAbstractWALDAOwhengetXMLWriterSettings()throws beforeMicroWriter.writeToStreamis called - Improved XML comment formatting
v12.2.0 - 2026-04-19
- Updated to BouncyCastle 1.84 (fixing CVE-2026-5588, CVE-2025-14813 and CVE-2026-5598)
- Added support for Java 26 in
EJavaVersion - Added SHA-256 and SHA-256-sess algorithm support to
HttpDigestAuthper RFC 7616- New constants
ALGORITHM_SHA_256andALGORITHM_SHA_256_SESS - New method
isSupportedAlgorithm(String)to check for supported algorithms -
DigestAuthClientCredentialsnow accepts both 32-char (MD5) and 64-char (SHA-256) response hashes - MD5 remains the default algorithm for backwards compatibility
- New constants
- Added new method
Config.getValue (ConfiguredValue) - Added new method
IConfig.containsConfiguredValue (String)andIConfigurationValueProvider.containsConfigurationValue (String)to check for configuration property existence without retrieving the value. - Added new method
IConfigWithFallback.getAsBooleanOrFallback (String, boolean, String...)for boolean fallback resolution - Added new classes
ConfigSubsetandConfigSubsetWithFallbackto pass on only a limited subset of configuration properties - Changed
IConfigKeyOutdatedNotifier.onOutdatedConfigurationKeyto also receive theIConfigurationSourcethat matched the outdated key - Simplified
IConfigWithFallback.getAsIntOrFallbackandgetAsLongOrFallback— removed the bogus sentinel parameter; now only takes primary key, default value, and fallback keys - Refactored
ConfigWithFallbackfallback methods (getAsStringOrFallback,getAsBigDecimalOrFallback,getAsCharArrayOrFallback) to delegate throughgetConfiguredValueOrFallbackfor consistent behavior
v12.1.5 - 2026-03-16
- Deprecated
IToBooleanFunctionin favour ofPredicate - Added new method
ConfigFactory.addProfilePropertiesSourceswhich enables the loading of properties using the Spring profile pattern. See #40 - Added new constant
DoNothingJsonParserHandler.INSTANCE - Added new overload
Wrapper.get(Predicate) - Updated
ph-httpconstants to align with RFC 9110 (HTTP Semantics, 2022) and related specs:- Added new HTTP status codes: 102 Processing, 207 Multi-Status, 208 Already Reported, 226 IM Used, 423 Locked, 424 Failed Dependency, 425 Too Early
- Renamed status codes per RFC 9110: 302 Found (
HTTP_FOUND), 413 Content Too Large (HTTP_CONTENT_TOO_LARGE), 414 URI Too Long (HTTP_URI_TOO_LONG), 416 Range Not Satisfiable (HTTP_RANGE_NOT_SATISFIABLE) — old constant names are deprecated - Deprecated status codes 305 Use Proxy and 306 Switch Proxy per RFC 9110
- Fixed
getHttpResponseMessage()reason phrases to match RFC 9110 text (including 422 Unprocessable Content) - Added missing RFC 9110 standard headers:
Accept-Ranges,Content-Range,Expect,If-Range,Max-Forwards,Proxy-Authenticate,Range,TE,Trailer,Upgrade,Via - Added modern security headers:
Permissions-Policy,Cross-Origin-Embedder-Policy,Cross-Origin-Opener-Policy,Cross-Origin-Resource-Policy,Alt-Svc,Priority - Deprecated obsolete headers:
Warning(removed in RFC 9111),Pragma(deprecated in RFC 9111),DNT,X-UA-Compatible,PICS-Label,Content-Script-Type,Content-Style-Type,Window-target,Ext-cache,UA,x-device-user-agent - Added
HTTP/3.0toEHttpVersion(RFC 9114) - Updated Javadoc references from obsolete RFCs to RFC 9110
v12.1.4 - 2026-03-10
- Added constant
CHttp.HTTP_UNPROCESSABLE_CONTENTand deprecatedCHttp.HTTP_UNPROCESSABLE_ENTITY - Deprecated old CSP HTTP headers starting with
X- - Added interface method
IConfig.getConfigurationValueProvider () - Added enum
EConfigSourceTypeNameandEConfigSourceTypenow has agetDisplayText()method -
TrustedCAChecker.checkCertificatenow always uses the revocation cache if instructed to do so - there is no dependency on the check date -
TrustedCACheckergot a new constructor that provides more configuration flexibility - Added some missing JavaDocs for public methods
v12.1.3 - 2026-02-20
- Added new class
UUID5Helperto create UUID v5 objects - Classes
AbstractPersisting(Int|Long)IDFactorygot the possibility to modify the reserve count - Classes
File(Int|Long)IDFactorywill now try to resolve inconsistencies automatically on init - Added new constant
CMimeType.APPLICATION_DNS_MESSAGE
v12.1.2 - 2026-01-27
- Added static
Wrapperhelper methodsemptyandof - The
PDTWebDateHelperXSD based formatting methods, can now print up to nanoseconds (fraction digits) precision - Extended class
Wrapperwith simplegetmethods to access data of the wrapped object - If the
CRLCacheis re-fetching a CRL which is invalid, but the previous value is valid, the previous CRL is kept for some more time - Changed the default
CertificateRevocationCheckerDefaults.DEFAULT_REVOCATION_CHECK_MODEto useCRL_BEFORE_OCSPinstead of onlyCRL
v12.1.1 - 2025-12-16
- Updated to BouncyCastle 1.83
- Added methods
CertificateHelper.getPrincipalTypeValueOrNull - Added additional
CertificateHelper.getPrincipalTypeValueoverload - Added methods
StringHex.getHexEncodedByteArray - Deprecated the usage of XML 1.1 in
EXMLVersionandEXMLSerializeVersion- see https://github.com/w3ctag/obsoletion/issues/6 for details - Added
IMissingLocaleHandler.NULL_INSTANCEas a constant - Added new class
CertificateDecodeHelperto help decode certificates more safely.
v12.1.0 - 2025-11-02
- Changed from Jakarta Nullable annotations to JSpecify. See #54 - thx @vlsi. Backward incompatible change.
- Extracted submodule
ph-csvcontaining the CSV handling. This also changed the package of the classes fromcom.helger.commons.csvtocom.helger.csv. Backward incompatible change. -
SafeXMLStreamWriternow correctly honoursXMLWriterSettings.SerializeXMLDeclarationsetting
v12.0.4 - 2025-10-19
- Reverted back from
Map.entrytonew MapEntry<>due tonull-issues
v12.0.3 - 2025-10-03
- Updated to JAXB 4.0.6
- Added
JDK_25to enumEJavaVersion - Fixed bug in
PDTDisplayHelper.getPeriodTextin case where same day but earlier time is used. See https://github.com/phax/phoss-smp/issues/383
v12.0.2 - 2025-09-22
- Updated to BouncyCastle 1.82
- Made method
BigHelper.equalValuesnull-safe - Added overloads of
GenericReflection.newInstancewith a custom Exception consumer
v12.0.1 - 2025-09-19
- Added overloads
SimpleUrl.add (String, int|long) - Added possibility to customize
GenericJAXBMarshaller.xmlWriterSettings
v12.0.0 - 2025-08-24
- Extracted new submodule
ph-url - Added new annotation
UsedInGeneratedCode - Added new methods to
JAXBHelperto handle JAXBxs:anymappings - Renamed all methods in class
TestHelperso that it uses an uppercaseCinhashCodeorHashCode - Renamed class
URLCodectoRFC3986Codec - Renamed interface
IPrimitiveConverterTotoITypeConverterTo - Renamed interface
IHasPrimitiveConvertertoIHasTypeConverterToand renamed method togetTypeConverterTo() - Added new trait interface
IGenericMapAdderTrait - Renamed
ICommonsMap.addAlltoputAllIfNotNull - Added new class
TypeConverterToAny - Renamed class
PrimitiveConvererToIJsontoTypeConverterToIJson - Renamed package
com.helger.base.traitstocom.helger.base.trait - Renamed
ICommonsIterable.getCountmethods tosize - Interface
ICommonsIterablealready implementsIHasSize - Extracted class
URLCleanserand movedURLHelpertoph-base - Moved class
URNHelpertoph-base - Added new class
URLBuilderto buildISimpleURLobjects - Added new interface
IMutableURLDatato capture mutable URL data - Added new class
ReadOnlyURLas a read-only implementation ofISimpleURL - Deleted classes
IMutableURLParameterList,IURLParameterListandURLParameterListin favour ofICommonsList <URLParameter>
v12.0.0-rc1 - 2025-08-20
- The baseline is now Java 17 - older Java versions are no longer supported
- Uses parent-pom v3.0.0
- Completely restructured the libraries, so that smaller, functional JARs are created instead of one big
ph-commonsJAR- Added new submodule
ph-annotationsincluding the contents of JSR305- Only
NonnullandNullableare taken from thejakarta.annotationpackage instead
- Only
- Extracted new submodules
ph-base,ph-unittest-support,ph-typeconvert,ph-statistics,ph-cache,ph-io,ph-unittest-support-ext,ph-text,ph-diagnostics,ph-config-json,ph-mimeandph-http - Removed submodule
ph-less-commons- the remainders ended up inph-commons - Integrated
ph-web/ph-httpmodule content into this repository - If you are using JSON for configuration, make sure to include the new submodule
ph-config-jsonas well
- Added new submodule
- Movings
- Moved all annotations from package
com.helger.commons.annotationto submoduleph-annotations - Moved basically all classes back and forth between the modules - re-organizing your imports should do 95% of the work
- The
ArrayHelper.EMPTY_*constants were moved to classCGlobal - Moved constant
INITIAL_HASHCODEfromHashCodeGeneratortoHashCodeCalculator - Moved methods
CollectionHelper.new*toCollectionHelperExt.create*
- Moved all annotations from package
- Removals
- Removed classes
SecurityManagerHelper,ReflectionSecurityManager,IPrivilegedActionandAccessControllerHelperbecause the Java SecurityManager is deprecated for removal - Removed deprecated package
com.helger.jaxb.builder - Removed all methods marked as deprecated for removal
- Removed class
IJsonParserCustomizeCallback - Removed method
ABNF.isHexDigitCaseInsensitivein favour ofisHexDigit(was misreading the RFC)
- Removed classes
- Renamings
- Renamed class
SingleError.AbstractBuildertoAbstractSingleErrorBuilder - Renamed class
SingleError.BuildertoSingleErrorBuilder - Renamed class
Option.BuildertoOptionBuilder - Renamed class
KeyStoreAndKeyDescriptor.KeyStoreAndKeyDescriptorBuildertoKeyStoreAndKeyDescriptorBuilder - Renamed class
KeyStoreDescriptor.KeyStoreDescriptorBuildertoKeyStoreDescriptorBuilder - Renamed class
TrustStoreDescriptor.TrustStoreDescriptorBuildertoTrustStoreDescriptorBuilder - Renamed class
BasicThreadFactory.BuildertoBasicThreadFactoryBuilder - Renamed class
JsonReader.BuildertoJsonReader.JsonBuilder - Renamed methods
IMicroNode.append*toadd* - Renamed class
ABNFtoRFC5234Helper - Renamed class
ByteBuffersInputStreamtoMultiByteBufferInputStream - Renamed class
CommonsTestHelpertoTestHelper
- Renamed class
- Additions
- Added classes
(I)JsonParserSettings - Added new class
CacheBuilder - Added new constants
CMimeType.APPLICATION_EDIFACTCMimeType.APPLICATION_EDI_X12
- Via
FileHelper.setWarnOnIssuesthe warnings can be enabled or disabled - Added new interface
IWriteToWriter - Extended
IAppendableandHashCodeCalculatorwith overloads that take arrays with offset and length
- Added classes
- Incompatible changes
-
EqualsHelperandHashCodeGeneratorno longer work based on the SPI based registration. Instead the non-default cases need to be handled manually - By default the global debug mode (
GlobalDebug) is disabled - Extended the
JsonReaderbuilder to include all the settings directly - Extracted all collection related methods from
EqualsHelpertoCollectionEqualsHelper - Extracted functionality from
StringHelperinto new classes:StringHex,StringImplode,StringRemove,StringReplace - Extracted the
BigDecimalandBigIntegerfunctionality fromMathHelpertoBigHelper - Extracted functionality from
CollectionHelperinto new classes:CollectionFind,CollectionSort - The following SPI interfaces were changed:
-
com.helger.commons.thirdparty.IThirdPartyModuleProviderSPI->com.helger.base.thirdparty.IThirdPartyModuleProviderSPI
-
- The methods
IJsonObject.addJsonwhere renamed toaddonly
-
- Deprecations
-
StringHelper.hasTextwas deprecated in favour ofStringHelper.isNotEmpty -
StringHelper.hasNoTextwas deprecated in favour ofStringHelper.isEmpty
-
v11.2.7 - 2026-07-17 (backport)
- Updated to BouncyCastle 1.85
- Updated to JAXB 4.0.9
v11.2.6 - 2025-06-10
- Updated to BouncyCastle 1.81
v11.2.5 - 2025-05-19
- Fixed a bug in
ConfigWithFallback.getAsCharArrayOrFallbackso that fallbacks were performed in the wrong scenario
v11.2.4 - 2025-05-14
- Increased maximum string length for IDs created by
GlobalIDFactory. See #45 - thx @andreasa-winenet - Added new class
StringIDFromUUIDFactoryusing random UUIDs as String IDs
v11.2.3 - 2025-05-13
- Added support for Java 24
- The default XML entity expansion limit for Java 24+ is now correctly identified as
2500 - All tests are now also running on Java 24
v11.2.2 - 2025-05-13
- Using the correct locale in
LoadedKey.getLoadErrorandLoadedKeyStore.getLoadError
v11.2.1 - 2025-04-11
- Added method
AbstractMemoryReadableResource.setPathto define a path different from the empty string - Added new enum
ECertificateCheckResultas an enumeration contain X.509 certification validation results - Added new method
CertificateHelper.checkCertificateto verify if an X.509 certificate is valid in several aspects - Added new class
TrustedCACheckerto check if a certificate is based on one of certain CAs - Added new methods to
CertificateHelperto easily access theCNand theOpart of a certificate principal
v11.2.0 - 2025-02-03
- Extended
ISAXReaderSettingsto include the possibility to provide a customSAXParserFactory - Extended the class
EmailAddressHelperwith a methodisValidForSimplePatternto test for email addresses that eventually contain Unicode characters - Added
HasInputStream.createoverload withbyte[]parameter - Added method
IExpirable.isExpiredIn - Added interface
IURLDownloaderto ph-commons - Added class
ExpiringObjectto ph-datetime - Added classes
TrustedCACertificates,CRLCache,CRLDownloader,CRLHelper,AbstractRevocationCheckBuilder,CertificateRevocationCheckerDefaults,ERevocationCheckMode,ERevoked,IRevokedIndicatorandRevocationCheckResultCacheto ph-security - Added method
KeyStoreHelper.getAllTrustedCertificates
v11.1.12 - 2025-01-21
- Updated to BouncyCastle 1.80
- Made sure, that the XML "Secure processing" flag is set anyway in
XMLFactory.createDefaultDocumentBuilderFactoryin case an external XML parser is in the classpath - Extracted the methods
XMLFactory.defaultCustomize(DocumentBuilder|SAXParser|Transformer)Factoryto allow external factories to be secured as well
v11.1.11 - 2024-12-05
- Removed
bcprov-ext-jdk18onfrom the parent pom, as seems to be included inbcprov-jdk18oninstead - Added support for configuration variable default values when used in the form
${property:default} - Added additional
IMicroNode.appendTextoverloads forboolean,intandlong - Deprecated
EXMLSerializeIndent.INDENT_ONLYas well as.getWithIndent()and.getWithoutAlign()
v11.1.10 - 2024-11-08
- Added new method
IConfigWithFallback.getAsCharArrayOrFallback - Added new interfaces
IKeyStoreDescriptor,IKeyStoreAndKeyDescriptorandITrustStoreDescriptorin ph-security - Added new classes
KeyStoreDescriptor,KeyStoreAndKeyDescriptorandTrustStoreDescriptorin ph-security - Added new method
KeyStoreHelper.iterateKeyStore
v11.1.9 - 2024-10-30
- Updated to BouncyCastle 1.79.0
- Added new annotation
ChangeNextMajorRelease - Deprecated
KeyStoreHelper.loadKeyStoreDirectmethods withStringpassword in favour of versions withchar[]password - Added
KeyStoreHelper.loadKeyStoremethods withchar[]as password type - Deprecated
KeyStoreHelper.loadKeyStoremethods withStringpassword in favour of versions withchar[]password - Added support for JDK 22 and JDK 23 in
EJavaVersion
v11.1.8 - 2024-09-10
- Made sure that
HttpHeaderMap.getUnifiedValueunified values combine all whitespaces into a single space
v11.1.7 - 2024-09-10
- Updated to BouncyCastle 1.78.1
- Added method
CertificateHelper.isCA - Added additional
Commons...Mapconstructor overloads - Added method
EqualsHelper.identityDifferent - Made sure that
HttpHeaderMap.getUnifiedValueunified values combine all\r,\nand\tinto a single space - The method
EnvVarHelper.getUnifiedSysEnvNamecan now also remove invalid characters on demand
v11.1.6 - 2024-04-09
- Updated to BouncyCastle 1.78. This fixes CVE-2024-29857, CVE-2024-30171, CVE-2024-30172 and CVE-2024-301XX. See PR #43 - thx @problemzebra2
v11.1.5 - 2024-03-27
- Added new interface
IHasSizeLong - Added new interface methods
IHasInputStream.withInputStreamDoandIHasInputStream.withBufferedInputStreamDo - Added new interface method
IHasByteArray.isPartialArray - Added build compatibility with Java 21
- Deprecated method
ICommonsList.getFirst()in favour ofICommonsList.getFirstOrNull()because of clash with JDK 21 API extension. See issue #42 - Deprecated method
ICommonsList.getLast()in favour ofICommonsList.getLastOrNull()because of clash with JDK 21 API extension. See issue #42 - Deprecated method
ICommonsList.removeFirst()in favour ofICommonsList.removeFirstOrNull()because of clash with JDK 21 API extension. See issue #42 - Deprecated method
ICommonsList.removeLast()in favour ofICommonsList.removeLastOrNull()because of clash with JDK 21 API extension. See issue #42
v11.1.4 - 2024-02-15
- Added support to detect Java 21. See PR #39 - thx @janwytze
- Added "LTS" flag on the
EJavaVersionenum entries - The default
ErrorTextProviderwas slightly changed to put the error field in brackets as well - Class
ErrorTextProvider.FormattableItemis no longerfinal - Added new interface method
IError.getAsStringLocaleIndepdent () - Added new interface
IConditionalLogger
v11.1.3 - 2023-11-15
- Updated to parent POM 2.0.5
- Updated to SLF4J 2.0.9
- Updated to BouncyCastle 1.77. See PR #38 - thx @problemzebra2
- Fixed spelling error in
EXMLParserProperty.JAXP_SCHEMA_SORUCE - Removed
finalfrom classVersion - Added new method
IJsonArray.addIfNotEmpty - Added new method
IJsonObject.addIfNotEmpty
v11.1.2 - 2023-08-16
- Added new keystore type
BKSto support the BouncyCastle internal keystore format
v11.1.1 - 2023-08-10
- Updated to BouncyCastle 1.76
- Extended
KeyStoreHelperAPIs to be able to provide custom securityProviderin it. - Renamed
CertificateHelper.getWithPEMHeadertogetCertificateWithPEMHeader - Added overload of
CertificateHelper.convertStringToCertficate
v11.1.0 - 2023-07-31
- Removed the explicit
SuppressFBWarningsclass in favour of an optional include ofspotbugs-annotations. See issue #36 - Changed the constructor parameter of
CollectingSAXErrorHandlerfromSupplier <ErrorList>toSupplier <? extends ErrorList> - Added new interface
IObjectPoolFactoryto extend the functionality of theObjectPoolclass
v11.0.6 - 2023-07-10
- Updated to BouncyCastle 1.75
- Extended ObjectPool API
- Improved DAO debug logging
v11.0.5 - 2023-06-18
- Updated resilience in
WALListenerto correct handle activities, even if the ExecutorService is already shutdown - Logging warnings when a configuration value contains a trailing whitespace character
- Fixed a potential stack overflow when handling too deeply nested JSON objects. See issue #35
- Added support to detect Java 20
v11.0.4 - 2023-04-29
- Extended the class
JAXBContextCacheKeyto support multiple packages as well - Deprecated a lot of methods from
JAXBContextCachein favour of theJAXBContextCacheKeyfactory method - Fixed an error in
Codepoint.isLowSurrogateandCodepoint.isHighSurrogate - Added support for writing Surrogate pairs in the XML writer
-
XMLFactory.createDefaultTransformerFactoryno longer emits warnings of unsupported features - Added classes
ConditionalLoggerandIHasConditionalLogger
v11.0.3 - 2023-04-16
- Updated to BouncyCastle 1.73
- Deprecated classes
AbstractJAXBBuilderandAbstractWritingJAXBBuilderfor removal - Classes
LoggingJAXBReadExceptionHandlerandLoggingJAXBWriteExceptionHandlerreceived a singleton accessor field - Extended
IKeyStoreTypeinterface with methodisKeyStorePathRequired - Added new enum entry
EKeyStoreType.PKCS11for support of PKCS11 - see PR #34 - thx @sopgreg - Deprecated classes
JAXBDocumentTypeandIJAXBDocumentType - The
GenericJAXBMarshallernow has an API to disable the usage of XML Schema that applies for reading, writing and validation - Added an optional progress callback to the
StreamHelper.copy(Byte|Char)Streambuilders
v11.0.2 - 2023-02-24
- Updated to parent POM 2.0.1
- Updated to JAXB 4.0.2
- Updated to JAX-WS 4.0.1
- Updated to SLF4J 2.0.6
- Added missing MicroType converter for the
XMLOffset(Date|Time)data types and others - Added additional
MathHelper.getDividedBigDecimaloverload - Added additional method
IJAXBWriter.getAsElement - Added additional
ArrayHelper.forEachoverload - Using BouncyCastle dependency
org.bouncycastle:bcjmail-jdk18onfor Jakarta usage - Fixed an
ArrayIndexOutOfBoundsExceptionwhen a single$character is contained in a configuration property with variable resolution enabled - see issue SMP #234 - Variable resolution in configuration files is now enabled by default
v11.0.1 - 2023-01-08
- Updated to BouncyCastle 1.72
- Improved the Java Version number parser to not throw exceptions on unsupported versions
- Added support to detect Java 18 and 19
- Added new class
PathToNodeBuilderto be used to customize the building of a path from a DOM node - see issue #31 - Catching
Throwablein classesConcurrentCollectorSingleandConcurrentCollectorMultipleto avoid unnoticed errors
v11.0.0 - 2022-09-11
- Requires Java 11 as the baseline
- Updated to BouncyCastle 1.71.1
- Updated to JAXB 4.0.0
- Updated to JAX-WS 4.0.0
- Updated to SLF4J 2.0.0
- Removed all classes and methods marked as deprecated
- By default all XML processing disables DTD processing and disallows all external entities
- Renamed
IConfigurationValueProviderWithPriorityCallbackmethodonConfigurationSourcetoonConfigurationValueProvider - Added additional overloads of
XMLOffset(Date|Time|DateTime).ofwithoutZoneOffset - Renamed
JAXBMarshallerHelper.(is|get|set)Sunto(is|get|set)Jakarta- this is an backwards incompatible change, even though that part should not be used externally anyway - Added new interface
IIterableConfigurationSourceto enumerate all available configuration items - The default
TransformerFactorycreated inXMLTransformerFactoryuses now the secure reading - Made silent mode in class
SystemPropertiescustomizable - Class
GenericJAXBMarshallernow works onValidationEventHandlerdirectly instead of the factory - Class
GenericJAXBMarhsallernow also implementsIJAXBValidator
v10.2.5 - 2023-06-18
- Fixed a potential stack overflow when handling too deeply nested JSON objects. See issue #35 (backport from 11.0.5)
- Added support to detect Java 20 (backport from 11.0.5)
- Updated to BouncyCastle 1.73 (backport from 11.0.3)
v10.2.4 - 2023-04-29
- Fixed an error in
Codepoint.isLowSurrogateandCodepoint.isHighSurrogate(backport from 11.0.4) - Added support for writing Surrogate pairs in the XML writer (backport from 11.0.4)
v10.2.3 - 2023-02-15
- Fixed an
ArrayIndexOutOfBoundsExceptionwhen a single$character is contained in a configuration property with variable resolution enabled - see issue SMP #234 (backport from 11.0.2)
v10.2.2 - 2022-11-17
- Added new class
PathToNodeBuilderto be used to customize the building of a path from a DOM node - see issue #31 (backport from 11.0.1)
v10.2.1 - 2022-10-18
- Updated to BouncyCastle 1.72 (backport from 11.0.1)
- Improved the Java Version number parser to not throw exceptions on unsupported versions (backport from 11.0.1)
- Added support to detect Java 18 (backport from 11.0.1)
v10.2.0 - 2022-08-24
- Updated to BouncyCastle 1.71
- Added
StringHelper.getNot(Null|Empty)overloads using aSupplier - Added new class
TextVariableHelperthat can be used to replace${bla}like variables - Added new class
ConfigWithFallbackthat can deal with resolving configuration items with different keys - Added support for variable resolution in class
Config. UsesetReplaceVariables(true)to enable this functionality
v10.1.8 - 2022-07-13
- Added
StringHelper.isEmptyandStringHelper.isNotEmptyfor more consistent naming - Fixed JAXB formatting which partially indented wrong
v10.1.7 - 2022-06-24
- Extended
IErrorwith an optional error date time - The algorithm name in
PasswordHashmay not exceed 100 characters - Added
CMimeType.APPLICATION_X509_USER_CERT - Extended
IJsonObjectAPI slightly - Added new methods
XMLHelper.iterateChildrenandXMLHelper.recursiveIterateChildren - Added new enum entries
EXMLParserFeature.ACCESS_EXTERNAL_* - Added new class
NaturalNumericOrderComparator - Added new class
RecursiveNodeIteratorand deprecated classRecursiveChildNodeIterator - Added a factory method to class
MicroRecursiveIterator
v10.1.6 - 2022-01-28
- Updated to BouncyCastle 1.70
- Changed
CommonsAssert.FLOAT_ALLOWED_ROUNDING_DIFFERENCEfrom 1e-5 to 1e-4 - Fixed a potential
ConcurrentModificationExceptioninAnnotationUsageCachein Java 11+ - see issue #27 - Allowed country codes to follow the scheme
[0-9A-Z]to support the country code for Kosovo used by the EC Publication Office (1A)
v10.1.5 - 2021-11-21
- Updated to JAXB 2.3.5
- Updated to JAXWS 2.3.5
- Added factory method
StringInputStream.utf8 - Added new method
WatchDir.runAsyncAndReturn - Ensuring unique resource ID in
ReadableResourceByteArray(see https://github.com/phax/ph-schematron/issues/118) - Added new methods
getAndIncandincAndGetto theMutable*classes -
IConfig.forEachConfigurationValueProvidernow iterates the priorities correctly when aMultiConfigurationValueProvideris used. - Added support for JDK 15, 16 and 17 in class
EJavaVersion
v10.1.4 - 2021-10-30
- Made
AbstractReadOnlyMapBasedMultilingualTextimplementSerializable - Added special
ReadableResourceStringfactory methods for UTF-8 - Class
PasswordSaltnow preferring factory methods over the constructors - The default password salt length was reduced from 512 to 32
-
GlobalIDFactorynow limits String based IDs to a maximum length of 20 for easy DB usage - Fixed an issue, that
XMLOffset(Date|Time|DateTime).parsedid not work without the timezone
v10.1.3 - 2021-09-19
- Made
XMLOffset(Date|Time|DateTime)implementSerializable(see issue #26) - Updated to BouncyCastle 1.69
- Honouring the default value in
CollectionHelper.findFirst - AnnotationUsageCache is no longer thread-safe for performance reasons, as the number of read operation is so much higher
- Added new
ArrayHelper.startsWithoverloads -
IHasByteArray.getAllBytesnow honours offset and size - Added new method
IHasByteArray.getBytesAsStringto convert it to a String - The time formatter for XSD no longer prints a mandatory fractional second (see https://github.com/phax/ph-ubl/issues/40)
v10.1.2 - 2021-05-13
- Added type converter for destination type
XMLOffsetDateTime - Avoid an
NoClassDefFoundErrorwhen using a different JAXB implementation - Fixed an error that
PDTToStringwith anOffsetDatewould try to use a time formatter -
PDTToStringnow handlesZoneOffsetandZoneIdbetter - Added
XMLHelper.getChildElementOfNamesas a sanity method - Favouring
XMLOffset*.toStringover thegetAsStringvariant for better interoperability
v10.1.1 - 2021-05-02
- Build with Java 1.8 instead of Java 11 because of binary incompatibility with
ByteBuffer.flip()signature
v10.1.0 - 2021-05-02
- Started the explicit Wiki
- Added
CHttpHeader.HOST - Extended
Copy*StreamBuilderwithlimit (Long) - Added
Predicates.andandPredicates.or - Create new classes
XMLOffsetDateandAdapterXMLOffsetDatesimilar toOffsetDatebut with an optional zone offset - Create new classes
XMLOffsetTimeandAdapterXMLOffsetTimesimilar toOffsetTimebut with an optional zone offset - Create new classes
XMLOffsetDateTimeandAdapterXMLOffsetDateTimesimilar toOffsetDateTimebut with an optional zone offset - Added method
Version.hasQualifier - Changed
Version.parseto use the new format by default. AddedVersion.parseDotOnlyfor the old version. - Added missing
PDTToString.getAsStringoverloads - Avoid the inclusion of JAXB and JAX-WS implementation artefacts. The JAXB implementation must now explicitly be added to an application pom.xml e.g. like this:
<dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> </dependency>
v10.0.0 - 2021-03-21
- Changed Maven groupId from
com.helgertocom.helger.commons - The submodule
ph-xmlno longer depends onph-collection - Separated the JAXB adapter classes and
JAXBHelperto new submoduleph-jaxb-adapter- the goal is to have less dependencies - Removed the submodule
ph-charset- who needs UTF-7 nowadays.... - Removed deprecated methods
- Removed
Serializablefrom base interfaces - Removed the serializable functional specializations (
IFunction,ISupplier,IConsumer,IPredicate,IBiConsumer,IBiFunction,IBiPredicate,NamespaceContext) -
GenericJAXBMarshallernow has a chaining API - Made
MimeTypeParserExceptiona checked Exception - Added
CertificateHelper.getEncodedCertificate() - Fixed potential NPE in
GenericJAXBMarshaller.toString() - Removed
TimeValuein favour ofDuration - Added
StopWatch.getLapDuration () - Removed
ResourceStreamSourceandResourceStreamResult- see https://saxonica.plan.io/issues/4833 for the reasons - Changed
JsonReader.Buildermethod names to not useset - The calling order of "useBufferedReader" and "dontCloseSource" compared to "source" in
JsonReader.Builderis not longer of importance - Changed the
SingleError.builder()to use method names withoutset - Added more
SingleErrorbuildererrorLocationoverloads - Removed the class
ScriptHelperas Nashorn gets removed in JDK 15 (see JEP 335) - Added new interfaces
IBuilderandIResettableBuilder - Extended
HTTPHeaderMapAPI - Fixed the data type of the custom HTTP headers in
WSClientConfig - Changed the default value
DEFAULT_QUOTE_IF_NECESSARYfromtruetofalse - Deprecated all the "multi map" classes in
ph-collection. With thecomputeIfAbsentfunctions, most of the simplifications can be achieved with runtime features. They will be removed in the next major version. - Extended
ILocalDatePeriodbased on issue #23 - Added classes
ILocalDateTimePeriodandLocalDateTimePeriod - Added class
PasswordHashCreatorPBKDF2_SHA256_1000_48for better PBKDF2 usage - Deprecated class
PasswordHashCreatorPBKDF2_1000_48because it uses the PBKDF2 with the SHA1 hash - Added new class
StringHelper.ImploderBuilderthat handles all theStringHelper.getImploded*stuff internally - Added new method
ICommonsIterable.forEachThrowing - Added new class
StreamHelper.CopyByteStreamBuilder - Added new class
StreamHelper.CopyCharStreamBuilder - Added new method
URLHelper.isValidURNto check RFC 2141 compliance - Deprecated some methods in
StreamHelperthat should be replaced with calls to the new builder - Added
CommonsHashSet.createFilteredfactory methods - Added new class
AdapterOffsetTime - Added support for
OffsetTimein PDT* classes - Made the JAXB adapters for
AdapterOffsetDateTimeandAdapterZonedDateTimemore resilient to read data without time zone offsets as well - Added class
OffsetDatefrom ThreeTen-Extra project for XML parsing - Added new methods in
PDTFactorythat deal with UTC time zones
v9.5.5 - 2021-03-18
- Updated to BouncyCastle 1.68 (again with bcprov-ext-jdk15on)
- Added new class
AdapterOffsetDateTime
v9.5.4 - 2020-12-15
- Updated to BouncyCastle 1.67 (no more bcprov-ext-jdk15on)
- Removed "double locking" in
AbstractCollector
v9.5.3 - 2020-10-22
- Reverting the changes from 9.5.2
- Made the JAXB DateTime adapter classes more resilient by trimming the input string
v9.5.2 - 2020-09-25
- Experimental release that uses
CommonsHashMapinstead ofCommonsWeakHashMapfor all registries havingClass<?>as the key
v9.5.1 - 2020-09-18
- Build with Java 1.8 instead of Java 11 because of binary incompatibility with
ByteBuffer.flip()signature
v9.5.0 - 2020-09-17
- Updated to JAXB 2.3.3 - https://eclipse-ee4j.github.io/jaxb-ri/
- Updated to JAXWS 2.3.3 - https://eclipse-ee4j.github.io/metro-jax-ws/
v9.4.8 - 2020-09-10
- Added new JAXB Adapter class
AdapterZonedDateTime - Added a new factory method in
ConfigFactory. - Default configuration source loading is now more consistent and behaves identical for all predefined filenames.
- Extended
IConfigAPI to easily reload all resource based configuration files - New interface
IAddableByTraitto be used as the constraint for the element type ofIGenericAdderTrait
v9.4.7 - 2020-08-28
- Extended
IPrivilegedActionAPI forSecurityprovider APIs - Extended
IJsonArrayAPI to iterate only child arrays, objects or values - Scope debugging no longer activates itself if the log level is set to debug
- Extended
PDTWebDateHelperto handleLocalTimevalues as well - Added predefined JAXB adapters in package
com.helger.jaxb.adapter
v9.4.6 - 2020-07-15
- Allow empty MIME type parameter values
-
MimeTypeParser.safeParseMimeTypedoes an RFC 2616 decoding if necessary - Updated to BouncyCastle 1.66
v9.4.5 - 2020-06-29
- Added missing methods in
IMapBasedDAO - Added static syntactic sugar methods in
HashCodeGenerator - The default
ConfigFactory.getDefaultInstance()now also considers system propertiesconfig.resource,config.resources,config.fileandconfig.urlor the environment variable alternativesCONFIG_RESOURCE,CONFIG_RESOURCES,CONFIG_FILEandCONFIG_URL. - Added possibility to
reloadfor resource-based configuration sources - Fixed a potential NPE in
IJsonObject.getValue (String) - Added
EqualsHelper.equalsCustomusing aBiPredicate - Extended
IConfigAPI to receive theIConfigurationSourceAND the value to determine the source of the configuration value (backwards incompatible change) - Changed the handling of the
Consumersin theConfigimplementation in a backward incompatible way (setters vs. constructor, new parameter type)
v9.4.4 - 2020-05-21
- Fixed a backwards compatibility issue with
JsonObject.add(String,IJson)
v9.4.3 - 2020-05-21
- Extended tests - thanks to @dliang2000
- Extended
NonBlockingCharArrayWriterwith non-throwingwriteoverloads - Changed
IJsonObjectAPI to favouraddJsoninstead ofaddbecause of different nullness - Deprecated
IHasSchema - Added
IConfigurationSourceResource.getAllConfigItems -
URLResource.getAsFile()is now nullable
v9.4.2 - 2020-04-25
- Reduced write locked section in
ScopeManager.onGlobalEndto reduce the possibility of a dead-lock - Made
ThreadGroupofBasicThreadFactorycustomizable - Updated to BouncyCastle 1.65
- The
IMissingLocaleHandleris now also called inLocaleHelper.getLocaleif the input strings are all empty - Improved the resolution rules for
LocaleCache,LanguageCacheandCountryCacheon edge cases. - Extracted overridable
GenericJAXBMarshaller.getJAXBContext - Added possibility to cache
JAXBContextobjects created via classes
v9.4.1 - 2020-03-30
- Added
SimpleLock.(read|write)LockedGet(Throwing) - The exception handling of
URLHelper.urlDecodeis now backwards compatible - Added
URLHelper.urlDecodeOrNullandurlDecodeOrDefault
v9.4.0 - 2020-03-27
- Added support for additional HTTP status codes (103, 308, 422, 425, 426, 428, 429, 431, 451, 506, 507, 508 and 511)
-
JAXBContextCachehas now a method to switch silent mode on or off - Added new constant
GlobalDebug.DEFAULT_SILENT_MODEfor the default silent mode setting - Added new method
CertificateHelper.convertByteArrayToCertficateOrNull - Added new class
PDTDisplayHelper - Added new method
CertificateHelper.convertStringToPrivateKey - Extended the
JsonWriterAPI to also write to an OutputStream - Added new methods
EmailAddress.createOnDemand -
URLHelper.urlEncodeandURLHelper.urlDecodenow usesURLCodec - Deprecated
ICommonsIterable.forEachin favour offindAll - Fixed a bug in the cloning of
MapBasedNamespaceContext(see issue #17) - Added
ArrayHelper.EMPTY_CLASS_ARRAY - Added new predefined licenses (GPL20CP, EPL20 and EDL10)
- Updated license URLs to https where applicable
- New parent POM 1.11.1 updates SLF4J to 1.7.30
-
PropertiesHelpergot new APIs withCharsetto read properties with character sets other than ISO-8859-1 - Started new subproject
ph-configwith a more intelligent configuration handling - Added JDK 14 as a known version
- Added silent mode to
TypeConverter,CountryCache,LanguageCache,ObjectPool,LocaleCache - Added new
JAXBDocumentTypeconstructor for more flexible use - Changed names of
SimpleReadWriteLock.(read|write)Lockedwith primitive suppliers - Changed names of
SimpleLock.lockedwith primitive suppliers - Added
SimpleReadWriteLock.(read|write)LockedGet(Throwing)suppliers
v9.3.9 - 2019-12-11
- Made
ClassLoaderHelper.getResourcemore robust - Updated "mime-type-info.xml" list with shared-mime-info-spec 1.15
- Moved code from
AbstractWALDAOdown toAbstractDAOfor later reuse. - Reworked
FileIntIDFactoryandFileLongIDFactoryto be more error resistant. - Added support for the "jrt:" protocol
- Added support for JDK 13
- Extended
LocaleCachewith an API to specify what happens if a Locale is not present
v9.3.8 - 2019-11-07
- Fixed method name in
RFC2616Codec-getMaximumEncodedLengthinstead ofgetEncodedLength; addedgetMaximumDecodedLength - Avoid double quoting in
HttpHeaderMap.getUnifiedValueif the value already seems to be quoted - Updated to BouncyCastle 1.64
- Added new interface
IBooleanConsumer - Added new method
CertificateHelper.isCertificateValidPerNow - Improved performance of
JsonParserwhen position tracking is disabled - Added possibility to read multiple JSON objects from a single source
- Added new classes
LoggingReaderandLoggingWriter - Added new classes
CountingReaderandCountingWriter -
JsonParser.parsenow returns an enum indicating EOI or not (incompatible change) - Improved performance of JsonParser by reusing buffers internally
- Added new class
MappedCachethat is a generalization ofCache. It adds a mapper to determine the cache key. - New parent POM 1.11.0 updates SLF4J to 1.7.29
v9.3.7 - 2019-09-25
- Extended
IJAXBValidatorAPI to have avalidatemethod that takes an outsideErrorList - Updated to BouncyCastle 1.63
- Converted some methods in
IMicroQNameto default methods - Extended
HttpHeaderMapAPI to makequote if necessarycustomizable
v9.3.6 - 2019-08-27
- Extended the
StreamHelperAPI with an even more flexiblecopyInputStreamToOutputStreammethod -
StreamHelper.getCopy[WithLimit]can now returnnullif copying fails - Added new classes around
com.helger.commons.codec.ICharArrayCodec - Added new class
RFC2616Codecto correctly encode and decode HTTP header values - Added new option in
HttpHeaderMap.getUnifiedValueto automatically quote the values if necessary - Added new overloads in
StackTraceHelperto use a custom line separator - Added new methods
CommonsAssert.assertNotEquals(boolean,boolean)
v9.3.5 - 2019-08-04
- Updated to BouncyCastle 1.62
- Added new
EURLProtocolentriesCIDandMIDfrom RFC 2392 - Minor speed ups in several places
- Added overload of
PDTXMLConverter.getXMLCalendarDatewith timezone offset in minutes - Added new
JsonReader.Buileroverloads -
LocaleHelper.getValidCountryCodenow convert ISO 3166 Alpha 3 codes to ALpha 2 codes where applicable - Made XML serialization settings on the XML declaration more fine grained
v9.3.4 - 2019-05-28
- Added new overloads for
JsonReader.Builder.setSource - Catching exception in
VerySecureRandominitialization -setSeedmay throw an Exception - Deprecated class
RandomHelper- causes more problems than it solves - Added new method
CertificateHelper.convertStringToCertficateOrNull - Added new method
CertificateHelper.convertByteArrayToCertficateDirect - Added complete list of HTTP response codes constants to
CHttp - Added new method
Base64OutputStream.setNewLineBytes - Removed methods
Base64.(encode|decode)Objectfor security reasons - Added new option
Base64.DO_NEWLINE_CRLFto use\r\nas newline separator instead of\n
v9.3.3 - 2019-05-06
- Added
ICommonsIterablemethodsfindFirstIndexandfindLastIndex - Added support for Java 12
- The default XML persistence for configuration files was changed. No more "class" attribute and no nested "value" element needed. The old layout can still be read, but only the new layout is written.
- The class
JsonReadernow has an explicitJsonReader.Builderclass to simplify the usage - New class
SettingsPersistenceJsonto be able to read and write settings in JSON format
v9.3.2 - 2019-03-28
- Logging a warning in
VerySecureRandomif initial seeding takes more than 500 milliseconds - If the system property
ph.disable-securerandomwith the value oftrueis present, the usage ofSecureRandomin classRandomHelperis disabled by default. Respective logging was added. - The system property
ph.securerandom-reseed-intervalwith a numeric value ≥ 0 can be used to set the default "re-seed interval" for classVerySecureRandom -
VerySecureRandomusesNativePRNGNonBlockingas the initialSecureRandomfor faster Linux initialization.
v9.3.1 - 2019-03-06
- Made
IJsonWriterSettingsserializable - Updated to BouncyCastle 1.61
-
nullvalues in settings can be serialized now -
HttpHeaderMapmethodsforEachSingleHeaderandforEachHeaderLinenow use the unified values
v9.3.0 - 2019-02-07
- Restored the
Automatic-Module-Nameofcom.helger.scopes - Moved method
exceptionCallbacksto base classAbstractJAXBBuilder - Exception handler in
GenericJAXBMarshallernow based on ´CallbackList` - incompatible change - Fixed the conversion from
StringtoInteger,LongandShortso thatnullis returned on error (therefore throwing aTypeConverterException) -
IGetter*TraitgetAs...methods now returnnullon error instead of throwing aTypeConverterException
v9.2.1 - 2019-01-23
- Improved API of
JsonParseException - Added additional default
MicroTypeConverterregistrations (File,Path,URLandURI) - Added special implementation of
IHasInputStreamforNonBlockingByteArrayOutputStream - Added enum entry
EXMLSerializeXMLDeclaration.EMIT_NO_NEWLINE - Extended internal API of
AbstractMapBasedWALDAOto allow for not invoking the callbacks - Added method
ConfigFileBuilder.addPathFromEnvVarto get the configuration file path from an environment variable - Added new keystore type
BCFKS- see issue #13 - Added new constructor for
MapEntryto takeMap.Entry - Added new default methods to classes
IHasDimension*(isLandscape, isPortrait and isQuadratic) -
MimeTypeContentis now serializable - The OSGI export for submodule
ph-scopeswas corrected - see issue #14 - Added static factory methods for
ByteArrayWrapper
v9.2.0 - 2018-11-21
- Undo deprecations of
ValueEnforcershort and float methods. - Simplified the
IMultilingualTextinterface and implementations (backwards incompatible) - Removed all deprecated, unused methods
-
ICommonsIterableis no longer Serializable. OnlyICommonsCollectionis serializable. -
IHasDisplayTextis no longer Serializable. -
IDisplayTextProvideris no longer Serializable. -
IHasTextis no longer Serializable. - Changed return type of
SystemProperties.setPropertyValue()toEChange -
JAXBDocumentTypetakesList<ClassPathResource>instead ofList<String>to avoid ClassLoader issues - Changed
PBCProviderinitialization to log a warning instead of throwing an exception - Added
StringHelpermethodsgetQuotedandappendQuoted - Improved Java 10/Java 11 support
- Moved
CloneHelper.getClonedJAXBElementto new classJAXBHelperinph-jaxbsubproject (Java 11 issue) - Moved class
WSTestHelperto subprojectph-wsclient(Java 11 issue) - First version to compile with OracleJDK 11 and OpenJDK 11
- Added methods in
PDTFactoryto remove microseconds and nanoseconds from(Zoned|Offset|Local)DateTime - Added support for silent mode in
AbstractDAO - Changed
DOMReader.readXMLDOMto not throw an Exception. Provide a suitableErrorHandlerinstead. -
WrappedCollectingSAXErrorHandleris now derived fromCollectingSAXErrorHandler
v9.1.8 - 2018-10-24
- Added special support for properties
java.runtime.versionandjava.runtime.namein classSystemProperties - Class
JavaVersionHelpernow supports AdoptOpenJDK versions -
HttpHeaderMapstores the value case sensitive internally and compares case sensitive instead (issue #11) - Added
PDTConfig.getUTCTimeZone () - Fixed a conversion error from
GregorianCalendartoXMLGregorianCalendarif only the date part is used (issue #12) - Added TimeZone related methods in
PDTFactory - Added method
IHasInputStream.getBufferedInputStream(),IHasInputStreamAndReader.getBufferedReader()andIHasReader.getBufferedReader() - Added method
IHasOutputStream.getBufferedOutputStream(),IHasOutputStreamAndWriter.getBufferedWriter()andIHasWriter.getBufferedWriter() - Opened
JsonReaderAPI to add the possibility to pass in anIJsonParserCustomizeCallbackinstance - Added
IMultilingualText.texts () - Fixed some SpotBugs errors
- Added
IJAXBWriter.getAsInputStream(...) - Added new marker interface
IExplicitlyCloneable
v9.1.7 - 2018-10-11
- Added new class
IdentityByteArrayCodec - Added new classes
MacInputStreamandMacOutputStream - Deprecated some JSON APIs with
byte,shortandfloat - Overloaded
WrappedOutputStream.write (byte[],int,int)for quicker pass-through. Please ensure that all derived classes also overload this method. -
JSONValuehandling forlongvalues in theintrange was changed to storeintinternally. This improves testability independent of the value range. - Added new
StringHelper.contains(Any|No|Only)methods forCharSequenceandStringobjects
v9.1.6 - 2018-10-01
- Added
CHttpHeader.X_CONTENT_SECURITY_POLICY_REPORT_ONLY - Added
ValueEnforcer.isNE0methods - Deprecated
ValueEnforcermethods forshortandfloat - Reworked the
VerySecureRandominitialization to use a native PRNG for initial seeding - Improved customizability of
AbstractWALDAOin case WAL recovery failed - Extended
IHas...DateTimeAPIs - Fixed OSGI SPI configuration for ph-bc
v9.1.5 - 2018-09-09
- Extended
WSClientConfigAPI - Extended
GenericJAXBMarshallerAPI - Class
IJAXBReadernow tries to set systemID forIReadableResource,FileandPathparameters. - Extended
PDTFactoryslightly - Fixed potential NPE when an
AbstractWALDAOis used without a backing file -
DefaultTransformURIResolvergot the possibility to provide a default base URI if none is present in the call - Improved internal API of
AbstractMapBasedWALDAO - Updated stax-ex to 1.8
v9.1.4 - 2018-08-06
- Added class
XMLBracketModeDeterminatorXMLC14 - Added XML write setting
write CDATA as Text - Added XML write setting
order attributes and namespaces lexicographically - XML entities are now emitted as Hexadecimal values instead of numeric (
&#D;instead of ) - Fixed error in
HttpHeaderMap.addAllHeaders(was not doing what was expected)
v9.1.3 - 2018-07-19
- Updated to BouncyCastle 1.60
- Extended
LogHelperto have overloads withSupplier<String> - Added new
Commons...Mapconstructors with parametersMap, Function, Function - Added new class
LanguageCache - Added new
CommonsArrayListstatic factory methods - Deprecated all the
ChangeLogclasses - they will be moved to ph-less-commons in v9.2 - Added new interface
IHasByteArray - Implementing
IHasByteArrayinReadableResourceByteArray,ByteArrayInputStreamProvider,MessageDigestValue - Added new class
ByteArrayWrapper - Added new method
NonBlockingByteArrayOutputStream.getBufferOrCopy()that copies only on demand - Added new
ArrayHelper.startsWithoverloads - Added static factory methods in
CommonsCopyOnWriteArrayList - The internal logger name was changed from
s_aLoggertoLOGGER - Extended
IPrivilegedActionwith new static methods - Added new class
Predicateswith basic typed predicates for primitive types - Added some static
IBooleanPredicatefactory methods - Added
ToStringGenerator.appendPasswordIfmethod - Added equals implementation to
PasswordAuthentication
v9.1.2 - 2018-06-19
- Made setters of
WSClientConfigfinal - Changed method name in
CharsetHelperfromgetCharsetFromNameOrNulltogetCharsetFromNameOrDefault - Added new sub-project
ph-bcwith some common BouncyCastle helper methods - Added OCSP MIME type constants
- Extended
XMLTransformerFactoryAPI to support creating secure instances - Improved code quality based on SonarQube analysis
- Removed the Generic type from
IConcurrentCollector - Added
PropertiesHelper.expandProperties - Removed empty class
AbstractTreeItemFactory
v9.1.1 - 2018-05-14
- Really fixed OSGI ServiceProvider configuration
v9.1.0 - 2018-05-08
- Fixed invalid call in
ValueEnforcer.isEqual -
AbstractJAXBBuildergot an explicit possibility to disable XML schema usage - Improved Java version identification by adding support for JEP 223 identifiers
- Kicked Travis Java 9 integration - was unable to find a Maven configuration working locally, in Eclipse and in Travis :(
- Added
IMicroNode.appendChildrendefault methods - Extracted
ph-wsclientproject for later use with Java 9 - Added
ICommonsCollection.setAllMapped - Added class
CommonsMock- a very simple mocking engine - Added
EMimeContentType.FONT - Extended
TreeXMLConverterAPI to be able to reuse existing trees for filling - Fixed OSGI ServiceProvider configuration
v9.0.2 - 2018-03-22
- Made setter methods of
JAXB*Builderfinal so that they can be called from derived constructors - Improved Java 9 compliance
-
EJavaVersionwas changed incompatible to allow support for Java 10 and 11 - Added
ELockType.DEPENDSenum constant - Added some more
MathHelper.toBig(Decimal|Integer)overloads so that it can be used without thinking - Different forbidden characters in filenames depending on OS - https://github.com/phax/as2-server/issues/20
- Updated to parent POM 1.10.2
v9.0.1 - 2018-02-01
- Minor API adoptions
- Updated to BouncyCastle 1.59
- XML validation now works with custom locales as well
- Added
XPathHelper.createXPathFactorySaxonFirst - Fixed typo in
XPathHelper-createNewXPathExpressioninstead ofcreateNewXPathExpresion - Updated to parent POM 1.10.0
v9.0.0 - 2017-11-05
- Changed
com.helger.commons.functionpackage tocom.helger.commons.functional - Replaced
IFilterwithIPredicate - Replaced
IFilterWithParameterwithIBiPredicate - Changed
ManagedExecutorServicetoExecutorServiceHelper - Removed class
CCharset- useStandardCharsetsinstead - Added classes
PathHelperandPathOperations - Moved class
XMLResourceBundleto ph-xml - Removed some deprecated
CharsetManagermethods - Reworked
formatpackage - Removed deprecated 'Mutable*' constructors because of weird defaults
- Removed deprecated methods that handle: greater than, greater or equals, lower than and lower or equals
- Made
MicroTypeConvertertype-safe - Ensure all
Predicateusages use? super - Ensure all
Consumerusages use? super - Ensure all
Functionusages use? super/? extendswhere applicable - Ensure all
Supplierusages use? extends - Moved
ThreadHelperto packagecom.helger.commons.concurrent - Removed deprecated methods in
SimpleLSResourceResolver - Removed package
com.helger.commons.io.monitor - Removed package
com.helger.commons.scope.singletons -
@ReturnsMutableObjectdoes not require a value anymore (but you can still pass one of course) - Extracted
ph-scopesproject to lower size ofph-commonsslightly - Extracted
ph-collectionproject to lower size ofph-commonsslightly - Removed default methods from
IAggregator - Added reverse interface
ISplitter - Changed caching API to use a function instead of a protected methods
- Integrated
ph-clihere - Improved and extended traits API
- JAXB components can now use a safe way to write XML with special chars
- JAXB components can now read XML documents with a BOM
- Extracted ph-oton DAO handling into new subproject
ph-dao - Replaced
SMapwithStringMap - An
Automatic-Module-Namewas added after beta 1 - Removed support for the application and session application scopes
v8.6.6 - 2017-07-12
- Extended
CSVWriterAPI -
SimpleLSResourceResolvercan now handle fat jars from Spring Boot (issue #8) - Extracted
DefaultResourceResolverfromSimpleLSResourceResolverand added in ph-commons - Added rudimentary support for
Pathbased APIs - Added
WatchServicebasedWatchDirin favor ofFileMonitor
v8.6.5 - 2017-05-19
- Deprecated all default Mutable* constructors, because the default values were partially confusing
- Added new class
DefaultEntityResolverusing a base URL for resolving. - Extracted and renamed classes
PDTZoneIDandPDTMask - Extended
ILocalDatePeriodAPI - Added additional specialized type converters to
BigDecimal - Unified naming for methods that handle: greater than, greater or equals, lower than and lower or equals
- Added new type converters for
Month,DayOfWeekandMonthDay -
RuntimeExceptions during type conversion are encapsulated inTypeConverterExceptions.
v8.6.4 - 2017-04-12
- Some performance improvements
- Fixed error in
StringHelper.replaceMultipleAsString - Extended
StringHelperwith encode/decode methods - Added new class
NonBlockingCharArrayWriter - Deprecated some
CharsetManagermethods
v8.6.3 - 2017-03-28
- Deprecated some String-based
FileHelperAPIs - Improved CertificateHelper parsing
- Added
IPredicate- a serializablePredicateinterface - Added
IBiPredicate- a serializableBiPredicateinterface - Added
IBiConsumer- a serializableBiConsumerinterface - Added
IBiFunction- a serializableBiFunctioninterface - Added
IComparable- a serializable and extendedComparableinterface - Extended
StringHelperAPI - Extended
MicroWriterAPI - Extended
XMLWriterAPI - Extended
PDTHelperAPI - Deprecated
EMonthandEDayOfWeekin favour of JDKMonthandDayOfWeek
v8.6.2 - 2017-02-15
- Extended
XMLSystemPropertiesAPI - Allowing
JAXBDocumentTypeobjects to not have an@XmlSchemaannotation - Deprecated
CCharset- useStandardCharsetsinstead - Deprecated ToStringGenerator
toString()- usegetToString()instead
v8.6.1 - 2017-01-23
-
*MultilingualTextis now based on ICommonsOrderedMap - Extended
GlobalDebugAPI slightly -
JAXBDocumentTypeimplements equals/hashCode -
WSClientConfignot using chunked encoding by default
v8.6.0 - 2017-01-09
- Removed deprecated methods
- Minor API extensions
v8.5.6 - 2016-12-10
- Extended APIs
- Fixed a nasty bug with date/time formatting due to pattern modifications (introduced in 8.5.5)
v8.5.5 - 2016-11-25
- Extended APIs
v8.5.4 - 2016-11-08
- Fixed a nasty NPE
v8.5.3 - 2016-11-08
- Added support for
EntityResolver2in MicroXML parsing - Extended some APIs
v8.5.2 - 2016-09-25
- Fixed an error with JAXB context creation if @XMLRootElement was used
- Improved consistency of IHasText(WithArgs) and IHasDisplayText(WithArgs) so that they can be used interchangeably
- Extended collection API slightly
v8.5.1 - 2016-09-12
- Fixed error text retrieval in Single Error; further API extensions and improvements
v8.5.0 - 2016-09-09
- Reworked the error objects so that there is now a single error handling object. The old objects are retained for backwards compatibility.
v8.4.0 - 2016-08-21
- Started adding JDK 9 compatibility
- Added new interface
IWriteToStream - Added support for new Message digest and Mac algorithms
- Added new functional interfaces (IThrowingSupplier, IThrowingConsumer and IThrowingFunction) with customizable Exception type
- Deprecated some legacy interfaces and adapters that may lead to a compiler error (!)
v8.3.0 - 2016-08-02
- Moved the following sub-projects into this project: ph-datetime, ph-json, ph-charset, ph-graph, ph-matrix and ph-settings
v8.2.2 - 2016-07-22
v8.2.1 - 2016-07-15
v8.2.0 - 2016-07-10
- Added new sub-project
ph-securitythat contains MessageDigest, HMac, Keystore etc. stuff
v8.1.0 - 2016-06-26
- Minor small API optimizations for JAXB.
-
ValueEnforcersupports Supplier` functional interface. - GZIP based readable and writable resources added.
v8.0.0 - 2016-06-08
- It splits the old big ph-commons library into slightly smaller pieces:
ph-commons,ph-xml,ph-jaxb,ph-treeandph-less-commons. - The first version that requires JDK 8
- Multiple API changes to better support functional style
- Base32 codec added