changeset 964:11a4f68806bc

8054898: Avoid creation of empty type info files Reviewed-by: attila, sundar, jlaskey
author hannesw
date Tue, 12 Aug 2014 13:23:47 +0200
parents 7ab42c461a8c
children e84cfe70c504
files src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Tue Aug 12 13:22:05 2014 +0200
+++ b/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Tue Aug 12 13:23:47 2014 +0200
@@ -107,7 +107,7 @@
      */
     @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;