[messages] [Developers] Custom class version checks

uckelman uckelman at nomic.net
Thu Jul 24 00:05:19 CEST 2014

I've looked into adding a class version check which happens when at
class is imported in the Editor. Unfortunately, doing this is quite
awkward because the place where class importation happens,
ConfigureTree.importConfigurable(), is relying on the DataArchive's
implementation of ClassLoader.  The only place you have the bytes which
comprise the class file is inside one of the ClassLoader methods, and
you have to have the bytes at offsets 5-8 in the class file to get the
version information. The Class class doesn't provide any mechanism for
getting them. So, we never have access to the bytes comprising the class
file inside importConfigurable(), nor do we even know where to look for
them from there---it's all hidden by the way that ClassLoaders work.

I think this means that a check at import time is not feasible without
some invasive restructuring.

What do you guys think in light of that---introduce the check I
originallly proposed, or not?

Read this topic online here:

More information about the messages mailing list