The signature of the Loader.load(EntityInfo...) and ObjectInitializer.initializeObjects(EntityInfo[] entityInfos, LinkedHashMap<EntityInfoLoadKey, Object> idToObjectMap, ObjectInitializationContext objectInitializationContext) methods in the package org.hibernate.search.query.hibernate.impl should be changed from accepting an array of EntityInfos to accepting a list. In all cases where this methods are called we first create a temporary list of EntityInfos and then convert this list to an array just to call this methods. Changing the signature would allow us to avoid creation of temporary arrays. |