changeset 53421:dc8f28491dfb

8220166: Performance regression in deserialization (4-6% in SPECjbb) Reviewed-by: shade, dholmes, alanb
author rriggs
date Fri, 17 May 2019 10:48:02 -0400
parents fffa9aacc730
children de0f0578207a
files src/java.base/share/classes/java/io/ObjectInputFilter.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/io/ObjectInputFilter.java	Fri May 17 11:44:44 2019 +0200
+++ b/src/java.base/share/classes/java/io/ObjectInputFilter.java	Fri May 17 10:48:02 2019 -0400
@@ -283,7 +283,7 @@
         /**
          * Current configured filter.
          */
-        private static ObjectInputFilter serialFilter = configuredFilter;
+        private static volatile ObjectInputFilter serialFilter = configuredFilter;
 
         /**
          * Returns the process-wide serialization filter or {@code null} if not configured.
@@ -291,9 +291,7 @@
          * @return the process-wide serialization filter or {@code null} if not configured
          */
         public static ObjectInputFilter getSerialFilter() {
-            synchronized (serialFilterLock) {
-                return serialFilter;
-            }
+            return serialFilter;
         }
 
         /**