Bug 559097 - Compile warnings in I20200113-0130
Change-Id: I444a5363753a03b047987a52c1f551a5f7b0bf5e
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
index 0b2683b..9773cfe 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -293,6 +293,7 @@
* @param environmentId execution environment the resolution is for, or <code>null</code>
* @return classpath entries
*/
+ @SuppressWarnings("unlikely-arg-type")
private static IClasspathEntry[] computeClasspathEntries(IVMInstall vm, IJavaProject project, String environmentId) {
LibraryLocation[] libs = vm.getLibraryLocations();
boolean overrideJavaDoc = false;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
index b87859e..b808639 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -156,7 +156,8 @@
@Override
public Object findSourceElement(String name) throws CoreException {
try {
- if (getArchive() == null) {
+ ZipFile zip = getArchive();
+ if (zip == null) {
return null;
}
@@ -172,7 +173,7 @@
}
ZipEntry entry = getArchive().getEntry(entryPath.toString());
if (entry != null) {
- return new ZipEntryStorage(getArchive(), entry);
+ return new ZipEntryStorage(zip, entry);
}
int index = typeName.lastIndexOf('$');
if (index > lastSlash) {