Yes, a normal-scoped producer of type java.nio.file.Path will never produce a proxy which extends UnixPath.
Given the following code
@Produce |
@ApplicationScoped |
public static final Path DIR = MyFactory.someMethodThatActuallyCreatesAnInstanceOfUnixPath();
|
So, if we reference `DIR` directly (i.e., without injecting it), its static type would be Path and its dynamic type would be UnixPath. Whereas, if we inject a reference somewhere then it may happen that while its static type is Path, its dynamic type is gone? Correct? Wow! That is unexpected. I would even go as far as to consider that a design flaw. |