• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do I have to creare own SecurityException?

 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I run TestJarSubmission.java submitted by Roel De Nijs and my submission jar looked ok.

But then I found SecurityException. Do I have to create the own class for that? Now it is java.lang.SecurityException.

BR,

Mika
 
Roel De Nijs
Sheriff
Posts: 10666
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mika,

I think you have to, because otherwise the given interface won't compile (lack of import of java.lang.SecurityException).

Kind regards,
Roel
 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I think DB interface doesn't need import java.lang.SecurityException, because package java.lang is imported by default.

But maybe java.lang.SecurityException is not allowed, because the security manager is not allowed and in the javadoc of the java.lang.SecurityException is:

Thrown by the security manager to indicate a security violation.

So I have to create my own SecurityException.

Mika
 
Roel De Nijs
Sheriff
Posts: 10666
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mika Tapanainen wrote:package java.lang is imported by default.

I wasn't aware of that and I'm already since 2004 a Java Developer: big and a little bit ashamed. But never too old to learn

But still I think you should create the exception yourself.

Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic