Changeset 7716


Ignore:
Timestamp:
May 22, 2019, 8:35:16 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2139: Switch to Java 11 (or later)

Removed the SessionControl.finalize() method without a replacement since it is impossible to reach the finalize() method while still being logged in. The reason is that the Application instance keeps a cache with all existing SessionControl instances and they are either automatically closed and removed by a timer or a shutdown hook.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/SessionControl.java

    r7703 r7716  
    26662666  }
    26672667 
    2668   protected void cleanUp()
    2669   {
    2670     if (!isClosed() && isLoggedIn()) logout();
    2671   }
    2672  
    2673   /**
    2674     Clean up if a bad client application forgets to logout.
    2675   */
    2676   @SuppressWarnings("deprecation")
    2677   @Override
    2678   protected void finalize()
    2679     throws Throwable
    2680   {
    2681     try
    2682     {
    2683       cleanUp();
    2684     }
    2685     catch (Throwable t)
    2686     {
    2687       log.warn("Exception during SessionControl.finalize()", t);
    2688     }
    2689     super.finalize();
    2690   }
    2691  
    26922668  /**
    26932669    Internal class to hold information about the logged in user.
Note: See TracChangeset for help on using the changeset viewer.