Fixing an error message about an unassignable backend

This commit is contained in:
Andrew Phillips 2014-01-23 02:55:59 -05:00
parent d76a9d921e
commit b59457a405
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ public abstract class BaseView extends ForwardingObject implements View {
@SuppressWarnings("unchecked")
@Override
public <C extends Context> C unwrap(TypeToken<C> type) {
checkArgument(checkNotNull(type, "type").isAssignableFrom(backendType), "backend type: %s not assignable from %s", backendType, type);
checkArgument(checkNotNull(type, "type").isAssignableFrom(backendType), "backend type: %s not assignable to %s", backendType, type);
return (C) backend;
}

View File

@ -105,7 +105,7 @@ public class BaseViewTest {
wine.unwrap(typeToken(PeanutButter.class));
fail();
} catch (IllegalArgumentException e) {
assertEquals(e.getMessage(), "backend type: org.jclouds.internal.BaseViewTest$Water not assignable from org.jclouds.internal.BaseViewTest$PeanutButter");
assertEquals(e.getMessage(), "backend type: org.jclouds.internal.BaseViewTest$Water not assignable to org.jclouds.internal.BaseViewTest$PeanutButter");
}
}