The method List<JdbcMapping> getJdbcMappings() , defined primarily on JdbcMappingContainer but also re-defined in many places of a complex inheritance trees via various default methods on intrfaces, has been shown to often be a performance problem as the return of a List inherently represents a mutable contract, hence some implementations provide defensive copies. The defensive copy approach however is being applied inconsistently, so not fullfilling on the safety expectations on one side, and often allocating quite a bit of data as this method is being often used in hot loops. Additionally, the concept of iterating or retrieving a JdbcMapping can now be better fullfilled by using the other methods which we expose on the same interfaces; so to avoid such mistakes altogether it’s best to actually remove this method, which comes with the added benefit of removing quite some code and the related complexity, since such implementations are spread in many subclasses. |