From 20607aa6c3bb8d5374ebfe1d7c5be30c1ff8e042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?= Date: Tue, 12 Aug 2014 13:23:47 +0200 Subject: [PATCH] 8054898: Avoid creation of empty type info files Reviewed-by: attila, sundar, jlaskey --- .../nashorn/internal/codegen/OptimisticTypesPersistence.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java b/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java index 50452193b83..0e57c813e86 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java @@ -107,7 +107,7 @@ public final class OptimisticTypesPersistence { */ @SuppressWarnings("resource") public static void store(final Object locationDescriptor, final Map optimisticTypes) { - if(locationDescriptor == null) { + if(locationDescriptor == null || optimisticTypes.isEmpty()) { return; } final File file = ((LocationDescriptor)locationDescriptor).file;