Deletes several deprecated functions.
Change-Id: I0a1cb033a6fddedc40cc5b0ffef4bc21130a0592
Review-Link: https://gwt-review.googlesource.com/#/c/10880/
diff --git a/dev/core/src/com/google/gwt/core/ext/ServletContainerLauncher.java b/dev/core/src/com/google/gwt/core/ext/ServletContainerLauncher.java
index e2d496a..9c7602a 100644
--- a/dev/core/src/com/google/gwt/core/ext/ServletContainerLauncher.java
+++ b/dev/core/src/com/google/gwt/core/ext/ServletContainerLauncher.java
@@ -42,16 +42,6 @@
}
/**
- * @return a path to a 24-pixel high image file (relative to the classpath) to
- * be used for this servlet container, or null if none.
- * @deprecated see {@link #getIconBytes} instead.
- */
- @Deprecated
- public String getIconPath() {
- return null;
- }
-
- /**
* @return a short human-readable name of this servlet container, or null
* if no name should be displayed.
*/
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/ConfigurationProperty.java b/dev/core/src/com/google/gwt/core/ext/linker/ConfigurationProperty.java
index 1c032c0..7b57692 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/ConfigurationProperty.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/ConfigurationProperty.java
@@ -35,13 +35,6 @@
String getName();
/**
- * Returns the defined value for the configuration property. If the property
- * has multiple values, this returns the first value only.
- */
- @Deprecated
- String getValue();
-
- /**
* Returns the defined values for the configuration property as a List
* of Strings.
*/
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/EmittedArtifact.java b/dev/core/src/com/google/gwt/core/ext/linker/EmittedArtifact.java
index 0eeb01a..e04dd20 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/EmittedArtifact.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/EmittedArtifact.java
@@ -180,39 +180,6 @@
}
/**
- * Returns whether or not the data contained in the EmittedArtifact should be
- * written into the module output directory or into an auxiliary directory.
- * <p>
- * EmittedArtifacts that return <code>true</code> for this method will not
- * be emitted into the normal module output location, but will instead be
- * written into a directory that is a sibling to the module output directory.
- * The partial path of the EmittedArtifact will be prepended with the
- * short-name of the Linker type that created the EmittedArtifact.
- * <p>
- * Private EmittedArtifacts are intended for resources that generally should
- * not be deployed to the server in the same location as the module
- * compilation artifacts.
- *
- * @deprecated use {@link #getVisibility()} instead
- */
- @Deprecated
- public boolean isPrivate() {
- return visibility == Visibility.Private;
- }
-
- /**
- * Sets the private attribute of the EmittedResource.
- *
- * @param isPrivate true if this artifact is private
- *
- * @deprecated use {@link #setVisibility(Visibility)} instead
- */
- @Deprecated
- public void setPrivate(boolean isPrivate) {
- this.visibility = isPrivate ? Visibility.Private : Visibility.Public;
- }
-
- /**
* @param visibility the visibility to set
*/
public void setVisibility(Visibility visibility) {
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/HostedModeLinker.java b/dev/core/src/com/google/gwt/core/ext/linker/impl/HostedModeLinker.java
index 2599888..f8bdb51 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/HostedModeLinker.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/HostedModeLinker.java
@@ -70,12 +70,6 @@
}
@Override
- protected String getModuleSuffix(TreeLogger logger, LinkerContext context)
- throws UnableToCompleteException {
- return unsupported(logger);
- }
-
- @Override
protected String getSelectionScriptTemplate(TreeLogger logger, LinkerContext context) {
return "com/google/gwt/core/ext/linker/impl/HostedModeTemplate.js";
}
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java b/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
index 0557d69..45a0b1a 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
@@ -347,14 +347,11 @@
String prefix = getDeferredFragmentPrefix(logger, context, fragment);
b.append(prefix);
b.append(js);
- String suffix = getDeferredFragmentSuffix(logger, context, fragment);
+ String suffix = getDeferredFragmentSuffix2(logger, context, fragment, strongName);
if (suffix == null) {
- suffix = getDeferredFragmentSuffix2(logger, context, fragment, strongName);
- if (suffix == null) {
- logger.log(Type.ERROR, "Neither getDeferredFragmentSuffix nor getDeferredFragmentSuffix2 "
- + "were overridden in linker: " + getClass().getName());
- throw new UnableToCompleteException();
- }
+ logger.log(Type.ERROR, "getDeferredFragmentSuffix2 "
+ + "was not overridden in linker: " + getClass().getName());
+ throw new UnableToCompleteException();
}
b.append(suffix);
SymbolMapsLinker.ScriptFragmentEditsArtifact editsArtifact
@@ -367,7 +364,7 @@
/**
* Generate the primary fragment. The default implementation is based on {@link
* #getModulePrefix(TreeLogger, LinkerContext, String, int)} and {@link
- * #getModuleSuffix(TreeLogger, LinkerContext)}.
+ * #getModuleSuffix2(TreeLogger, LinkerContext, String)}.
*/
protected byte[] generatePrimaryFragment(TreeLogger logger,
LinkerContext context, CompilationResult result, String[] js,
@@ -393,14 +390,11 @@
artifacts.add(editsArtifact);
b.append(modulePrefix);
b.append(js);
- String suffix = getModuleSuffix(logger, context);
+ String suffix = getModuleSuffix2(logger, context, strongName);
if (suffix == null) {
- suffix = getModuleSuffix2(logger, context, strongName);
- if (suffix == null) {
- logger.log(Type.ERROR, "Neither getModuleSuffix nor getModuleSuffix2 were overridden in "
- + "linker: " + getClass().getName());
- throw new UnableToCompleteException();
- }
+ logger.log(Type.ERROR, "getModuleSuffix2 was not overridden in "
+ + "linker: " + getClass().getName());
+ throw new UnableToCompleteException();
}
b.append(suffix);
return wrapPrimaryFragment(logger, context, b.toString(), artifacts, result);
@@ -433,22 +427,7 @@
}
/**
- * Returns the suffix at the end of a JavaScript fragment other than the initial fragment
- * (deprecated version). The default version returns null, which will cause
- * {@link #getDeferredFragmentSuffix2} to be called instead. Subclasses should switch to
- * extending getDeferredFragmentSuffix2.
- */
- @Deprecated
- protected String getDeferredFragmentSuffix(TreeLogger logger, LinkerContext context,
- int fragment) {
- return null;
- }
-
- /**
- * Returns the suffix at the end of a JavaScript fragment other than the initial fragment
- * (new version). This method won't be called if {@link #getDeferredFragmentSuffix} is overridden
- * to return non-null. Subclasses should stop implementing getDeferredFramgnentSuffix and
- * implement getDeferredFragmentSuffix2 instead.
+ * Returns the suffix at the end of a JavaScript fragment other than the initial fragment.
*/
protected String getDeferredFragmentSuffix2(TreeLogger logger, LinkerContext context,
int fragment, String strongName) {
@@ -503,20 +482,7 @@
}
/**
- * Returns the suffix for the initial JavaScript fragment (deprecated version).
- * The default returns null, which will cause {@link #getModuleSuffix2} to be called instead.
- * Subclasses should switch to extending getModuleSuffix2.
- */
- @Deprecated
- protected String getModuleSuffix(TreeLogger logger,
- LinkerContext context) throws UnableToCompleteException {
- return null;
- }
-
- /**
- * Returns the suffix for the initial JavaScript fragment (new version). This version
- * will not be called if {@link #getModuleSuffix} is overridden so that it doesn't return null.
- * Subclasses should stop implementing getModuleSuffix and implmenet getModuleSuffix2 instead.
+ * Returns the suffix for the initial JavaScript fragment.
*/
protected String getModuleSuffix2(TreeLogger logger,
LinkerContext context, String strongName) throws UnableToCompleteException {
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardConfigurationProperty.java b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardConfigurationProperty.java
index 548fa2f..b71cd49 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardConfigurationProperty.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardConfigurationProperty.java
@@ -48,12 +48,6 @@
}
@Override
- @Deprecated
- public String getValue() {
- return values.isEmpty() ? null : values.get(0);
- }
-
- @Override
public List<String> getValues() {
return values;
}
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
index 6ddc8ae..f9ad04a 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
@@ -254,7 +254,7 @@
for (String path : publicResourceOracle.getPathNames()) {
String partialPath = path.replace(File.separatorChar, '/');
PublicResource resource = new StandardPublicResource(partialPath,
- publicResourceOracle.getResourceMap().get(path));
+ publicResourceOracle.getResource(path));
artifacts.add(resource);
if (logger.isLoggable(TreeLogger.SPAM)) {
logger.log(TreeLogger.SPAM, "Added public resource " + resource, null);
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java
index 175bdb2..8696c8b 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java
@@ -209,12 +209,6 @@
boolean isFinal();
/**
- * @deprecated local types are not modeled
- */
- @Deprecated
- boolean isLocalType();
-
- /**
* Tests if this type is contained within another type.
*
* @return true if this type has an enclosing type, false if this type is a
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/JParameterizedType.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/JParameterizedType.java
index 1402155..7863b90 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/JParameterizedType.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/JParameterizedType.java
@@ -18,17 +18,10 @@
/**
* Represents a parameterized type in a declaration.
*/
-
public interface JParameterizedType extends JClassType {
JGenericType getBaseType();
- /**
- * @deprecated See {@link #getQualifiedSourceName()}
- */
- @Deprecated
- String getNonParameterizedQualifiedSourceName();
-
JClassType getRawType();
JClassType[] getTypeArgs();
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java
index 9963297..4e1e4da 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java
@@ -43,16 +43,6 @@
public abstract class TypeOracle {
/**
- * A reserved metadata tag to indicates that a field type, method return type
- * or method parameter type is intended to be parameterized. Note that
- * constructor type parameters are not supported at present.
- *
- * @deprecated gwt.typeArgs is not longer supported
- */
- @Deprecated
- public static final String TAG_TYPEARGS = "gwt.typeArgs";
-
- /**
* Convenience method to sort class types in a consistent way. Note that the
* order is subject to change and is intended to generate an "aesthetically
* pleasing" order rather than a computationally reliable order.
@@ -221,14 +211,6 @@
JGenericType genericType, JClassType[] typeArgs);
/**
- * @deprecated This method will always return 0 because a TypeOracle never
- * gets reloaded anymore. Callers should not rely on this value to
- * manage static state.
- */
- @Deprecated
- public abstract long getReloadCount();
-
- /**
* Returns the single implementation type for an interface returned via
* {@link #getSingleJsoImplInterfaces()} or <code>null</code> if no JSO
* implementation is defined.
diff --git a/dev/core/src/com/google/gwt/core/linker/D8ScriptLinker.java b/dev/core/src/com/google/gwt/core/linker/D8ScriptLinker.java
index 16655b2..7c66a4d 100644
--- a/dev/core/src/com/google/gwt/core/linker/D8ScriptLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/D8ScriptLinker.java
@@ -175,16 +175,6 @@
throw new UnableToCompleteException();
}
- /**
- * Unimplemented. Normally required by
- * {@link #doEmitCompilation(TreeLogger, LinkerContext, CompilationResult, ArtifactSet)}.
- */
- @Override
- protected String getModuleSuffix(TreeLogger logger, LinkerContext context)
- throws UnableToCompleteException {
- throw new UnableToCompleteException();
- }
-
@Override
protected String getSelectionScriptTemplate(TreeLogger logger, LinkerContext context)
throws UnableToCompleteException {
diff --git a/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java b/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
index be81b4d..45f454f 100644
--- a/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
@@ -96,7 +96,7 @@
}
@Override
- protected String getModuleSuffix(TreeLogger logger, LinkerContext context) {
+ protected String getModuleSuffix2(TreeLogger logger, LinkerContext context, String strongName) {
DefaultTextOutput out = new DefaultTextOutput(context.isOutputCompact());
out.print("$stats && $stats({moduleName:'" + context.getModuleName()
diff --git a/dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java b/dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java
index 4048241..dc25dfb 100644
--- a/dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java
@@ -184,16 +184,6 @@
throw new UnableToCompleteException();
}
- /**
- * Unimplemented. Normally required by
- * {@link #doEmitCompilation(TreeLogger, LinkerContext, CompilationResult, ArtifactSet)}.
- */
- @Override
- protected String getModuleSuffix(TreeLogger logger, LinkerContext context)
- throws UnableToCompleteException {
- throw new UnableToCompleteException();
- }
-
@Override
protected String getSelectionScriptTemplate(TreeLogger logger, LinkerContext context)
throws UnableToCompleteException {
diff --git a/dev/core/src/com/google/gwt/core/linker/XSLinker.java b/dev/core/src/com/google/gwt/core/linker/XSLinker.java
index be23647..625b628 100644
--- a/dev/core/src/com/google/gwt/core/linker/XSLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/XSLinker.java
@@ -67,7 +67,7 @@
}
@Override
- protected String getModuleSuffix(TreeLogger logger, LinkerContext context) {
+ protected String getModuleSuffix2(TreeLogger logger, LinkerContext context, String strongName) {
DefaultTextOutput out = new DefaultTextOutput(context.isOutputCompact());
out.print("$stats && $stats({moduleName:'" + context.getModuleName()
diff --git a/dev/core/src/com/google/gwt/dev/cfg/CombinedResourceOracle.java b/dev/core/src/com/google/gwt/dev/cfg/CombinedResourceOracle.java
index d55b291..5054e75 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/CombinedResourceOracle.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/CombinedResourceOracle.java
@@ -16,14 +16,12 @@
import com.google.gwt.dev.resource.Resource;
import com.google.gwt.dev.resource.ResourceOracle;
import com.google.gwt.dev.resource.impl.AbstractResourceOracle;
-import com.google.gwt.thirdparty.guava.common.collect.ImmutableSet;
-import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.google.gwt.thirdparty.guava.common.collect.Sets;
+import com.google.gwt.thirdparty.guava.common.io.Files;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import java.util.Map;
import java.util.Set;
/**
@@ -36,7 +34,6 @@
public class CombinedResourceOracle extends AbstractResourceOracle {
private Set<Resource> buildResources;
- private Map<String, Resource> buildResourcesByPath;
private Set<String> pathNames;
private List<ResourceOracle> resourceOracles;
@@ -61,24 +58,27 @@
return pathNames;
}
- @Deprecated
- @Override
- public Map<String, Resource> getResourceMap() {
- if (buildResourcesByPath == null) {
- buildResourcesByPath = Maps.newHashMap();
- for (ResourceOracle resourceOracle : resourceOracles) {
- buildResourcesByPath.putAll(resourceOracle.getResourceMap());
- }
- buildResourcesByPath = Collections.unmodifiableMap(buildResourcesByPath);
- }
- return buildResourcesByPath;
- }
-
@Override
public Set<Resource> getResources() {
if (buildResources == null) {
- buildResources = ImmutableSet.<Resource> copyOf(getResourceMap().values());
+ buildResources = Sets.newHashSet();
+ for (ResourceOracle resourceOracle : resourceOracles) {
+ buildResources.addAll(resourceOracle.getResources());
+ }
+ buildResources = Collections.unmodifiableSet(buildResources);
}
return buildResources;
}
+
+ @Override
+ public Resource getResource(String pathName) {
+ pathName = Files.simplifyPath(pathName);
+ for (ResourceOracle resourceOracle : resourceOracles) {
+ Resource resource = resourceOracle.getResource(pathName);
+ if (resource != null) {
+ return resource;
+ }
+ }
+ return null;
+ }
}
diff --git a/dev/core/src/com/google/gwt/dev/cfg/LibraryGroupBuildResourceOracle.java b/dev/core/src/com/google/gwt/dev/cfg/LibraryGroupBuildResourceOracle.java
index c263fd0..202232a 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/LibraryGroupBuildResourceOracle.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/LibraryGroupBuildResourceOracle.java
@@ -18,11 +18,10 @@
import com.google.gwt.dev.resource.Resource;
import com.google.gwt.dev.resource.impl.AbstractResourceOracle;
import com.google.gwt.thirdparty.guava.common.collect.ImmutableSet;
-import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.google.gwt.thirdparty.guava.common.collect.Sets;
+import com.google.gwt.thirdparty.guava.common.io.Files;
import java.util.Collections;
-import java.util.Map;
import java.util.Set;
/**
@@ -31,7 +30,6 @@
public class LibraryGroupBuildResourceOracle extends AbstractResourceOracle {
private Set<Resource> buildResources;
- private Map<String, Resource> buildResourcesByPath;
private final LibraryGroup libraryGroup;
private Set<String> pathNames;
@@ -52,17 +50,10 @@
return pathNames;
}
- @Deprecated
@Override
- public Map<String, Resource> getResourceMap() {
- if (buildResourcesByPath == null) {
- buildResourcesByPath = Maps.newHashMap();
- for (String path : getPathNames()) {
- buildResourcesByPath.put(path, libraryGroup.getBuildResourceByPath(path));
- }
- buildResourcesByPath = Collections.unmodifiableMap(buildResourcesByPath);
- }
- return buildResourcesByPath;
+ public Resource getResource(String pathName) {
+ pathName = Files.simplifyPath(pathName);
+ return libraryGroup.getBuildResourceByPath(pathName);
}
@Override
diff --git a/dev/core/src/com/google/gwt/dev/cfg/LibraryGroupPublicResourceOracle.java b/dev/core/src/com/google/gwt/dev/cfg/LibraryGroupPublicResourceOracle.java
index 6192587..67e19f4 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/LibraryGroupPublicResourceOracle.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/LibraryGroupPublicResourceOracle.java
@@ -18,11 +18,10 @@
import com.google.gwt.dev.resource.Resource;
import com.google.gwt.dev.resource.impl.AbstractResourceOracle;
import com.google.gwt.thirdparty.guava.common.collect.ImmutableSet;
-import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.google.gwt.thirdparty.guava.common.collect.Sets;
+import com.google.gwt.thirdparty.guava.common.io.Files;
import java.util.Collections;
-import java.util.Map;
import java.util.Set;
/**
@@ -33,7 +32,6 @@
private final LibraryGroup libraryGroup;
private Set<String> pathNames;
private Set<Resource> publicResources;
- private Map<String, Resource> publicResourcesByPath;
public LibraryGroupPublicResourceOracle(LibraryGroup libraryGroup) {
this.libraryGroup = libraryGroup;
@@ -52,17 +50,10 @@
return pathNames;
}
- @Deprecated
@Override
- public Map<String, Resource> getResourceMap() {
- if (publicResourcesByPath == null) {
- publicResourcesByPath = Maps.newHashMap();
- for (String path : getPathNames()) {
- publicResourcesByPath.put(path, libraryGroup.getPublicResourceByPath(path));
- }
- publicResourcesByPath = Collections.unmodifiableMap(publicResourcesByPath);
- }
- return publicResourcesByPath;
+ public Resource getResource(String pathName) {
+ pathName = Files.simplifyPath(pathName);
+ return libraryGroup.getPublicResourceByPath(pathName);
}
@Override
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
index 066524d..1f42257 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
@@ -558,7 +558,7 @@
public synchronized Resource findPublicFile(String partialPath) {
ensureResourcesScanned();
- return lazyPublicOracle.getResourceMap().get(partialPath);
+ return lazyPublicOracle.getResource(partialPath);
}
public synchronized String findServletForPath(String actual) {
@@ -590,7 +590,7 @@
*/
public synchronized Resource findSourceFile(String partialPath) {
ensureResourcesScanned();
- return lazySourceOracle.getResourceMap().get(partialPath);
+ return lazySourceOracle.getResource(partialPath);
}
public Set<String> getActiveLinkerNames() {
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 c0ba1c0..e93bc94 100644
--- a/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java
+++ b/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java
@@ -98,12 +98,6 @@
return wrappedResourceOracle.getResource(pathName);
}
- @Deprecated
- @Override
- public Map<String, Resource> getResourceMap() {
- return wrappedResourceOracle.getResourceMap();
- }
-
@Override
public Set<Resource> getResources() {
return wrappedResourceOracle.getResources();
@@ -906,7 +900,7 @@
}
// Check for public path collision.
- if (compilerContext.getPublicResourceOracle().getResourceMap().containsKey(partialPath)) {
+ if (compilerContext.getPublicResourceOracle().getResource(partialPath) != null) {
logger.log(TreeLogger.WARN, "Cannot create resource '" + partialPath
+ "' because it already exists on the public path", null);
return null;
diff --git a/dev/core/src/com/google/gwt/dev/javac/testing/impl/MockResourceOracle.java b/dev/core/src/com/google/gwt/dev/javac/testing/impl/MockResourceOracle.java
index 1679375..cb31ade 100644
--- a/dev/core/src/com/google/gwt/dev/javac/testing/impl/MockResourceOracle.java
+++ b/dev/core/src/com/google/gwt/dev/javac/testing/impl/MockResourceOracle.java
@@ -19,6 +19,7 @@
import com.google.gwt.dev.resource.impl.ClassPathEntry;
import com.google.gwt.dev.resource.impl.ResourceOracleImpl;
import com.google.gwt.thirdparty.guava.common.collect.Lists;
+import com.google.gwt.thirdparty.guava.common.io.Files;
import java.util.Collections;
import java.util.HashMap;
@@ -69,12 +70,12 @@
return exportedMap.keySet();
}
- @Deprecated
@Override
- public Map<String, Resource> getResourceMap() {
- return exportedMap;
+ public Resource getResource(String pathName) {
+ pathName = Files.simplifyPath(pathName);
+ return exportedMap.get(pathName);
}
-
+
@Override
public Set<Resource> getResources() {
return exportedValues;
diff --git a/dev/core/src/com/google/gwt/dev/javac/typemodel/JClassType.java b/dev/core/src/com/google/gwt/dev/javac/typemodel/JClassType.java
index 8a189fd..990648e 100644
--- a/dev/core/src/com/google/gwt/dev/javac/typemodel/JClassType.java
+++ b/dev/core/src/com/google/gwt/dev/javac/typemodel/JClassType.java
@@ -475,15 +475,6 @@
public abstract JClassType isInterface();
/**
- * @deprecated local types are not modeled
- */
- @Override
- @Deprecated
- public final boolean isLocalType() {
- return false;
- }
-
- /**
* Tests if this type is contained within another type.
*
* @return true if this type has an enclosing type, false if this type is a
diff --git a/dev/core/src/com/google/gwt/dev/javac/typemodel/JParameterizedType.java b/dev/core/src/com/google/gwt/dev/javac/typemodel/JParameterizedType.java
index 37a20c5..3c3e528 100644
--- a/dev/core/src/com/google/gwt/dev/javac/typemodel/JParameterizedType.java
+++ b/dev/core/src/com/google/gwt/dev/javac/typemodel/JParameterizedType.java
@@ -195,15 +195,6 @@
return members.getNestedTypes();
}
- /**
- * @deprecated See {@link #getQualifiedSourceName()}
- */
- @Override
- @Deprecated
- public String getNonParameterizedQualifiedSourceName() {
- return getQualifiedSourceName();
- }
-
@Override
public JMethod[] getOverloads(String name) {
return members.getOverloads(name);
diff --git a/dev/core/src/com/google/gwt/dev/javac/typemodel/TypeOracle.java b/dev/core/src/com/google/gwt/dev/javac/typemodel/TypeOracle.java
index 4bb6261..3e5ddd1 100644
--- a/dev/core/src/com/google/gwt/dev/javac/typemodel/TypeOracle.java
+++ b/dev/core/src/com/google/gwt/dev/javac/typemodel/TypeOracle.java
@@ -570,17 +570,6 @@
}
/**
- * @deprecated This method will always return 0 because a TypeOracle never
- * gets reloaded anymore. Callers should not rely on this value to
- * manage static state.
- */
- @Deprecated
- @Override
- public long getReloadCount() {
- return 0;
- }
-
- /**
* Returns the single implementation type for an interface returned via
* {@link #getSingleJsoImplInterfaces()} or <code>null</code> if no JSO
* implementation is defined.
diff --git a/dev/core/src/com/google/gwt/dev/resource/ResourceOracle.java b/dev/core/src/com/google/gwt/dev/resource/ResourceOracle.java
index 6e61fdb..ba47b6c 100644
--- a/dev/core/src/com/google/gwt/dev/resource/ResourceOracle.java
+++ b/dev/core/src/com/google/gwt/dev/resource/ResourceOracle.java
@@ -16,7 +16,6 @@
package com.google.gwt.dev.resource;
import java.io.InputStream;
-import java.util.Map;
import java.util.Set;
/**
@@ -59,16 +58,6 @@
InputStream getResourceAsStream(String pathName);
/**
- * Returns an unmodifiable map of abstract path name to resource.
- *
- * @deprecated use {@link #getResource(String pathName)}, {@link #getResources()}, and
- * {@link #getPathNames()} instead so that access to specific resources can be
- * tracked.
- */
- @Deprecated
- Map<String, Resource> getResourceMap();
-
- /**
* Returns an unmodifiable set of unique resources with constant lookup time.
*/
Set<Resource> getResources();
diff --git a/dev/core/src/com/google/gwt/dev/resource/impl/AbstractResourceOracle.java b/dev/core/src/com/google/gwt/dev/resource/impl/AbstractResourceOracle.java
index 308c9ac..d2bfa1e 100644
--- a/dev/core/src/com/google/gwt/dev/resource/impl/AbstractResourceOracle.java
+++ b/dev/core/src/com/google/gwt/dev/resource/impl/AbstractResourceOracle.java
@@ -17,7 +17,6 @@
import com.google.gwt.dev.resource.Resource;
import com.google.gwt.dev.resource.ResourceOracle;
-import com.google.gwt.thirdparty.guava.common.io.Files;
import java.io.IOException;
import java.io.InputStream;
@@ -27,12 +26,6 @@
*/
public abstract class AbstractResourceOracle implements ResourceOracle {
@Override
- public Resource getResource(String pathName) {
- pathName = Files.simplifyPath(pathName);
- return getResourceMap().get(pathName);
- }
-
- @Override
public InputStream getResourceAsStream(String pathName) {
Resource resource = getResource(pathName);
if (resource == null) {
diff --git a/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java b/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
index 3cd1026..5edd773 100644
--- a/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
+++ b/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
@@ -30,6 +30,7 @@
import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.google.gwt.thirdparty.guava.common.collect.SetMultimap;
import com.google.gwt.thirdparty.guava.common.collect.Sets;
+import com.google.gwt.thirdparty.guava.common.io.Files;
import java.io.File;
import java.io.IOException;
@@ -458,12 +459,6 @@
return pathPrefixSet;
}
- @Deprecated
- @Override
- public Map<String, Resource> getResourceMap() {
- return exposedResourceMap;
- }
-
@Override
public Set<Resource> getResources() {
return exposedResources;
@@ -477,4 +472,10 @@
List<ClassPathEntry> getClassPathEntries() {
return classPathEntries;
}
+
+ @Override
+ public Resource getResource(String pathName) {
+ pathName = Files.simplifyPath(pathName);
+ return exposedResourceMap.get(pathName);
+ }
}
diff --git a/dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java b/dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java
index 0536a54..1247245 100644
--- a/dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java
+++ b/dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java
@@ -21,7 +21,6 @@
import com.google.gwt.dev.javac.testing.impl.JavaResourceBase;
import com.google.gwt.dev.javac.testing.impl.MockResource;
import com.google.gwt.dev.javac.testing.impl.MockResourceOracle;
-import com.google.gwt.dev.resource.Resource;
import com.google.gwt.dev.util.Util;
import com.google.gwt.dev.util.log.AbstractTreeLogger;
import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
@@ -30,7 +29,6 @@
import java.util.Arrays;
import java.util.Collection;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
@@ -155,11 +153,11 @@
new HashSet<CompilationUnit>(units));
// Save off a mutable copy of the source map and generated types to compare.
- Map<String, Resource> sourceMap = new HashMap<String, Resource>(
- oracle.getResourceMap());
+ Set<String> resourcePathNames = new HashSet<String>(
+ oracle.getPathNames());
Set<String> generatedTypes = new HashSet<String>(
Arrays.asList(generatedTypeNames));
- assertEquals(sourceMap.size() + generatedTypes.size(), units.size());
+ assertEquals(resourcePathNames.size() + generatedTypes.size(), units.size());
for (Entry<String, CompilationUnit> entry : unitMap.entrySet()) {
// Validate source file internally consistent.
String className = entry.getKey();
@@ -174,13 +172,13 @@
assertNotNull(generatedTypes.remove(className));
} else {
String partialPath = className.replace('.', '/') + ".java";
- assertTrue(sourceMap.containsKey(partialPath));
+ assertTrue(resourcePathNames.contains(partialPath));
// TODO: Validate the source file matches the resource.
- assertNotNull(sourceMap.remove(partialPath));
+ assertNotNull(resourcePathNames.remove(partialPath));
}
}
// The mutable sets should be empty now.
- assertEquals(0, sourceMap.size());
+ assertEquals(0, resourcePathNames.size());
assertEquals(0, generatedTypes.size());
}
}
diff --git a/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplRealClasspathTest.java b/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplRealClasspathTest.java
index 1d23663..6726f3b 100644
--- a/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplRealClasspathTest.java
+++ b/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplRealClasspathTest.java
@@ -20,7 +20,7 @@
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.dev.resource.Resource;
-import java.util.Map;
+import java.util.Set;
/**
* Tests {@link ResourceOracleImpl} using the real class path.
@@ -69,8 +69,8 @@
pathPrefixSet.add(makeThisClassPrefix());
resourceOracle.setPathPrefixes(pathPrefixSet);
resourceOracle.scanResources(logger);
- Map<String, Resource> resourceMap = resourceOracle.getResourceMap();
- assertEquals(2, resourceMap.size());
+ Set<Resource> resources = resourceOracle.getResources();
+ assertEquals(2, resources.size());
}
public void testRefresh() {
@@ -79,17 +79,17 @@
pathPrefixSet.add(makeThisClassPrefix());
resourceOracle.setPathPrefixes(pathPrefixSet);
resourceOracle.scanResources(logger);
- Map<String, Resource> resourceMap = resourceOracle.getResourceMap();
- assertEquals(2, resourceMap.size());
+ Set<Resource> resources = resourceOracle.getResources();
+ assertEquals(2, resources.size());
// Plain refresh should have no effect.
resourceOracle.scanResources(logger);
- assertResourcesEqual(resourceMap, resourceOracle.getResourceMap());
+ assertResourcesEqual(resources, resourceOracle.getResources());
// Setting same path entries should have no effect.
resourceOracle.setPathPrefixes(pathPrefixSet);
resourceOracle.scanResources(logger);
- assertResourcesEqual(resourceMap, resourceOracle.getResourceMap());
+ assertResourcesEqual(resources, resourceOracle.getResources());
// Setting identical path entries should have no effect.
pathPrefixSet = new PathPrefixSet();
@@ -97,7 +97,7 @@
pathPrefixSet.add(makeThisClassPrefix());
resourceOracle.setPathPrefixes(pathPrefixSet);
resourceOracle.scanResources(logger);
- assertResourcesEqual(resourceMap, resourceOracle.getResourceMap());
+ assertResourcesEqual(resources, resourceOracle.getResources());
// Setting identical result should have no effect.
pathPrefixSet = new PathPrefixSet();
@@ -106,7 +106,7 @@
pathPrefixSet.add(makeJunitPrefix());
resourceOracle.setPathPrefixes(pathPrefixSet);
resourceOracle.scanResources(logger);
- assertResourcesEqual(resourceMap, resourceOracle.getResourceMap());
+ assertResourcesEqual(resources, resourceOracle.getResources());
// Actually change the working set.
pathPrefixSet = new PathPrefixSet();
@@ -115,6 +115,6 @@
pathPrefixSet.add(makeThisClassPrefixPlus());
resourceOracle.setPathPrefixes(pathPrefixSet);
resourceOracle.scanResources(logger);
- assertEquals(3, resourceOracle.getResourceMap().size());
+ assertEquals(3, resourceOracle.getResources().size());
}
}
diff --git a/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java b/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java
index c19ea92..d7d4e87 100644
--- a/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java
+++ b/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java
@@ -69,25 +69,17 @@
private static class ResourceOracleSnapshot {
private final Set<String> pathNames;
- private final Map<String, Resource> resourceMap;
private final Set<Resource> resources;
public ResourceOracleSnapshot(ResourceOracleImpl oracle) {
resources = oracle.getResources();
- resourceMap = oracle.getResourceMap();
pathNames = oracle.getPathNames();
}
public void assertCollectionsConsistent(int expectedSize) {
assertEquals(expectedSize, resources.size());
- assertEquals(resources.size(), resourceMap.size());
assertEquals(resources.size(), pathNames.size());
- // Ensure every resource is in the map correctly.
- for (Resource r : resources) {
- assertSame(r, resourceMap.get(r.getPath()));
- }
-
// Ensure that every resource path is in the set.
for (Resource r : resources) {
assertTrue(pathNames.contains(r.getPath()));
@@ -95,7 +87,6 @@
}
public void assertNotSameCollections(ResourceOracleSnapshot other) {
- assertNotSame(resourceMap, other.resourceMap);
assertNotSame(resources, other.resources);
assertNotSame(pathNames, other.pathNames);
}
@@ -123,7 +114,6 @@
}
public void assertSameCollections(ResourceOracleSnapshot other) {
- assertResourcesEqual(resourceMap, other.resourceMap);
assertResourcesEqual(resources, other.resources);
assertEquals(pathNames, other.pathNames);
}
diff --git a/user/test/com/google/gwt/core/ext/linker/impl/SelectionScriptLinkerUnitTest.java b/user/test/com/google/gwt/core/ext/linker/impl/SelectionScriptLinkerUnitTest.java
index 6e8d0b7..0d92b6a 100644
--- a/user/test/com/google/gwt/core/ext/linker/impl/SelectionScriptLinkerUnitTest.java
+++ b/user/test/com/google/gwt/core/ext/linker/impl/SelectionScriptLinkerUnitTest.java
@@ -98,7 +98,7 @@
}
@Override
- protected String getModuleSuffix(TreeLogger logger, LinkerContext context) {
+ protected String getModuleSuffix2(TreeLogger logger, LinkerContext context, String strongName) {
return "MODULE_SUFFIX";
}
diff --git a/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java b/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
index 89452c0..7c96aa5 100644
--- a/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
+++ b/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
@@ -66,12 +66,6 @@
}
@Override
- @Deprecated
- public String getValue() {
- return values.get(0);
- }
-
- @Override
public List<String> getValues() {
return values;
}