src/java.xml/share/classes/com/sun/xml/internal/stream/util/ThreadLocalBufferAllocator.java
--- a/src/java.xml/share/classes/com/sun/xml/internal/stream/util/ThreadLocalBufferAllocator.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/xml/internal/stream/util/ThreadLocalBufferAllocator.java Wed Oct 18 13:25:49 2017 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -39,12 +39,12 @@
* @author Santiago.PericasGeertsen@sun.com
*/
public class ThreadLocalBufferAllocator {
- private static ThreadLocal<SoftReference> tlba = new ThreadLocal<>();
+ private static ThreadLocal<SoftReference<BufferAllocator>> tlba = new ThreadLocal<>();
public static BufferAllocator getBufferAllocator() {
SoftReference<BufferAllocator> bAllocatorRef = tlba.get();
if (bAllocatorRef == null || bAllocatorRef.get() == null) {
- bAllocatorRef = new SoftReference(new BufferAllocator());
+ bAllocatorRef = new SoftReference<>(new BufferAllocator());
tlba.set(bAllocatorRef);
}