Uwe Schindler created LUCENE-7595:
-------------------------------------

             Summary: RAMUsageTester in test-framework and static field checker 
no longer works with Java 9
                 Key: LUCENE-7595
                 URL: https://issues.apache.org/jira/browse/LUCENE-7595
             Project: Lucene - Core
          Issue Type: Bug
          Components: general/test
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler


Lucene/Solr tests have a special rule that records memory usage in static 
fields before and after test, so we can detect memory leaks. This check dives 
into JDK classes (like java.lang.String to detect their size). As Java 9 build 
148 completely forbids setAccessible on any runtime class, we have to change or 
disable this check:

- As first step I will only add the rule to LTC, if we not have Java 8
- As a second step we might investigate how to improve this

[~rcmuir] had some ideas for the 2nd point:

- Don't dive into classes from JDK modules and instead "estimate" the size for 
some special cases (like Strings)
- Disallow any static field in tests that is not final (constant) and points to 
an Object except: Strings and native (wrapper) types.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to