Lucene - Core
  1. Lucene - Core
  2. LUCENE-6923

Fix RamUsageEstimator's access to private fields

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      many classes have in their clinit something like:

      static final int BASE_SIZE = RamUsageEstimator.shallowSizeOf(...)
      

      This does inspection of private fields to compute the size, but requires RuntimePermission("accessDeclaredMembers").

        Activity

        Hide
        Robert Muir added a comment -

        Simple patch, so permission can be given just to lucene-core.jar

        I don't think returning the size of the class creates any security issue.

        Show
        Robert Muir added a comment - Simple patch, so permission can be given just to lucene-core.jar I don't think returning the size of the class creates any security issue.
        Hide
        Dawid Weiss added a comment -

        Looks good to me.

        Show
        Dawid Weiss added a comment - Looks good to me.
        Hide
        Uwe Schindler added a comment -

        +1

        Show
        Uwe Schindler added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1718195 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1718195 ]

        LUCENE-6923: Fix RamUsageEstimator to access private fields

        Show
        ASF subversion and git services added a comment - Commit 1718195 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1718195 ] LUCENE-6923 : Fix RamUsageEstimator to access private fields
        Hide
        ASF subversion and git services added a comment -

        Commit 1718197 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1718197 ]

        LUCENE-6923: Fix RamUsageEstimator to access private fields

        Show
        ASF subversion and git services added a comment - Commit 1718197 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1718197 ] LUCENE-6923 : Fix RamUsageEstimator to access private fields

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development