< prev index next >

test/jdk/com/sun/jndi/dns/CheckAccess.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2009, 2016, 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. --- 1,7 ---- /* ! * Copyright (c) 2009, 2020, 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.
*** 36,46 **** * Check that the 'debug' class member is no longer publicly accessible. */ public class CheckAccess { public static final void main(String[] args) throws Exception { try { ! Class clazz = Class.forName("com.sun.jndi.dns.DnsContext"); Field field = clazz.getField("debug"); if (Modifier.isPublic(field.getModifiers())) { throw new Exception( "class member 'debug' must not be publicly accessible"); } --- 36,46 ---- * Check that the 'debug' class member is no longer publicly accessible. */ public class CheckAccess { public static final void main(String[] args) throws Exception { try { ! Class<?> clazz = Class.forName("com.sun.jndi.dns.DnsContext"); Field field = clazz.getField("debug"); if (Modifier.isPublic(field.getModifiers())) { throw new Exception( "class member 'debug' must not be publicly accessible"); }
< prev index next >