25 /*
26 * Licensed Materials - Property of IBM
27 * RMI-IIOP v1.0
28 * Copyright IBM Corp. 1998 1999 All Rights Reserved
29 *
30 */
31
32 package org.omg.CORBA_2_3.portable;
33
34 import java.io.SerializablePermission;
35 import java.security.AccessController;
36 import java.security.PrivilegedAction;
37
38 /**
39 * InputStream provides for the reading of all of the mapped IDL types
40 * from the stream. It extends org.omg.CORBA.portable.InputStream. This
41 * class defines new methods that were added for CORBA 2.3.
42 *
43 * @see org.omg.CORBA.portable.InputStream
44 * @author OMG
45 * @since JDK1.2
46 */
47
48 public abstract class InputStream extends org.omg.CORBA.portable.InputStream {
49
50
51 private static final String ALLOW_SUBCLASS_PROP = "jdk.corba.allowInputStreamSubclass";
52
53 private static final boolean allowSubclass = AccessController.doPrivileged(
54 new PrivilegedAction<Boolean>() {
55 @Override
56 public Boolean run() {
57 String prop = System.getProperty(ALLOW_SUBCLASS_PROP);
58 return prop == null ? false :
59 (prop.equalsIgnoreCase("false") ? false : true);
60 }
61 });
62
63 private static Void checkPermission() {
64 SecurityManager sm = System.getSecurityManager();
65 if (sm != null) {
|
25 /*
26 * Licensed Materials - Property of IBM
27 * RMI-IIOP v1.0
28 * Copyright IBM Corp. 1998 1999 All Rights Reserved
29 *
30 */
31
32 package org.omg.CORBA_2_3.portable;
33
34 import java.io.SerializablePermission;
35 import java.security.AccessController;
36 import java.security.PrivilegedAction;
37
38 /**
39 * InputStream provides for the reading of all of the mapped IDL types
40 * from the stream. It extends org.omg.CORBA.portable.InputStream. This
41 * class defines new methods that were added for CORBA 2.3.
42 *
43 * @see org.omg.CORBA.portable.InputStream
44 * @author OMG
45 * @since 1.2
46 */
47
48 public abstract class InputStream extends org.omg.CORBA.portable.InputStream {
49
50
51 private static final String ALLOW_SUBCLASS_PROP = "jdk.corba.allowInputStreamSubclass";
52
53 private static final boolean allowSubclass = AccessController.doPrivileged(
54 new PrivilegedAction<Boolean>() {
55 @Override
56 public Boolean run() {
57 String prop = System.getProperty(ALLOW_SUBCLASS_PROP);
58 return prop == null ? false :
59 (prop.equalsIgnoreCase("false") ? false : true);
60 }
61 });
62
63 private static Void checkPermission() {
64 SecurityManager sm = System.getSecurityManager();
65 if (sm != null) {
|