Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Arthanareeswaran2016-10-13 08:58:18 +0000
committerJay Arthanareeswaran2016-10-13 08:58:18 +0000
commita4212f660b3eb77ae0a548ba05f5445b9b81d72c (patch)
treea04e9ac9ca05fed7a930b0aa9d5acab20c1dd5cc
parent0e4cab40015212ab472472f3f7c677eee2f50b76 (diff)
downloadeclipse.jdt.core-a4212f660b3eb77ae0a548ba05f5445b9b81d72c.tar.gz
eclipse.jdt.core-a4212f660b3eb77ae0a548ba05f5445b9b81d72c.tar.xz
eclipse.jdt.core-a4212f660b3eb77ae0a548ba05f5445b9b81d72c.zip
Bug 504473 - Fix build warnings in I20161005-1430
Also suppress the warning about the resource not closed.
-rw-r--r--org.eclipse.jdt.core.tests.model/build.properties2
-rw-r--r--org.eclipse.jdt.core.tests.model/pom.xml2
-rw-r--r--org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java1
-rw-r--r--org.eclipse.jdt.core/build.properties2
-rw-r--r--org.eclipse.jdt.core/pom.xml2
5 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core.tests.model/build.properties b/org.eclipse.jdt.core.tests.model/build.properties
index 6c8659751b..6a1866abc4 100644
--- a/org.eclipse.jdt.core.tests.model/build.properties
+++ b/org.eclipse.jdt.core.tests.model/build.properties
@@ -20,4 +20,4 @@ bin.includes = plugin.xml,\
src.includes = about.html
source.. = src/
output.. = bin/
-javacWarnings..=-fieldHiding,-unavoidableGenericProblems
+javacWarnings..=+fieldHiding,-unavoidableGenericProblems
diff --git a/org.eclipse.jdt.core.tests.model/pom.xml b/org.eclipse.jdt.core.tests.model/pom.xml
index a157510bb4..942986ba52 100644
--- a/org.eclipse.jdt.core.tests.model/pom.xml
+++ b/org.eclipse.jdt.core.tests.model/pom.xml
@@ -25,7 +25,7 @@
<properties>
<defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
- <code.ignoredWarnings>-warn:-fieldHiding,unavoidableGenericProblems</code.ignoredWarnings>
+ <code.ignoredWarnings>-warn:+fieldHiding,-unavoidableGenericProblems</code.ignoredWarnings>
</properties>
<build>
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
index 179f579cea..07e3a1b065 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
@@ -270,6 +270,7 @@ private NameEnvironmentAnswer findClass(String qualifiedTypeName, char[] typeNam
Classpath classpathEntry = this.classpaths[i];
if (classpathEntry.hasAnnotationFileFor(qualifiedTypeName)) {
// in case of 'this.annotationsFromClasspath' we indeed search for .eea entries inside the main zipFile of the entry:
+ @SuppressWarnings("resource")
ZipFile zip = classpathEntry instanceof ClasspathJar ? ((ClasspathJar) classpathEntry).zipFile : null;
try {
if (zip == null) {
diff --git a/org.eclipse.jdt.core/build.properties b/org.eclipse.jdt.core/build.properties
index 5db1554335..a2c4738ea7 100644
--- a/org.eclipse.jdt.core/build.properties
+++ b/org.eclipse.jdt.core/build.properties
@@ -42,4 +42,4 @@ jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant.jar
src.includes = about.html,\
schema/
generateSourceReferences=true
-javacWarnings..=-fieldHiding,-unavoidableGenericProblems
+javacWarnings..=+fieldHiding,-unavoidableGenericProblems
diff --git a/org.eclipse.jdt.core/pom.xml b/org.eclipse.jdt.core/pom.xml
index 58871d7046..33ce7832fb 100644
--- a/org.eclipse.jdt.core/pom.xml
+++ b/org.eclipse.jdt.core/pom.xml
@@ -23,7 +23,7 @@
<properties>
<defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
- <code.ignoredWarnings>-warn:-fieldHiding,unavoidableGenericProblems</code.ignoredWarnings>
+ <code.ignoredWarnings>-warn:+fieldHiding,-unavoidableGenericProblems</code.ignoredWarnings>
</properties>
<build>

Back to the top