Vojtech Szocs has posted comments on this change. Change subject: findbugs: Make inner classes static where possible ......................................................................
Patch Set 1: Code-Review+1 (1 comment) Giving +1 but it's basically +2 from my side. Regarding @GenEvent annotation used on non-static inner classes, as Allon wrote, this is due to how @GenEvent annotation processor (GenEventProcessor) works, it simply copies modifiers from annotated class when generating top-level class, so having "static" there would yield Java compile error. A workaround would be to make all classes annotated with @GenEvent top-level (not inner), the main reason is convenience (small inner class vs. separate top-level class). In future, we can make all classes annotated with @GenEvent top-level. BTW, it would be really nice if findbugs allowed suppressing "bugs" (like SIC_INNER_SHOULD_BE_STATIC) based on annotation presence, I guess this is not supported yet in findbugs. http://gerrit.ovirt.org/#/c/26227/1/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/resources/VmTable.java File frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/resources/VmTable.java: Line 462: } Line 463: Line 464: } Line 465: Line 466: class StyledCompositeCell<T> extends CompositeCell<T> { > did you miss this one? Alissa, I think that putting "static" here would violate Java language spec (compile error) as this is not considered an inner class. In other words, StyledCompositeCell is non-public top-level class, so "static" isn't applicable here. Line 467: Line 468: private final List<HasCell<T, ?>> hasCells; Line 469: private final StyledProvider<T> styleProvider; Line 470: -- To view, visit http://gerrit.ovirt.org/26227 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifbceb1baad596211580c1289f49f7d12e33a8ecb Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> Gerrit-Reviewer: Alissa Bonas <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Ravi Nori <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Vojtech Szocs <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
