Skip to content

Custom open modules windows #1139

Open
Open
@Domonion

Description

@Domonion

Description
Starting from JDK17 there are no special cli switch illegal-access which opens for reflection all jdk internal modules such as java.base - ref.

UtBot requires some internal jdk modules to be open for reflection. Current set of modules are available here. This set is used every time EngineProcess is started.

However, there can be many other modules which are used via reflection either directly or indirectly. Accessing them would break UTBot. Although we have OpenModulesContainer, it cannot suffice because:

  1. User code might have it's own modules
  2. User code might access internal modules in unpredictable way
  3. There are additional JDK providers which differs by JDK vendors - see Oracle internal modules used in sandbox #1138.

All 3 options implicate that whatever set of open modules we use - it is still possible for UTBot to access modules closed for reflection. This will break UTBot execution.

To mitigate that problem I propose to provide user a tool to customly set required modules open. The motivation is that user have much better understanding of the project UTBot is used on. In case if our module list is incomplete - he will manully provide additonal modules.

This feature involves:

  • At least 1 working example when our list is insufficient
  • Detect and catch all similar error
  • UI developement

Metadata

Metadata

Assignees

Labels

comp-uiImprovements of plugin UI appearence and functionalityctg-enhancementNew feature, improvement or change request

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions