Are you sure you're having the same AppPlaceHistoryMapper instance in both places?
If I were you, I'd rather write my module as:
@Provides @Singleton
PlaceHistoryMapperWithFactory<TokenizerFactory> providePlaceHistoryMapper(TokenizerFactory tf) {
PlaceHistoryMapperWithFactory<TokenizerFactory> hm = GWT.create(AppPlaceHistoryMapper.class);
hm.setFactory(tf);
return hm;
}
Alternatively, you can also remove that method entirely and simply override and annotate the setFactory method in your AppPlaceHistoryMapper interface:
public interface AppPlaceHistoryMapper extends PlaceHistoryMapperWithFactory<TokenizerFactory> {
@Inject
void setFactory(TokenizerFactory tf);
}
(BTW, why is your method annotated with @Inject?)
As for the difference between DevMode and prod mode, you should probably file a bug on GIN.