JDK-8216072 : Remove TaskTerminator's assignment operator
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 12,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-03
  • Updated: 2019-02-07
  • Resolved: 2019-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b07Fixed
Related Reports
Blocks :  
Relates :  
Description
During code review of JDK-8204947, Thomas Schatzl pointed out that, the assignment operator of TaskTerminator is undesirable, because it is actual a move assignment.

Removing the assignment operator is blocked by JDK-8215047. Once JDK-8215047 is fixed, we should remove the assignment operator. 
Comments
That's not really a move assign, it's something worse. Casting away constness in order to modify an object is potentially UB. Yes, please kill it. Also, there are problems with the other copy/assign poisoning declarations. Those with a non-const parameter are not needed and should be removed; definitions for those are not automatically generated, so don't need poisoning. (Removing them would also remove the need for suppressing Visual Studio warnings.) And the poisoning declarations should not have (even dummy) definitions, so that if mistakenly called from code with appropriate access there will still be an error (at link time). The usual idiom for making a class T non-copyable is to privately declare (but not define) 'T(const T&)' and 'T& operator=(const T&)'. (C++11 deleted functions are the "modern" approach.)
04-01-2019