i am implementing a custom version of the java.util.Map interface.
my custom version does some encryption stuff when making modifications to
the map via one of the 4 modification methods (put, putAll, remove, and
clear).
in doing this, i would like to also use one of my own exception objects...
so these 4 methods in the custom version should now also be defined with:
throws EncryptionException
because EncryptionException is not a subclass of RuntimeException.
this is a good thing, as i need it to be caught for proper error checking,
so making EncryptionException a subclass of RuntimeException is not an
acceptable solution.
the problem is, when i try to compile i get the error that my custom
methods cannot implement the defined versions in java.util.Map because the
defined versions don't specify that EncryptionException is thrown.
is it just me, or does this seem like a fairly large limitation in java?
is there an elegant way around this?
thanks,
murat
--
Murat Tasan
mx**@po.cwru.edu
ta***@eecs.cwru.edu
mu*********@cwru.edu
http://genomics.cwru.edu