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

Remove duplicate AlwaysTrueClosures

XMLWordPrintable

    • gc
    • b115

        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.

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

                Created:
                Updated:
                Resolved: