Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8151539

Remove duplicate AlwaysTrueClosures

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b115

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stefank Stefan Karlsson
                  Reporter:
                  stefank Stefan Karlsson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: