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 + +