• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing the interface

 
Zlatan Hajric
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I'm wondering if it's ok to change the interface provided by SUN.
I'm thinking of throwing an LockException on method lock together with RecordNotFoundException. This because I'd like the user to get more info about what went wrong while trying to lock a record. Now is that allowed or is the interface a don't touch just do kind of thing
 
Thomas Thevis
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No! Unless it is stated otherwise in your assignment. You have to implement the interface as it is provided.
 
Iván Párraga
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot change the interface, but if you launch a new not checked exception (extending RuntimeException for example), you can add a new required exception without changing the interface.

Cheers,

Iv�n
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic