Fix warnings in core.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1460 d779f126-a31b-0410-b53b-1d3aecad763e
diff --git a/core/src/com/google/inject/internal/BindingProcessor.java b/core/src/com/google/inject/internal/BindingProcessor.java
index 38af5c0..82900b5 100644
--- a/core/src/com/google/inject/internal/BindingProcessor.java
+++ b/core/src/com/google/inject/internal/BindingProcessor.java
@@ -270,7 +270,7 @@
 
   /**
    * We tolerate duplicate bindings if one exposes the other or if the two bindings
-   * are considered duplicates (see {@link Bindings#areDuplicates(BindingImpl, BindingImpl)}. 
+   * are considered duplicates (see {@link Bindings#areDuplicates(BindingImpl, BindingImpl)}.
    *
    * @param original the binding in the parent injector (candidate for an exposing binding)
    * @param binding the binding to check (candidate for the exposed binding)
@@ -295,7 +295,7 @@
   // It's unfortunate that we have to maintain a blacklist of specific
   // classes, but we can't easily block the whole package because of
   // all our unit tests.
-  private static final Set<Class<?>> FORBIDDEN_TYPES = ImmutableSet.of(
+  private static final Set<Class<?>> FORBIDDEN_TYPES = ImmutableSet.<Class<?>>of(
       AbstractModule.class,
       Binder.class,
       Binding.class,
diff --git a/core/src/com/google/inject/internal/ConstructorBindingImpl.java b/core/src/com/google/inject/internal/ConstructorBindingImpl.java
index 10bc5a5..fcb2ea5 100644
--- a/core/src/com/google/inject/internal/ConstructorBindingImpl.java
+++ b/core/src/com/google/inject/internal/ConstructorBindingImpl.java
@@ -197,6 +197,7 @@
         null, key, getSource(), factory, getScoping(), factory, constructorInjectionPoint);
   }
 
+  @SuppressWarnings("unchecked") // the raw constructor member and declaring type always agree
   public void applyTo(Binder binder) {
     InjectionPoint constructor = getConstructor();
     getScoping().applyTo(binder.withSource(getSource()).bind(getKey()).toConstructor(
diff --git a/core/src/com/google/inject/internal/ProviderInstanceBindingImpl.java b/core/src/com/google/inject/internal/ProviderInstanceBindingImpl.java
index 7ba7c6b..2546c26 100644
--- a/core/src/com/google/inject/internal/ProviderInstanceBindingImpl.java
+++ b/core/src/com/google/inject/internal/ProviderInstanceBindingImpl.java
@@ -53,9 +53,11 @@
     this.providerInstance = providerInstance;
   }
 
+  @SuppressWarnings("unchecked") // the extension type is always consistent with the provider type
   public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T, V> visitor) {
     if(providerInstance instanceof ProviderWithExtensionVisitor) {
-      return ((ProviderWithExtensionVisitor<? extends T>)providerInstance).acceptExtensionVisitor(visitor, this);
+      return ((ProviderWithExtensionVisitor<? extends T>) providerInstance)
+          .acceptExtensionVisitor(visitor, this);
     } else {
       return visitor.visit(this);
     }
diff --git a/core/src/com/google/inject/internal/ProxyFactory.java b/core/src/com/google/inject/internal/ProxyFactory.java
index 9539b78..74965e3 100644
--- a/core/src/com/google/inject/internal/ProxyFactory.java
+++ b/core/src/com/google/inject/internal/ProxyFactory.java
@@ -248,7 +248,7 @@
     }
 
     @SuppressWarnings("unchecked") // the constructor promises to produce 'T's
-    public T newInstance(Object[] arguments) throws InvocationTargetException {
+    public T newInstance(Object... arguments) throws InvocationTargetException {
       Enhancer.registerCallbacks(enhanced, callbacks);
       try {
         return (T) fastConstructor.newInstance(arguments);