<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<font size="4"><font face="monospace">I just noticed that in
BoundAttribute.BoundUnknownAttribute:<br>
<br>
private void
checkWriteSupported(Function<ConstantPool, Boolean>
condition) {<br>
if (!condition.apply(classReader))<br>
throw new UnsupportedOperationException("Write
of unknown attribute " + attributeName() + " not supported to
alien constant pool");<br>
}<br>
<br>
we should at least be checking the option "support unknown
attributes" before we say OK. <br>
<br>
Overall, I am not sure we have a fully consistent story for
unsupported attributes here. The basic problem with attributes
for which we don't have an AttributeMapper is that we can't be
sure about validity. We don't know where the CP indexes are
(though if we are sharing CPs, this is OK), and we don't know
what other data might be off. <br>
<br>
(We also have a bigger problem with the type annotations
attributes, which are known to have all sorts of non-CP offsets
(nth bound of mth type variable, nth exception, indexes into
code array, etc) which could easily but thrown off by
transformation and there is no practical way to detect whether
the original RVTA is still valid.)<br>
</font></font>
</body>
</html>