Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SecurityException

 
David Abramowicz
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!

This may be a stupid question but....

It is stated in my assignment that:

"Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package"

SecurityException is mentioned in the interface AND avail in the java.lang package, does that mean I don't have to implement it?

Thanks /Dave
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David Abramowicz:
Hi All!

This may be a stupid question but....

It is stated in my assignment that:

"Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package"

SecurityException is mentioned in the interface AND avail in the java.lang package, does that mean I don't have to implement it?

Thanks /Dave


It's not a stupid question, it has been asked before, but I don't think there was a definitive answer. I'm using the unchecked java.lang.SecurityException since the events that can throw it are unrecoverable errors and its available. The description says its thrown by a SecurityManager, but that doesn't prevent your code from throwing it. Some people say that you should use a checked suncertify.db.SecurityException. Whichever choice you make be sure to discuss it in your choices document.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic