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")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public <C extends Context> C unwrap(TypeToken<C> type) {
|
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;
|
return (C) backend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class BaseViewTest {
|
||||||
wine.unwrap(typeToken(PeanutButter.class));
|
wine.unwrap(typeToken(PeanutButter.class));
|
||||||
fail();
|
fail();
|
||||||
} catch (IllegalArgumentException e) {
|
} 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