< prev index next >

src/java.desktop/share/classes/sun/awt/image/JPEGImageDecoder.java

Print this page
rev 55657 : 8227587: Add internal privileged System.loadLibrary
Reviewed-by: rriggs

*** 1,7 **** /* ! * Copyright (c) 1995, 2018, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1995, 2019, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 51,67 **** private static native void initIDs(Class<?> InputStreamClass); private ColorModel colormodel; static { ! java.security.AccessController.doPrivileged( ! new java.security.PrivilegedAction<Void>() { ! public Void run() { ! System.loadLibrary("javajpeg"); ! return null; ! } ! }); initIDs(InputStreamClass); RGBcolormodel = new DirectColorModel(24, 0xff0000, 0xff00, 0xff); ARGBcolormodel = ColorModel.getRGBdefault(); byte[] g = new byte[256]; for (int i = 0; i < 256; i++) { --- 51,61 ---- private static native void initIDs(Class<?> InputStreamClass); private ColorModel colormodel; static { ! jdk.internal.access.SharedSecrets.getJavaLangAccess().loadLibrary("javajpeg"); initIDs(InputStreamClass); RGBcolormodel = new DirectColorModel(24, 0xff0000, 0xff00, 0xff); ARGBcolormodel = ColorModel.getRGBdefault(); byte[] g = new byte[256]; for (int i = 0; i < 256; i++) {
< prev index next >