Changeset 7515


Ignore:
Timestamp:
Nov 2, 2018, 9:31:25 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2129: Preparations for Java 11 support

Get rid of the error related to Thread.stop() by replacing it with Thread.interrupt().

The remaining warnings that are related to Object.finalize() and ClassLoader.getPackage() seems a bit more complex to get rid of, so this will have to wait until later.

File:
1 edited

Legend:

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

    r7352 r7515  
    190190  */
    191191  @Override
    192   @SuppressWarnings("deprecation")
    193192  public void handleSignal(Signal signal)
    194193  {
     
    201200      if (forceStop)
    202201      {
    203         workerThread.stop(new InterruptedException("Received signal: ABORT"));
     202        logger.error("Thread.stop() is no longer supported. Calling Thread.interrupt() instead.");
    204203      }
    205       else
    206       {
    207         workerThread.interrupt();
    208       }
     204      workerThread.interrupt();
    209205    }
    210206    else
     
    236232    @param forceStop TRUE to stop the thread by force, FALSE to signal to
    237233      it with a flag
    238   */
     234    @deprecated In 3.14. Calling this is ignored and the signal handler will always use the interrupt method.
     235  */
     236  @Deprecated
    239237  public void setForceStop(boolean forceStop)
    240238  {
Note: See TracChangeset for help on using the changeset viewer.