Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin Dahyabhai2020-05-25 18:18:19 +0000
committerGerrit Code Review @ Eclipse.org2020-05-25 18:18:19 +0000
commit5f2f11f3c65c6f09a93fc32d69d3e7bd5f69683e (patch)
treebc90a114a9f297d804e977b8c3af860adf87925a
parentcb1f7b2af1765c79c127a37a4b3bc82738054110 (diff)
parentfebd386e2ce106cc7320d9620156f2979fd1f202 (diff)
downloadwebtools.sourceediting-5f2f11f3c65c6f09a93fc32d69d3e7bd5f69683e.tar.gz
webtools.sourceediting-5f2f11f3c65c6f09a93fc32d69d3e7bd5f69683e.tar.xz
webtools.sourceediting-5f2f11f3c65c6f09a93fc32d69d3e7bd5f69683e.zip
Merge "[563383] NPE launching XSL transform on Java 9 and above"R3_18
-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