-
Enhancement
-
Resolution: Fixed
-
P4
-
8, 9
-
b115
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8223191 | openjdk8u222 | Stefan Karlsson | P4 | Resolved | Fixed | b02 |
There are a number of AlwaysTrueClosures that only return true. For example:
class AlwaysTrueClosure: public BoolObjectClosure {
public:
bool do_object_b(oop p) { return true; }
};
The most common reason to create this closure is to be able to pass it to JNIHandles::weak_oops_do, to skip filtering dead oops.
This RFE proposes that we create an overloaded JNIHandles::weak_oops_do function that doesn't require a BoolObjectClosure instance to be passed as an argument. This will remove most ad-hoc AlwaysTrueClosures.
class AlwaysTrueClosure: public BoolObjectClosure {
public:
bool do_object_b(oop p) { return true; }
};
The most common reason to create this closure is to be able to pass it to JNIHandles::weak_oops_do, to skip filtering dead oops.
This RFE proposes that we create an overloaded JNIHandles::weak_oops_do function that doesn't require a BoolObjectClosure instance to be passed as an argument. This will remove most ad-hoc AlwaysTrueClosures.
- backported by
-
JDK-8223191 Remove duplicate AlwaysTrueClosures
- Resolved
- blocks
-
JDK-8222403 Shenandoah: Remove ShenandoahAlwaysTrueClosure, use AlwaysTrueClosure instead
- Resolved