Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove references to legacy Java 9 classes" #4479

Merged
merged 1 commit into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion jcl/src/java.base/share/classes/com/ibm/oti/vm/MsgHelp.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package com.ibm.oti.vm;

/*******************************************************************************
* Copyright (c) 2003, 2019 IBM Corp. and others
* Copyright (c) 2003, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -29,7 +29,11 @@
import java.io.InputStream;

/*[IF Sidecar19-SE]
/*[IF Sidecar19-SE-OpenJ9]
import java.lang.Module;
/*[ELSE]
import java.lang.reflect.Module;
/*[ENDIF]
import jdk.internal.reflect.CallerSensitive;
/*[ELSE]*/
import sun.reflect.CallerSensitive;
Expand Down
10 changes: 9 additions & 1 deletion jcl/src/java.base/share/classes/java/lang/Access.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*[INCLUDE-IF Sidecar17]*/
/*******************************************************************************
* Copyright (c) 2007, 2019 IBM Corp. and others
* Copyright (c) 2007, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -43,13 +43,17 @@
import sun.reflect.annotation.AnnotationType;

/*[IF Sidecar19-SE]
/*[IF Sidecar19-SE-OpenJ9]
import java.lang.Module;
import java.util.Iterator;
import java.util.List;
/*[IF Java11]*/
import java.nio.charset.Charset;
import java.nio.charset.CharacterCodingException;
/*[ENDIF]*/
/*[ELSE]
import java.lang.reflect.Module;
/*[ENDIF]*/
/*[IF Java12]*/
import jdk.internal.access.JavaLangAccess;
/*[ELSE]
Expand Down Expand Up @@ -217,7 +221,11 @@ public Class<?> findBootstrapClassOrNull(ClassLoader classLoader, String name) {
}

public
/*[IF Sidecar19-SE-OpenJ9]
java.lang.ModuleLayer
/*[ELSE]*/
java.lang.reflect.Layer
/*[ENDIF]*/
getBootLayer() {
return System.bootLayer;
}
Expand Down
8 changes: 6 additions & 2 deletions jcl/src/java.base/share/classes/java/lang/StackWalker.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*[INCLUDE-IF Sidecar19-SE]*/
/*******************************************************************************
* Copyright (c) 2016, 2019 IBM Corp. and others
* Copyright (c) 2016, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -27,8 +27,12 @@
/*[ENDIF]*/
import java.lang.module.ModuleDescriptor;
import java.lang.module.ModuleDescriptor.Version;
/*[IF Sidecar19-SE-OpenJ9]
import java.lang.IllegalCallerException;
import java.lang.Module;
/*[ELSE]
import java.lang.reflect.Module;
/*[ENDIF]*/
import java.security.Permission;
import java.util.Collections;
import java.util.HashSet;
Expand Down Expand Up @@ -181,7 +185,7 @@ public Class<?> getCallerClass() {
s -> s.limit(2).collect(Collectors.toList()));
if (result.size() < 2) {
/*[MSG "K0640", "getCallerClass() called from method with no caller"]*/
/*[IF Sidecar19-SE]
/*[IF Sidecar19-SE-OpenJ9]
throw new IllegalCallerException(com.ibm.oti.util.Msg.getString("K0640")); //$NON-NLS-1$
/*[ELSE]*/
throw new IllegalStateException(com.ibm.oti.util.Msg.getString("K0640")); //$NON-NLS-1$
Expand Down
12 changes: 10 additions & 2 deletions jcl/src/java.base/share/classes/java/lang/System.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package java.lang;

/*******************************************************************************
* Copyright (c) 1998, 2019 IBM Corp. and others
* Copyright (c) 1998, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -39,7 +39,11 @@
/*[ENDIF]*/
import jdk.internal.misc.VM;
import java.lang.StackWalker.Option;
/*[IF Sidecar19-SE-OpenJ9]
import java.lang.Module;
/*[ELSE]
import java.lang.reflect.Module;
/*[ENDIF]*/
import jdk.internal.reflect.Reflection;
import jdk.internal.reflect.CallerSensitive;
import java.util.*;
Expand Down Expand Up @@ -102,7 +106,11 @@ public final class System {
private static String osEncoding;

/*[IF Sidecar19-SE]*/
/*[IF Sidecar19-SE-OpenJ9]
static java.lang.ModuleLayer bootLayer;
/*[ELSE]*/
static java.lang.reflect.Layer bootLayer;
/*[ENDIF]*/
/*[ENDIF]*/

// Initialize all the slots in System on first use.
Expand Down Expand Up @@ -181,7 +189,7 @@ static void afterClinitInitialization() {
/*[ELSE]*/
StringCoding.encode(new char[1], 0, 1);
/*[ENDIF]*/
/*[IF Sidecar19-SE]*/
/*[IF Sidecar18-SE-OpenJ9|Sidecar19-SE]*/
setErr(new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.err)), true));
setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.out)), true));
/*[IF Sidecar19-SE_RAWPLUSJ9]*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*[INCLUDE-IF Sidecar17]*/
/*******************************************************************************
* Copyright (c) 2005, 2019 IBM Corp. and others
* Copyright (c) 2005, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -24,8 +24,13 @@

import java.lang.management.PlatformLoggingMXBean;
/*[IF Sidecar19-SE]*/
/*[IF Sidecar19-SE-OpenJ9]*/
import java.lang.Module;
import java.lang.ModuleLayer;
/*[ELSE]
import java.lang.reflect.Module;
import java.lang.reflect.Layer;
/*[ENDIF]*/
/*[ENDIF]*/
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*[INCLUDE-IF Sidecar19-SE]*/
/*******************************************************************************
* Copyright (c) 2016, 2019 IBM Corp. and others
* Copyright (c) 2016, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -22,7 +22,11 @@
*******************************************************************************/
package java.lang.management;

/*[IF Sidecar19-SE-OpenJ9]*/
import java.lang.ModuleLayer;
/*[ELSE]
import java.lang.reflect.Layer;
/*[ENDIF]*/

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*[INCLUDE-IF Sidecar19-SE]*/
/*******************************************************************************
* Copyright (c) 2016, 2019 IBM Corp. and others
* Copyright (c) 2016, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -22,7 +22,11 @@
*******************************************************************************/
package com.ibm.lang.management.internal;

/*[IF Sidecar19-SE-OpenJ9]*/
import java.lang.ModuleLayer;
/*[ELSE]
import java.lang.reflect.Layer;
/*[ENDIF]*/
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*[INCLUDE-IF Sidecar17]*/
/*******************************************************************************
* Copyright (c) 2018, 2019 IBM Corp. and others
* Copyright (c) 2018, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -25,8 +25,13 @@
package openj9.lang.management.internal;

/*[IF Sidecar19-SE]*/
/*[IF Sidecar19-SE-OpenJ9]*/
import java.lang.Module;
import java.lang.ModuleLayer;
/*[ELSE]
import java.lang.reflect.Module;
import java.lang.reflect.Layer;
/*[ENDIF]*/
/*[ENDIF]*/
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Expand Down