src/share/classes/java/lang/ref/Reference.java

Print this page

        

@@ -138,11 +138,11 @@
                         pending = r.discovered;
                         r.discovered = null;
                     } else {
                         try {
                             lock.wait();
-                        } catch (InterruptedException x) { }
+                        } catch (InterruptedException | OutOfMemoryError x) { }
                         continue;
                     }
                 }
 
                 // Fast path for cleaners