Re: Revisiting "lost codebases"
cowwoc <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
Not a bad idea. The only catch I see is that a node has no way of
verifying the validity of a hash without the source-code. Meaning, if A
sends B a copy of class Foo with version 123, B cannot verify that the
hash is correct. Practically speaking, however, if you trust B enough to
accept a class file from him then you probably trust his hash (is that
true?).
I'm not familiar with any (simple) tools for building an AST from the
source-code. ASM (http://asm.objectweb.org/) builds an AST from a class
file. Any ideas?
Thanks,
Gili
Christopher G. Stach II wrote:
> cowwoc wrote:
>> Which brings up the question: Does anyone have a better idea for how to
>> determine whether two classes are the same version? One can't even hash
>> the source-code because whitespace could have changed.
>>
>> I define "same version" meaning that the interface *and* the
>> implementation is the same.
>>
>> Gili
>
> You'd probably want to build an AST of the source and hash that.
>
> --
> Christopher G. Stach II
>
> --------------------------------------------------------------------------
> Getting Started: http://www.jini.org/wiki/Category:Getting_Started
> Community Web Site: http://jini.org
> jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
> Unsubscribing: email "signoff JINI-USERS" to [email protected]
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to [email protected]
signature.asc
(application/pgp-signature, 250 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGQ1I9IC8Z3eiKRrQRAvbIAJ95KC6xkFkGSahcXHS37adNdW+PJwCfb+u/ ZJB7LJUCUZvGTNrrOfyu/I4= =bYIh -----END PGP SIGNATURE-----