GWT绑定器:TypeOracle.getType("foo.Foo")返回null:如何获取实际错误? [英] GWT rebinder: TypeOracle.getType("foo.Foo") returns null: how to get the real error?

查看:79
本文介绍了GWT绑定器:TypeOracle.getType("foo.Foo")返回null:如何获取实际错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Foo课:

package foo;
import bar.Bar; // Bar is super-sourced badly
public class Foo {
    private Bar b = new Bar(); // no-arg constructor of Bar doesn't exist
    ...
}

当我进行重新绑定时:

JClassType t = TypeOrace.getType("foo.Foo"); // return null

即使存在"foo.Foo",它也会返回null.真正的问题是Foo.java中的Bar线. 总有不是要获取真正的错误而不是null?那么包含单词Bar或行private Bar b = new Bar();或行号的东西是什么?

That returns null, even though "foo.Foo" exists. The real problem is that Bar line inside Foo.java. Is there anyway to get the real error instead of null? So something that contains the word Bar or the line private Bar b = new Bar(); or a line number?

推荐答案

正如tbroyer建议的那样.

As suggested by tbroyer as a comment.

gwt-maven-plugin配置为failOnError:

<plugin>
  <groupId>net.ltgt.gwt.maven</groupId>
  <artifactId>gwt-maven-plugin</artifactId>
  <configuration>
    <failOnError>true</failOnError>
  </configuration>
</plugin>

输出列表中的错误之一将解释该问题.

And one of the errors in the output list will explain the problem.

这篇关于GWT绑定器:TypeOracle.getType("foo.Foo")返回null:如何获取实际错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆