Skip to content

I20260325-1800

@trancexpress trancexpress tagged this 25 Mar 14:46
Calling NameLookup.findType() with flag checkRestrictions=true
results in  NameLookup.Answer containing the respective AccessRestriction
in the resulting NameLookup.Answer.

This change adds a method Answer.isForbidden(),
which can be used to determine if the type in the Answer is forbidden
according to the access rules of the types classpath entry.

Callers can then use this method to only use the found type,
if its not forbidden by classpath access rules.

Such checks are useful in the context of:

https://github.com/eclipse-pde/eclipse.pde/issues/2244

The PDE classpath container contains transitive dependencies,
with forbidden pattern '**/*'.

Fixes: #4964
Assets 2
Loading