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

Handle string conversion errors in attach API #2803

Merged
merged 1 commit into from
Sep 13, 2018

Conversation

pdbain-ibm
Copy link
Contributor

If the name of the temporary directory cannot be converted to UTF-16, use the
Java system property.

Fixes #2781

Signed-off-by: Peter Bain peter_bain@ca.ibm.com

If the name of the temporary directory cannot be converted to UTF-16, use the
Java system property.

Fixes eclipse-openj9#2781

Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
@pdbain-ibm
Copy link
Contributor Author

@pshipton would you kindly review?

@@ -261,7 +262,8 @@ static private native int createFileWithPermissionsImpl(String path,
static String getTmpDir() {
String tmpDir = getTempDirImpl();
if (null == tmpDir) {
tmpDir = com.ibm.oti.vm.VM.getVMLangAccess().internalGetProperties().getProperty("java.io.tmpdir"); //$NON-NLS-1$
IPC.logMessage("Could not get system temporary directory. Trying "+JAVA_IO_TMPDIR); //$NON-NLS-1$
tmpDir = com.ibm.oti.vm.VM.getVMLangAccess().internalGetProperties().getProperty(JAVA_IO_TMPDIR); //$NON-NLS-1$

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this default to /tmp if not set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The system property is set by getPlatformPropertyList() to the value of the TMPDIR environment variable (sans character set conversion, which is the present problem). If that does not resolve to a valid path, then it defaults to "/tmp".

@pshipton
Copy link
Member

jenkins test sanity plinux jdk8

@pshipton pshipton added the bug label Sep 13, 2018
@pshipton pshipton merged commit 349d42c into eclipse-openj9:master Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants