[2.x] Delete TrapExitSecurityException (#8503)

This commit is contained in:
kenji yoshida 2026-01-13 09:11:35 +09:00 committed by GitHub
parent f31290b809
commit 56c86a1684
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 23 deletions

View File

@ -485,6 +485,7 @@ lazy val runProj = (project in file("run"))
contrabandSettings,
mimaSettings,
mimaBinaryIssueFilters ++= Seq(
exclude[MissingClassProblem]("sbt.TrapExitSecurityException"),
)
)
.configure(addSbtIO, addSbtCompilerClasspath)

View File

@ -1,23 +0,0 @@
/*
* sbt
* Copyright 2023, Scala center
* Copyright 2011 - 2022, Lightbend, Inc.
* Copyright 2008 - 2010, Mark Harrah
* Licensed under Apache License 2.0 (see LICENSE)
*/
package sbt
/**
* A custom SecurityException that tries not to be caught. Closely based on a similar class in
* Nailgun. The main goal of this exception is that once thrown, it propagates all of the way up the
* call stack, terminating the thread's execution.
*/
private final class TrapExitSecurityException(val exitCode: Int) extends SecurityException {
override def printStackTrace = throw this
override def toString = throw this
override def getCause = throw this
override def getMessage = throw this
override def fillInStackTrace = throw this
override def getLocalizedMessage = throw this
}