However, most of the material that I have found about the FBC problem dates back to the late 90s, early 00s, so it makes me wonder if the 'problem' is no longer a major issue.
I think it's more that the issue is now well-understood. Similarly, you won't find too many recent papers discussing problems with GOTO
and how to address them, not because these problems no longer exist, but because people now know how to avoid them.
Is [the proposed class sealing mechanism] not basically the same thing as making classes default/package-private?
No. Package-private classes and "sealed" classes are similar in that both cannot be extended by classes outside the package, but they differ in that the former also cannot be used by classes outside the package. That is — if a class X
is package-private, then a class outside its package can't even refer to X
: no extends X
, no X x = new X()
, no Class<X> clazz = X.class
. But if it's merely sealed, then a class in a different package cannot write extends X
, but can still write X x = new X()
and Class<X> clazz = X.class
and so on. (Just as important, it can still write X x = new Y()
, if Y
is a subclass. So it can still take advantage of X
's type hierarchy, even though it itself can't extend X
.)