The JRTIndex file, used by javac, will soon need to handle preview mode for the JRT file system in the up-coming Valhalla changes.
Jan Lahoda suggests that (apart from small things like 'isInJrt()'), the bulk of the class, including how it opens the JRT file system, should only exist for code compiled via '--source 8', which would let us side-step the question of finding the preview mode later, since in that case it must be 'false'.
Since the bulk of this work doesn't directly involve preview mode, it seems it would be better to go into the JDK mainline first.
Jan Lahoda suggests that (apart from small things like 'isInJrt()'), the bulk of the class, including how it opens the JRT file system, should only exist for code compiled via '--source 8', which would let us side-step the question of finding the preview mode later, since in that case it must be 'false'.
Since the bulk of this work doesn't directly involve preview mode, it seems it would be better to go into the JDK mainline first.