Asaf Shakarchi has uploaded a new change for review. Change subject: webadmin: Bypassing findbugs issue of incorrect lazy initialization. ......................................................................
webadmin: Bypassing findbugs issue of incorrect lazy initialization. Findbug is referencing a potential threading issue where in a multi thread environment, there would be potential situation where the lazy initialization of windowsOsTypes in AsyncDataProvider:getWindowsOsTypes() will creat more than once instnace. With GWT, synchronizing the method has no meaning except bypassing findbugs warning as the code compiles to javascript and is executed in single thread anyway. Change-Id: I599d8418bf6e326564354e6173603fd974af1a7a Signed-off-by: Asaf Shakarchi <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/25/11725/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java index 4490966..c34776a 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java @@ -2769,7 +2769,7 @@ private static ArrayList<VmOsType> windowsOsTypes; - public static ArrayList<VmOsType> GetWindowsOsTypes() + public synchronized static ArrayList<VmOsType> GetWindowsOsTypes() { if (windowsOsTypes != null) { -- To view, visit http://gerrit.ovirt.org/11725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I599d8418bf6e326564354e6173603fd974af1a7a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Asaf Shakarchi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
