Skip to content
This repository was archived by the owner on Sep 26, 2020. It is now read-only.

Commit 1e5311e

Browse files
author
rluble@google.com
committed
Upgrade JDT to 3.8.3.
Change-Id: If7d533adcb953de614ea071cfd7e57560b664ce0 Review-Link: https://gwt-review.googlesource.com/#/c/2361/ git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11610 8db76d5a-ed1c-0410-87a9-c151d255dfc7
1 parent 4934a93 commit 1e5311e

File tree

10 files changed

+36
-1694
lines changed

10 files changed

+36
-1694
lines changed

dev/build.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
<fileset dir="${gwt.tools.lib}">
5757
<include name="apache/tapestry-util-text-4.0.2.jar" />
5858
<include name="apache/ant-1.6.5.jar" />
59-
<include name="eclipse/jdt-3.4.2_r894.jar" />
59+
<include name="eclipse/org.eclipse.jdt.core_3.8.3.v20130121-145325.jar" />
60+
<include name="eclipse/jdtCompilerAdapter-3.8.3.v20130121-145325.jar" />
6061
<include name="guava/guava-10.0.1/guava-10.0.1-rebased.jar" />
6162
<include name="jscomp/r1649/compiler-rebased.jar" />
6263
<include name="jetty/jetty-6.1.11.jar" />
@@ -105,7 +106,8 @@
105106
<gwt.jar destfile="${alldeps.jar}">
106107
<zipfileset src="${gwt.tools.lib}/apache/tapestry-util-text-4.0.2.jar" />
107108
<zipfileset src="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
108-
<zipfileset src="${gwt.tools.lib}/eclipse/jdt-3.4.2_r894.jar" />
109+
<zipfileset src="${gwt.tools.lib}/eclipse/org.eclipse.jdt.core_3.8.3.v20130121-145325.jar" />
110+
<zipfileset src="${gwt.tools.lib}/eclipse/jdtCompilerAdapter-3.8.3.v20130121-145325.jar" />
109111
<zipfileset src="${gwt.tools.lib}/guava/guava-10.0.1/guava-10.0.1-rebased.jar" />
110112
<zipfileset src="${gwt.tools.lib}/jscomp/r1649/compiler-rebased.jar" />
111113
<zipfileset src="${gwt.tools.lib}/jetty/jetty-6.1.11.jar" />
@@ -180,7 +182,8 @@
180182
<include name="org/eclipse/jdt/**"/>
181183
<classpath>
182184
<pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
183-
<pathelement location="${gwt.tools.lib}/eclipse/jdt-3.4.2_r894.jar" />
185+
<pathelement location="${gwt.tools.lib}/eclipse/org.eclipse.jdt.core_3.8.3.v20130121-145325.jar" />
186+
<pathelement location="${gwt.tools.lib}/eclipse/jdtCompilerAdapter-3.8.3.v20130121-145325.jar" />
184187
<pathelement location="${gwt.tools.lib}/apache/commons/commons-collections-3.2.1.jar" />
185188
<pathelement location="${gwt.tools.lib}/guava/guava-10.0.1/guava-10.0.1-rebased.jar" />
186189
<pathelement location="${gwt.tools.lib}/jscomp/r1649/compiler-rebased.jar" />

dev/core/src/com/google/gwt/dev/javac/JavaSourceParser.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ private static TypeDeclaration findType(TypeDeclaration[] types, char[] name) {
178178
* @return a CompilationUnitDeclaration or null if parsing failed
179179
*/
180180
private static CompilationUnitDeclaration parseJava(String javaSource) {
181-
CodeSnippetParsingUtil parsingUtil = new CodeSnippetParsingUtil();
181+
CodeSnippetParsingUtil parsingUtil = new CodeSnippetParsingUtil(true);
182182
CompilerOptions options = new CompilerOptions();
183-
options.complianceLevel = ClassFileConstants.JDK1_5;
184-
options.sourceLevel = ClassFileConstants.JDK1_5;
183+
options.complianceLevel = ClassFileConstants.JDK1_6;
184+
options.originalSourceLevel = ClassFileConstants.JDK1_6;
185+
options.sourceLevel = ClassFileConstants.JDK1_6;
185186
CompilationUnitDeclaration unit = parsingUtil.parseCompilationUnit(
186187
javaSource.toString().toCharArray(), options.getMap(), true);
187188
if (unit.compilationResult().hasProblems()) {

dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ public char[][] getPackageName() {
224224
return CharOperation.splitOn('.', packageName.toCharArray());
225225
}
226226

227+
@Override
228+
public boolean ignoreOptionalProblems() {
229+
return false;
230+
}
231+
227232
@Override
228233
public String toString() {
229234
return builder.toString();
@@ -584,8 +589,13 @@ public static List<CompilationUnit> compile(TreeLogger logger,
584589
}
585590

586591
public static CompilerOptions getCompilerOptions() {
587-
CompilerOptions options = new CompilerOptions();
588-
options.complianceLevel = options.sourceLevel = options.targetJDK = ClassFileConstants.JDK1_6;
592+
CompilerOptions options = new CompilerOptions() {
593+
{
594+
warningThreshold.clearAll();
595+
}
596+
};
597+
options.originalSourceLevel = options.complianceLevel = options.sourceLevel =
598+
options.targetJDK = ClassFileConstants.JDK1_6;
589599

590600
// Generate debug info for debugging the output.
591601
options.produceDebugAttributes =
@@ -599,7 +609,6 @@ public static CompilerOptions getCompilerOptions() {
599609
// Turn off all warnings, saves some memory / speed.
600610
options.reportUnusedDeclaredThrownExceptionIncludeDocCommentReference = false;
601611
options.reportUnusedDeclaredThrownExceptionExemptExceptionAndThrowable = false;
602-
options.warningThreshold = 0;
603612
options.inlineJsrBytecode = true;
604613
return options;
605614
}

dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,6 @@ public void endVisit(CastExpression x, BlockScope scope) {
544544
SourceInfo info = makeSourceInfo(x);
545545
JType type = typeMap.get(x.resolvedType);
546546
JExpression expression = pop(x.expression);
547-
if (x.type instanceof NameReference) {
548-
pop(x.type);
549-
}
550547
push(new JCastOperation(info, type, expression));
551548
} catch (Throwable e) {
552549
throw translateException(x, e);
@@ -3073,14 +3070,7 @@ private void createMembers(TypeDeclaration x) {
30733070

30743071
if (x.fields != null) {
30753072
for (FieldDeclaration field : x.fields) {
3076-
if (x.binding.isLocalType() && field.isStatic()) {
3077-
/*
3078-
* Source compatibility with genJavaAst; static fields in local
3079-
* types don't get visited.
3080-
*/
3081-
} else {
3082-
createField(field);
3083-
}
3073+
createField(field);
30843074
}
30853075
}
30863076

0 commit comments

Comments
 (0)