8054898: Avoid creation of empty type info files

Reviewed-by: attila, sundar, jlaskey
This commit is contained in:
Hannes Wallnöfer 2014-08-12 13:23:47 +02:00
parent f71b48d575
commit 20607aa6c3

View File

@ -107,7 +107,7 @@ public final class OptimisticTypesPersistence {
*/
@SuppressWarnings("resource")
public static void store(final Object locationDescriptor, final Map<Integer, Type> optimisticTypes) {
if(locationDescriptor == null) {
if(locationDescriptor == null || optimisticTypes.isEmpty()) {
return;
}
final File file = ((LocationDescriptor)locationDescriptor).file;