문제

I have a Ginjector:

@GinModules(FooGinModule.class)
public interface FooGinjector extends Ginjector {

  ...

  PlaceHistoryHandler historyHandler();

}

Whenever I call injector.historyHandler(), I get a null pointer exception. (The injector itself is not null.) How can I debug this? The error message printed to Chrome's console is not helpful - it just says "null pointer exception".

도움이 되었습니까?

해결책

Pass the -gen option to the dev mode or compiler so you can look at the generated code for the class implementing your FooGinjector.

If you're running in dev mode, you can even add the -gen folder to your source path in Eclipse and then step into the generated code during your debugging session.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top