mirror of https://github.com/apache/jclouds.git
Fixing an error message about an unassignable backend
This commit is contained in:
parent
d76a9d921e
commit
b59457a405
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue