File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,12 @@ static void endOperation(Operation operation) {
6666 * If a security manager is installed and the calling code does not have permission {@code
6767 * "org.firebirdsql.jaybird.initOperationAware"}
6868 */
69+ @ SuppressWarnings ("removal" )
6970 public static void initOperationAware (OperationAware operationAware ) {
70- PERMISSION_INIT_OPERATION_AWARE .checkGuard (OperationMonitor .class );
71+ var sm = System .getSecurityManager ();
72+ if (sm != null ) {
73+ sm .checkPermission (PERMISSION_INIT_OPERATION_AWARE );
74+ }
7175 instance .set (operationAware != null
7276 ? operationAware
7377 : NoOpOperationAware .INSTANCE );
Original file line number Diff line number Diff line change @@ -1274,11 +1274,14 @@ public void resetKnownClientInfoProperties() {
12741274 }
12751275
12761276 @ Override
1277- @ SuppressWarnings ("java:S1141" )
1277+ @ SuppressWarnings ({ "java:S1141" , "removal" } )
12781278 public void abort (Executor executor ) throws SQLException {
12791279 // NOTE: None of these operations are performed under lock (except maybe very late in the cleanup)
12801280 if (isClosed ()) return ;
1281- PERMISSION_CALL_ABORT .checkGuard (this );
1281+ var sm = System .getSecurityManager ();
1282+ if (sm != null ) {
1283+ sm .checkPermission (PERMISSION_CALL_ABORT );
1284+ }
12821285 if (executor == null ) {
12831286 throw FbExceptionBuilder .toException (jb_invalidExecutor );
12841287 }
@@ -1320,9 +1323,13 @@ public void abort(Executor executor) throws SQLException {
13201323 });
13211324 }
13221325
1326+ @ SuppressWarnings ("removal" )
13231327 @ Override
13241328 public void setNetworkTimeout (Executor executor , int milliseconds ) throws SQLException {
1325- PERMISSION_SET_NETWORK_TIMEOUT .checkGuard (this );
1329+ var sm = System .getSecurityManager ();
1330+ if (sm != null ) {
1331+ sm .checkPermission (PERMISSION_SET_NETWORK_TIMEOUT );
1332+ }
13261333 if (executor == null ) {
13271334 throw FbExceptionBuilder .toException (jb_invalidExecutor );
13281335 }
You can’t perform that action at this time.
0 commit comments