[java] Getting rid of unnecessary generics
@@ -49,10 +49,10 @@ public Object run(Context context) {
global = context.initStandardObjects();
// Check assumptions abut the global context, which the atoms assumes is a DOM window.
- assertThat((Object) eval(context, "this.window=this;")).isEqualTo(global);
- assertThat((Object) eval(context, "this")).isEqualTo(global);
- assertThat((Object) eval(context, "window")).isEqualTo(global);
- assertThat((Object) eval(context, "this === window")).isEqualTo(true);
+ assertThat(eval(context, "this.window=this;")).isEqualTo(global);
+ assertThat(eval(context, "this")).isEqualTo(global);
+ assertThat(eval(context, "window")).isEqualTo(global);
+ assertThat(eval(context, "this === window")).isEqualTo(true);
eval(context, source, RESOURCE_PATH);
@@ -68,17 +68,15 @@ public Object run(Context context) {
}
private void assertFunction(Context context, String property) {
- assertThat((Object) eval(context, "typeof " + property)).describedAs(property).isEqualTo("function");
+ assertThat(eval(context, "typeof " + property)).describedAs(property).isEqualTo("function");
}
- @SuppressWarnings({"unchecked"})
- private <T> T eval(Context context, String script) {
- return (T) eval(context, script, "");
+ private Object eval(Context context, String script) {
+ return eval(context, script, "");
}
- @SuppressWarnings({"unchecked"})
- private <T> T eval(Context context, String script, String src) {
- return (T) context.evaluateString(global, script, src, 1, null);
+ private Object eval(Context context, String script, String src) {
+ return context.evaluateString(global, script, src, 1, null);
}
});
}
