Revision: 1574
Author: sberlin
Date: Fri Jul 22 14:13:53 2011
Log:
Fix a few common.collect-related deprecation warnings... because it's easy!
Revision created by MOE tool push_codebase.
MOE_MIGRATION=2700
http://code.google.com/p/google-guice/source/detail?r=1574
Modified:
/trunk/core/src/com/google/inject/TypeLiteral.java
/trunk/core/src/com/google/inject/internal/InjectorImpl.java
/trunk/core/src/com/google/inject/spi/InterceptorBinding.java
/trunk/core/src/com/google/inject/spi/Message.java
/trunk/core/src/com/google/inject/spi/ProvisionListenerBinding.java
/trunk/core/src/com/google/inject/util/Modules.java
=======================================
--- /trunk/core/src/com/google/inject/TypeLiteral.java Thu Jul 7 17:34:16
2011
+++ /trunk/core/src/com/google/inject/TypeLiteral.java Fri Jul 22 14:13:53
2011
@@ -171,7 +171,7 @@
for (int t = 0; t < types.length; t++) {
result[t] = resolve(types[t]);
}
- return ImmutableList.of(result);
+ return ImmutableList.copyOf(result);
}
/**
=======================================
--- /trunk/core/src/com/google/inject/internal/InjectorImpl.java Thu Jul 7
17:34:16 2011
+++ /trunk/core/src/com/google/inject/internal/InjectorImpl.java Fri Jul 22
14:13:53 2011
@@ -220,7 +220,7 @@
}
public Injector createChildInjector(Module... modules) {
- return createChildInjector(ImmutableList.of(modules));
+ return createChildInjector(ImmutableList.copyOf(modules));
}
/**
=======================================
--- /trunk/core/src/com/google/inject/spi/InterceptorBinding.java Thu Jul
7 17:34:16 2011
+++ /trunk/core/src/com/google/inject/spi/InterceptorBinding.java Fri Jul
22 14:13:53 2011
@@ -56,7 +56,7 @@
this.source = checkNotNull(source, "source");
this.classMatcher = checkNotNull(classMatcher, "classMatcher");
this.methodMatcher = checkNotNull(methodMatcher, "methodMatcher");
- this.interceptors = ImmutableList.of(interceptors);
+ this.interceptors = ImmutableList.copyOf(interceptors);
}
public Object getSource() {
=======================================
--- /trunk/core/src/com/google/inject/spi/Message.java Thu Jul 7 17:34:16
2011
+++ /trunk/core/src/com/google/inject/spi/Message.java Fri Jul 22 14:13:53
2011
@@ -126,7 +126,7 @@
for (int i = 0; i < sourcesAsStrings.length; i++) {
sourcesAsStrings[i] = Errors.convert(sourcesAsStrings[i]).toString();
}
- return new Message(ImmutableList.of(sourcesAsStrings), message, cause);
+ return new Message(ImmutableList.copyOf(sourcesAsStrings), message,
cause);
}
private static final long serialVersionUID = 0;
=======================================
--- /trunk/core/src/com/google/inject/spi/ProvisionListenerBinding.java Thu
Jul 7 17:34:16 2011
+++ /trunk/core/src/com/google/inject/spi/ProvisionListenerBinding.java Fri
Jul 22 14:13:53 2011
@@ -41,7 +41,7 @@
ProvisionListener[] listeners) {
this.source = source;
this.keyMatcher = typeMatcher;
- this.listeners = ImmutableList.of(listeners);
+ this.listeners = ImmutableList.copyOf(listeners);
}
/** Returns the registered listeners. */
=======================================
--- /trunk/core/src/com/google/inject/util/Modules.java Thu Jul 7 17:34:16
2011
+++ /trunk/core/src/com/google/inject/util/Modules.java Fri Jul 22 14:13:53
2011
@@ -100,7 +100,7 @@
* Returns a new module that installs all of {@code modules}.
*/
public static Module combine(Module... modules) {
- return combine(ImmutableSet.of(modules));
+ return combine(ImmutableSet.copyOf(modules));
}
/**
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.