Change in ovirt-engine[master]: webadmin, userportal: GWT/P upgrade, part 5

Code Review gerrit at ovirt.org
Wed Mar 15 16:15:14 UTC 2017


>From Vojtech Szocs <vszocs at redhat.com>:

Vojtech Szocs has submitted this change and it was merged.

Change subject: webadmin,userportal: GWT/P upgrade, part 5
......................................................................


webadmin,userportal: GWT/P upgrade, part 5

- work around GWT issue 9476

  Example code that isolates the problem:

  public class Test {

    // T is effectively an "intersection" type, meaning it has to
    // satisfy both "HasChangeHandlers" and "HasValue<String>".

    <T extends HasChangeHandlers & HasValue<String>> T getFoo() {
      return null; // not important at compile time
    }

    public Test() {

      // Following line causes GWT compilation error.

      // When parsing Java source (using JDT) and mapping it onto
      // GWT AST via GwtAstBuilder, the compiler does not take an
      // "intersection" type into account, which causes internal
      // NPE that crashes the compiler.

      getFoo().setValue("");

      // Following code works around the problem, using explicit
      // type cast:

      ((HasValue<String>) getFoo()).setValue("");

    }

  }

Change-Id: I23ea8e7bb955c249117220acbddf04b8b65e3fb5
Related-To: https://github.com/gwtproject/gwt/issues/9476
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/section/main/presenter/OptionsPopupPresenterWidget.java
1 file changed, 6 insertions(+), 3 deletions(-)

Approvals:
  Alexander Wels: Looks good to me, approved
  Martin Betak: Looks good to me, but someone else must approve
  Greg Sheremeta: Looks good to me, approved
  Vojtech Szocs: Verified; Passed CI tests

Objections:
  Jenkins CI: Failed CI tests



-- 
To view, visit https://gerrit.ovirt.org/73553
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I23ea8e7bb955c249117220acbddf04b8b65e3fb5
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gshereme at redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Scott Dickerson <sdickers at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list