• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Do you have to implemente SecurityException?

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I have to create a class for it or I can use it as java's SecurityException...
 
Ranch Hand
Posts: 590
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Might be of use...
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sean Keane wrote:Might be of use...



Well I did read before I posted but... I'm still unsure if I should implement it.. since is kind of meaningless
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you should create your own SecurityException, instead of using the one in Java's API.
 
Ranch Hand
Posts: 159
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just create your own SecurityException as a member of the suncertify.db package.
That's all. Now focus on the next issue Good luck!
 
Sean Keane
Ranch Hand
Posts: 590
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ixus See wrote:

Sean Keane wrote:Might be of use...



Well I did read before I posted but... I'm still unsure if I should implement it.. since is kind of meaningless



The very first result from Google answers your question, no?

What do you think the exception is meaningless?
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excuse me, but... what advantages can be of using own suncertify.db.SecurityException instead of standard java.lang.SecurityException ?
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.SecurityException has a specific meaning:

Javadocs wrote:Thrown by the security manager to indicate a security violation.


I think it's misleading to use it for something else, which is why I implemented my own. In my opinion, it's just a coincidence that there's a core library exception with the same name.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dmitri Cherkas wrote:what advantages can be of using own suncertify.db.SecurityException instead of standard java.lang.SecurityException ?


No real advantages. But the exception from java.lang has (according to its documentation) nothing to do with the exception in the given interface and therefore I would suggest creating your own exception.
 
Dmitri Cherkas
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be if I will write in my choices.txt :

"I implement my own suncertify.db.SecurityException because following to my assignment instructions : I "must not require the installation of a security manager." and from API of java.lang.SecurityException : "Thrown by the security manager to indicate a security violation." therefore it seems that java.lang.SecurityException is bind to using of security manager."

Does seem it logic ?

I think to do my suncertify.db.SecurityException as unchecked exception, is it a good choice ?
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dmitri Cherkas wrote:I think to do my suncertify.db.SecurityException as unchecked exception, is it a good choice ?


To me it can only be an unchecked exception, so
 
Dmitri Cherkas
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Roel, thank you Matthew !
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic