Skip to content

Commit

Permalink
Merge pull request #7279 from JasonFengJ9/mvpkgs
Browse files Browse the repository at this point in the history
Re-organize com.ibm.tools.attach.target classes
  • Loading branch information
pshipton authored Sep 30, 2019
2 parents 3ca357e + 82dae2b commit 9892039
Show file tree
Hide file tree
Showing 51 changed files with 208 additions and 209 deletions.
4 changes: 2 additions & 2 deletions jcl/src/java.base/share/classes/module-info.java.extra
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ exports com.ibm.jit.crypto to ibm.crypto.hdwrcca;
exports com.ibm.sharedclasses.spi to openj9.sharedclasses, java.management, java.rmi;
exports com.ibm.oti.vm to java.management, jdk.attach, jdk.management, openj9.jvm, openj9.sharedclasses;
exports com.ibm.oti.util to java.management, jdk.attach, jdk.jcmd, jdk.management, openj9.sharedclasses;
exports com.ibm.tools.attach.target to jdk.attach, jdk.jcmd, jdk.management;
exports openj9.internal.tools.attach.target to jdk.attach, jdk.jcmd, jdk.management;
exports openj9.management.internal to java.management, openj9.jvm;
exports openj9.tools.attach.diagnostics.base to jdk.attach, jdk.jcmd;
exports openj9.internal.tools.attach.diagnostics.base to jdk.attach, jdk.jcmd;
exports jdk.internal.org.objectweb.asm to openj9.dtfj, openj9.dtfjview;
// Following allows dtfj/dtfjview modules invoke module addReads & addExports programmatically via reflection APIs
exports jdk.internal.module to openj9.dtfj, openj9.dtfjview;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

package openj9.tools.attach.diagnostics.base;
package openj9.internal.tools.attach.diagnostics.base;

import java.io.IOException;
import java.io.PrintWriter;
Expand All @@ -30,7 +30,7 @@
import java.security.PrivilegedAction;
import java.util.Comparator;
import java.util.Properties;
import com.ibm.tools.attach.target.IPC;
import openj9.internal.tools.attach.target.IPC;

/**
* Augments Properties with convenience methods to add ints, booleans, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

package openj9.tools.attach.diagnostics.base;
package openj9.internal.tools.attach.diagnostics.base;

import java.io.PrintWriter;
import java.io.StringWriter;
Expand All @@ -32,7 +32,7 @@
import java.util.function.Predicate;

import com.ibm.oti.vm.VM;
import com.ibm.tools.attach.target.IPC;
import openj9.internal.tools.attach.target.IPC;

import openj9.management.internal.InvalidDumpOptionExceptionBase;
import openj9.management.internal.LockInfoBase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*[INCLUDE-IF Sidecar16]*/
package com.ibm.tools.attach.target;
/*[INCLUDE-IF Sidecar18-SE]*/
package openj9.internal.tools.attach.target;
/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
*
Expand Down Expand Up @@ -27,8 +27,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import static com.ibm.tools.attach.target.IPC.loggingStatus;
import static com.ibm.tools.attach.target.IPC.LOGGING_DISABLED;
import static openj9.internal.tools.attach.target.IPC.loggingStatus;
import static openj9.internal.tools.attach.target.IPC.LOGGING_DISABLED;

public final class Advertisement {
private static final String KEY_ATTACH_NOTIFICATION_SYNC = "attachNotificationSync"; //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*[INCLUDE-IF Sidecar16]*/
/*[INCLUDE-IF Sidecar18-SE]*/
/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
*
Expand All @@ -21,11 +21,11 @@
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

package com.ibm.tools.attach.target;
package openj9.internal.tools.attach.target;

import static com.ibm.tools.attach.target.IPC.LOGGING_DISABLED;
import static com.ibm.tools.attach.target.IPC.LOGGING_ENABLED;
import static com.ibm.tools.attach.target.IPC.loggingStatus;
import static openj9.internal.tools.attach.target.IPC.LOGGING_DISABLED;
import static openj9.internal.tools.attach.target.IPC.LOGGING_ENABLED;
import static openj9.internal.tools.attach.target.IPC.loggingStatus;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*[INCLUDE-IF Sidecar16]*/
/*[INCLUDE-IF Sidecar18-SE]*/
/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
*
Expand All @@ -20,7 +20,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/
package com.ibm.tools.attach.target;
package openj9.internal.tools.attach.target;

import java.io.ByteArrayInputStream;
import java.io.Closeable;
Expand All @@ -37,14 +37,14 @@
import java.util.Properties;

import java.util.ServiceLoader;
import openj9.tools.attach.diagnostics.base.DiagnosticProperties;
import openj9.tools.attach.diagnostics.base.DiagnosticUtils;
import openj9.internal.tools.attach.diagnostics.base.DiagnosticProperties;
import openj9.internal.tools.attach.diagnostics.base.DiagnosticUtils;
/*[IF Sidecar19-SE]*/
import jdk.internal.vm.VMSupport;
/*[ELSE] Sidecar19-SE
import sun.misc.VMSupport;
/*[ENDIF] Sidecar19-SE */
import static com.ibm.tools.attach.target.IPC.LOCAL_CONNECTOR_ADDRESS;
import static openj9.internal.tools.attach.target.IPC.LOCAL_CONNECTOR_ADDRESS;

/**
* This class handles established connections initiated by another VM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*[INCLUDE-IF Sidecar16]*/
/*[INCLUDE-IF Sidecar18-SE]*/
/*******************************************************************************
* Copyright (c) 2009, 2009 IBM Corp. and others
*
Expand All @@ -21,7 +21,7 @@
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

package com.ibm.tools.attach.target;
package openj9.internal.tools.attach.target;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*[INCLUDE-IF Sidecar16]*/
package com.ibm.tools.attach.target;
/*[INCLUDE-IF Sidecar18-SE]*/
package openj9.internal.tools.attach.target;

/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*[INCLUDE-IF Sidecar16]*/
package com.ibm.tools.attach.target;
/*[INCLUDE-IF Sidecar18-SE]*/
package openj9.internal.tools.attach.target;
/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
*
Expand All @@ -22,8 +22,8 @@
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

import static com.ibm.tools.attach.target.IPC.LOGGING_DISABLED;
import static com.ibm.tools.attach.target.IPC.loggingStatus;
import static openj9.internal.tools.attach.target.IPC.LOGGING_DISABLED;
import static openj9.internal.tools.attach.target.IPC.loggingStatus;

import java.io.File;
import java.io.FileFilter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*[INCLUDE-IF Sidecar16]*/
/*[INCLUDE-IF Sidecar18-SE]*/
/*******************************************************************************
* Copyright (c) 2010, 2018 IBM Corp. and others
*
Expand All @@ -21,15 +21,15 @@
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

package com.ibm.tools.attach.target;
package openj9.internal.tools.attach.target;

import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
import java.util.TimerTask;
import static com.ibm.tools.attach.target.IPC.LOGGING_DISABLED;
import static com.ibm.tools.attach.target.IPC.loggingStatus;
import static openj9.internal.tools.attach.target.IPC.LOGGING_DISABLED;
import static openj9.internal.tools.attach.target.IPC.loggingStatus;

public final class FileLock {
long fileDescriptor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*[INCLUDE-IF Sidecar16]*/
package com.ibm.tools.attach.target;
/*[INCLUDE-IF Sidecar18-SE]*/
package openj9.internal.tools.attach.target;

/*******************************************************************************
* Copyright (c) 2009, 2010 IBM Corp. and others
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*[INCLUDE-IF Sidecar16]*/
/*[INCLUDE-IF Sidecar18-SE]*/
/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
*
Expand All @@ -21,7 +21,7 @@
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

package com.ibm.tools.attach.target;
package openj9.internal.tools.attach.target;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand All @@ -46,7 +46,7 @@
import static java.nio.file.attribute.PosixFilePermission.GROUP_WRITE;
import static java.nio.file.attribute.PosixFilePermission.OTHERS_READ;
import static java.nio.file.attribute.PosixFilePermission.OTHERS_WRITE;
import static openj9.tools.attach.diagnostics.base.DiagnosticProperties.OPENJ9_DIAGNOSTICS_PREFIX;
import static openj9.internal.tools.attach.diagnostics.base.DiagnosticProperties.OPENJ9_DIAGNOSTICS_PREFIX;

/**
* Utility class for operating system calls
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*[INCLUDE-IF Sidecar18-SE]*/
package com.ibm.tools.attach.target;
package openj9.internal.tools.attach.target;

import java.io.IOException;
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*[INCLUDE-IF Sidecar16]*/
package com.ibm.tools.attach.target;
/*[INCLUDE-IF Sidecar18-SE]*/
package openj9.internal.tools.attach.target;
/*******************************************************************************
* Copyright (c) 2009, 2018 IBM Corp. and others
* Copyright (c) 2009, 2019 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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*[INCLUDE-IF Sidecar16]*/
package com.ibm.tools.attach.target;
/*[INCLUDE-IF Sidecar18-SE]*/
package openj9.internal.tools.attach.target;
/*******************************************************************************
* Copyright (c) 2009, 2015 IBM Corp. and others
* Copyright (c) 2009, 2019 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*[INCLUDE-IF Sidecar16]*/
package com.ibm.tools.attach.target;
/*[INCLUDE-IF Sidecar18-SE]*/
package openj9.internal.tools.attach.target;
/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
*
Expand All @@ -24,8 +24,8 @@

import java.io.File;
import java.io.IOException;
import static com.ibm.tools.attach.target.IPC.LOGGING_DISABLED;
import static com.ibm.tools.attach.target.IPC.loggingStatus;
import static openj9.internal.tools.attach.target.IPC.LOGGING_DISABLED;
import static openj9.internal.tools.attach.target.IPC.loggingStatus;

/**
* This class represents the advertisement directory representing a potential attach API target VM.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*[INCLUDE-IF Sidecar16]*/
package com.ibm.tools.attach.target;
/*[INCLUDE-IF Sidecar18-SE]*/
package openj9.internal.tools.attach.target;
/*******************************************************************************
* Copyright (c) 2017, 2019 IBM Corp. and others
*
Expand All @@ -23,8 +23,8 @@
*******************************************************************************/

import java.io.IOException;
import static com.ibm.tools.attach.target.IPC.loggingStatus;
import static com.ibm.tools.attach.target.IPC.LOGGING_DISABLED;
import static openj9.internal.tools.attach.target.IPC.loggingStatus;
import static openj9.internal.tools.attach.target.IPC.LOGGING_DISABLED;

final class WaitLoop extends Thread {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*[INCLUDE-IF Sidecar16]*/
/*[INCLUDE-IF Sidecar18-SE]*/
/*******************************************************************************
* Copyright (c) 2009, 2010 IBM Corp. and others
*
Expand Down Expand Up @@ -144,4 +144,4 @@
*<tr><td>com.ibm.tools.attach.timeout</td><td>Specify the timeout in milliseconds for communication between attacher and attachment. Set to 0 for no timeout.</td></tr>
*</table>
*/
package com.ibm.tools.attach.target;
package openj9.internal.tools.attach.target;
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
import java.util.ArrayList;
import java.util.List;

import com.ibm.tools.attach.target.Advertisement;
import com.ibm.tools.attach.target.AttachHandler;
import com.ibm.tools.attach.target.CommonDirectory;
import com.ibm.tools.attach.target.IPC;
import com.ibm.tools.attach.target.TargetDirectory;
import openj9.internal.tools.attach.target.Advertisement;
import openj9.internal.tools.attach.target.AttachHandler;
import openj9.internal.tools.attach.target.CommonDirectory;
import openj9.internal.tools.attach.target.IPC;
import openj9.internal.tools.attach.target.TargetDirectory;
import com.sun.tools.attach.AttachNotSupportedException;
import com.sun.tools.attach.AttachPermission;
import com.sun.tools.attach.VirtualMachineDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.ibm.tools.attach.target.AttachHandler;
import com.ibm.tools.attach.target.AttachmentConnection;
import com.ibm.tools.attach.target.Command;
import com.ibm.tools.attach.target.CommonDirectory;
import com.ibm.tools.attach.target.FileLock;
import com.ibm.tools.attach.target.IPC;
import com.ibm.tools.attach.target.Reply;
import com.ibm.tools.attach.target.Response;
import com.ibm.tools.attach.target.TargetDirectory;
import openj9.internal.tools.attach.diagnostics.base.DiagnosticProperties;
import openj9.internal.tools.attach.diagnostics.base.DiagnosticUtils;
import openj9.internal.tools.attach.target.AttachHandler;
import openj9.internal.tools.attach.target.AttachmentConnection;
import openj9.internal.tools.attach.target.Command;
import openj9.internal.tools.attach.target.CommonDirectory;
import openj9.internal.tools.attach.target.FileLock;
import openj9.internal.tools.attach.target.IPC;
import openj9.internal.tools.attach.target.Reply;
import openj9.internal.tools.attach.target.Response;
import openj9.internal.tools.attach.target.TargetDirectory;
import com.sun.tools.attach.AgentInitializationException;
import com.sun.tools.attach.AgentLoadException;
import com.sun.tools.attach.AttachNotSupportedException;
Expand All @@ -59,9 +61,6 @@
import com.sun.tools.attach.VirtualMachineDescriptor;
import com.sun.tools.attach.spi.AttachProvider;

import openj9.tools.attach.diagnostics.base.DiagnosticProperties;
import openj9.tools.attach.diagnostics.base.DiagnosticUtils;

/**
* Handles the initiator end of an attachment to a target VM
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import com.ibm.tools.attach.target.Advertisement;
import com.ibm.tools.attach.target.IPC;
import com.ibm.tools.attach.target.TargetDirectory;
import openj9.internal.tools.attach.target.Advertisement;
import openj9.internal.tools.attach.target.IPC;
import openj9.internal.tools.attach.target.TargetDirectory;
import com.sun.tools.attach.VirtualMachineDescriptor;
import com.sun.tools.attach.spi.AttachProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

import com.ibm.tools.attach.attacher.OpenJ9AttachProvider;
import com.ibm.tools.attach.attacher.OpenJ9VirtualMachine;
import com.ibm.tools.attach.target.IPC;
import com.sun.tools.attach.AttachNotSupportedException;

import openj9.tools.attach.diagnostics.base.DiagnosticProperties;
import openj9.internal.tools.attach.diagnostics.base.DiagnosticProperties;
import openj9.internal.tools.attach.target.IPC;
import com.sun.tools.attach.AttachNotSupportedException;

/**
* This class allows a Attach API attacher to query a target JVM about
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import com.sun.tools.attach.VirtualMachineDescriptor;
import com.sun.tools.attach.spi.AttachProvider;

import openj9.internal.tools.attach.diagnostics.base.DiagnosticUtils;
import openj9.tools.attach.diagnostics.attacher.AttacherDiagnosticsProvider;
import openj9.tools.attach.diagnostics.base.DiagnosticUtils;

/**
* Jcmd A tool for running diagnostic commands on another Java process
Expand Down
Loading

0 comments on commit 9892039

Please sign in to comment.