Rollback changes to CacheCompilationUnit due to breakage. git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10800 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java b/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java index c1d6412..14ecc1a 100644 --- a/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java +++ b/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java
@@ -17,14 +17,10 @@ import com.google.gwt.dev.jjs.impl.GwtAstBuilder; import com.google.gwt.dev.util.DiskCacheToken; -import com.google.gwt.dev.util.Util; import org.eclipse.jdt.core.compiler.CategorizedProblem; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; import java.util.List; /** @@ -61,8 +57,7 @@ this.contentId = unit.getContentId(); this.dependencies = unit.getDependencies(); this.resourcePath = unit.getResourcePath(); - this.resourceLocation = Util.stripJarPathPrefix(resourceLocation); - this.jsniMethods = sortJsniMethods(unit.getJsniMethods()); + this.jsniMethods = unit.getJsniMethods(); this.methodArgNamesLookup = unit.getMethodArgs(); this.typeName = unit.getTypeName(); this.isError = unit.isError(); @@ -74,6 +69,7 @@ // Override these fields this.lastModified = lastModified; + this.resourceLocation = resourceLocation; } /** @@ -92,9 +88,9 @@ this.compiledClasses = CompiledClass.copyForUnit(unit.getCompiledClasses(), this); this.contentId = unit.getContentId(); this.dependencies = unit.getDependencies(); + this.resourceLocation = unit.getResourceLocation(); this.resourcePath = unit.getResourcePath(); - this.resourceLocation = Util.stripJarPathPrefix(unit.getResourceLocation()); - this.jsniMethods = sortJsniMethods(unit.getJsniMethods()); + this.jsniMethods = unit.getJsniMethods(); this.lastModified = unit.getLastModified(); this.methodArgNamesLookup = unit.getMethodArgs(); this.typeName = unit.getTypeName(); @@ -194,21 +190,4 @@ long getTypesSerializedVersion() { return astVersion; } - - private List<JsniMethod> sortJsniMethods(List<JsniMethod> jsniMethods) { - if (jsniMethods == null) { - return null; - } - - // copy because the source may be unmodifiable or singleton - ArrayList<JsniMethod> copy = new ArrayList<JsniMethod>(jsniMethods); - - Collections.sort(copy, new Comparator<JsniMethod>() { - @Override - public int compare(JsniMethod o1, JsniMethod o2) { - return o1.name().compareTo(o2.name()); - } - }); - return copy; - } }
diff --git a/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java b/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java index 9a0f73d..f253eba 100644 --- a/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java +++ b/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java
@@ -30,7 +30,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -69,13 +68,7 @@ } copyCc.enclosingClass = newRef; } - // sort classes to maintain stability in compilation unit archives - Collections.sort(copy, new Comparator<CompiledClass>() { - @Override - public int compare(CompiledClass o1, CompiledClass o2) { - return o1.getSourceName().compareTo(o2.getSourceName()); - } - }); + return Collections.unmodifiableCollection(copy); }
diff --git a/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java b/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java index 4a879c0..b19eb9a 100644 --- a/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java +++ b/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java
@@ -182,7 +182,7 @@ @Override public String optionalFileLocation() { - return file.exists() ? Util.stripJarPathPrefix(file.getAbsolutePath()) : null; + return file.exists() ? file.getAbsolutePath() : null; } }
diff --git a/dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java b/dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java index 8d102a5..3e42270 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java +++ b/dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java
@@ -18,7 +18,6 @@ import com.google.gwt.dev.jjs.Correlation.Axis; import com.google.gwt.dev.jjs.CorrelationFactory.DummyCorrelationFactory; import com.google.gwt.dev.util.StringInterner; -import com.google.gwt.dev.util.Util; import java.util.Collections; import java.util.LinkedHashMap; @@ -118,7 +117,7 @@ private final int startLine; private SourceOrigin(String location, int startLine) { - this.fileName = StringInterner.get().intern(Util.stripJarPathPrefix(location)); + this.fileName = StringInterner.get().intern(location); this.startLine = startLine; }
diff --git a/dev/core/src/com/google/gwt/dev/util/Util.java b/dev/core/src/com/google/gwt/dev/util/Util.java index 89ccbed..0bbd4fe 100644 --- a/dev/core/src/com/google/gwt/dev/util/Util.java +++ b/dev/core/src/com/google/gwt/dev/util/Util.java
@@ -910,21 +910,6 @@ } /** - * Remove leading file:jar:...!/ prefix from source paths for source located in jars. - * @param absolutePath an absolute JAR file URL path - * @return the location of the file within the JAR - */ - public static String stripJarPathPrefix(String absolutePath) { - if (absolutePath != null) { - int bang = absolutePath.lastIndexOf('!'); - if (bang != -1) { - return absolutePath.substring(bang + 2); - } - } - return absolutePath; - } - - /** * Get a large byte buffer local to this thread. Currently this is set to a * 16k buffer, which is small enough to fit into the L2 cache on modern * processors. The contents of the returned buffer are undefined. Calling @@ -1495,4 +1480,5 @@ */ private Util() { } + }