Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin Dahyabhai2020-05-25 17:29:50 +0000
committerNitin Dahyabhai2020-05-25 17:34:17 +0000
commitfebd386e2ce106cc7320d9620156f2979fd1f202 (patch)
tree5745c462e66a31a2d2801c7da756627589ce57e0
parent22dff961da9f3c96fb6c59e3f9a9b0153727d9fa (diff)
downloadwebtools.sourceediting-febd386e2ce106cc7320d9620156f2979fd1f202.tar.gz
webtools.sourceediting-febd386e2ce106cc7320d9620156f2979fd1f202.tar.xz
webtools.sourceediting-febd386e2ce106cc7320d9620156f2979fd1f202.zip
[563383] NPE launching XSL transform on Java 9 and above
Signed-off-by: Nitin Dahyabhai <thatnitind@gmail.com>
-rw-r--r--xsl/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/JAXPJavaLaunchConfigurationDelegate.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/xsl/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/JAXPJavaLaunchConfigurationDelegate.java b/xsl/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/JAXPJavaLaunchConfigurationDelegate.java
index 05575d9dab..d4a08c562e 100644
--- a/xsl/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/JAXPJavaLaunchConfigurationDelegate.java
+++ b/xsl/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/JAXPJavaLaunchConfigurationDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2019 Chase Technology Ltd - http://www.chasetechnology.co.uk
+ * Copyright (c) 2007, 2020 Chase Technology Ltd., and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -8,7 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
+ * Doug Satchwell (Chase Technology Ltd., http://www.chasetechnology.co.uk)
+ * - initial API and implementation
*******************************************************************************/
package org.eclipse.wst.xsl.jaxp.launching.internal;
@@ -352,10 +353,14 @@ public class JAXPJavaLaunchConfigurationDelegate extends JavaLaunchDelegate
String[] processorJars = new String[0];
if (!vmSupportsEndorsedDirs(configuration)) {
File endorsedDir = getEndorsedDir();
- IPath endorsedPath = getEndorsedPath();
- processorJars = endorsedDir.list();
- for (int i = 0; i < processorJars.length; i++) {
- processorJars[i] = endorsedPath.addTrailingSeparator().append(processorJars[i]).toString();
+ if (endorsedDir.exists()) {
+ IPath endorsedPath = getEndorsedPath();
+ processorJars = endorsedDir.list();
+ if (processorJars != null) {
+ for (int i = 0; i < processorJars.length; i++) {
+ processorJars[i] = endorsedPath.addTrailingSeparator().append(processorJars[i]).toString();
+ }
+ }
}
}

Back to the top