use of com.google.gerrit.client.rpc.NativeString in project gerrit by GerritCodeReview.
the class ActionContext method wrap.
private static GerritCallback<JavaScriptObject> wrap(final JavaScriptObject cb) {
return new GerritCallback<JavaScriptObject>() {
@Override
public void onSuccess(JavaScriptObject result) {
if (NativeString.is(result)) {
NativeString s = result.cast();
ApiGlue.invoke(cb, s.asString());
} else {
ApiGlue.invoke(cb, result);
}
}
};
}
Aggregations