< prev index next >

src/java.desktop/share/classes/java/beans/ThreadGroupContext.java

Print this page
*** 52,11 ***
       * as determined by its {@code ThreadGroup}.
       *
       * @return  the application-dependent context
       */
      static ThreadGroupContext getContext() {
!         return contexts.get(Thread.currentThread().getThreadGroup());
      }
  
      private volatile boolean isDesignTime;
      private volatile Boolean isGuiAvailable;
  
--- 52,13 ---
       * as determined by its {@code ThreadGroup}.
       *
       * @return  the application-dependent context
       */
      static ThreadGroupContext getContext() {
!         @SuppressWarnings("deprecation")
+         ThreadGroup group = Thread.currentThread().getThreadGroup();
+         return contexts.get(group);
      }
  
      private volatile boolean isDesignTime;
      private volatile Boolean isGuiAvailable;
  
< prev index next >