From 8aa145c91596b0ace30b32eb42c71bfea5aa9bbe Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Thu, 24 Mar 2016 16:01:21 +0100 Subject: [PATCH] IG: add description --- .../SynchronizationOnGetClass.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnGetClass.html diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnGetClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnGetClass.html new file mode 100644 index 000000000000..5bed14f4b91c --- /dev/null +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnGetClass.html @@ -0,0 +1,11 @@ + + +Reports synchronization on a call to getClass(). +If the class containing the synchronization is subclassed, the subclass will synchronize on a different class object. +Usually the call to getClass() can be replaced with a class literal expression, for example String.class. +An even better solution is synchronizing on a private static final lock object, access to which can be completely controlled. + +

+New in 16.2 + +