From c59adf68d9ac49b41fb778041e3949a8057e8d7f Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Mon, 18 Nov 2024 18:22:18 +0000 Subject: [PATCH] 8344330: Remove AccessController.doPrivileged() from jdk.charsets module Reviewed-by: lancea, bpb, rriggs, jlu --- .../share/classes/sun/nio/cs/ext/SJIS_0213.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/jdk.charsets/share/classes/sun/nio/cs/ext/SJIS_0213.java b/src/jdk.charsets/share/classes/sun/nio/cs/ext/SJIS_0213.java index 1ac70f2d2e3..5853d01bdfc 100644 --- a/src/jdk.charsets/share/classes/sun/nio/cs/ext/SJIS_0213.java +++ b/src/jdk.charsets/share/classes/sun/nio/cs/ext/SJIS_0213.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,10 +31,6 @@ import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; import java.nio.charset.CharsetDecoder; import java.nio.charset.CoderResult; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Arrays; -import sun.nio.cs.CharsetMapping; import sun.nio.cs.*; /* @@ -77,13 +73,8 @@ public class SJIS_0213 extends Charset { } private static class Holder { - @SuppressWarnings("removal") - static final CharsetMapping mapping = AccessController.doPrivileged( - new PrivilegedAction() { - public CharsetMapping run() { - return CharsetMapping.get(SJIS_0213.class.getResourceAsStream("sjis0213.dat")); - } - }); + static final CharsetMapping mapping = + CharsetMapping.get(SJIS_0213.class.getResourceAsStream("sjis0213.dat")); } protected static class Decoder extends CharsetDecoder {