Friday, August 15, 2014

Can I use to replace a Google class?

Hi,

I am having problems running in hosted mode (GWT 2.6.1) as a result of a possible bug in com.google.gwt.dom.client.StyleInjector.java (see Issue 8863).

The fix is simple, so I have created my own version of the problem class in my Eclipse project, and specified a <replace-with /> in the module file:

    <replace-with class="com.db.patch.StyleInjectorImplIE">
        <when-type-is class="com.google.gwt.dom.client.StyleInjector.StyleInjectorImplIE"/>
    </replace-with>

It doesn't seem to work.  Using the debugger, I still see the code in the original class being executed, and the resulting ArrayIndexOutOfBoundsException is thrown.  Is there a reason why I can't replace this class?  If so, can anyone suggest a way to get my patch into the project, preferably without replacing or modifying gwt-user-2.6.1.jar?

It looks like the original StyleInjector.StyleInjectorImplIE may be replacing StyleInjector.StyleInjectorImplIE.  Does <replace-with /> recurse through multiple levels of replacement?  Is there a way to see what browser-specific replacements happen by default?

Thanks,

Chris

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment