Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 959164

Pages: 1
Anonymous
Unregistered




Small bug in sample code.
      #10704 - 08/16/04 07:33 AM

see the public static void checkPermission()
Change the line:
if (e.getClassName().equals("SecurityBlanket")
&&
e.getMethodName().equals("checkPermission"))
break;
}

in

if (e.getClassName().equals("SecurityBlanket")
||
e.getMethodName().equals("checkPermission"))
break;
}


So And has to be Or.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Anonymous
Unregistered




Re: Small bug in sample code. [Re: Anonymous]
      #10761 - 08/17/04 01:15 PM

Why is that an error? It should be "and" because we want to find the point in the stack trace where the classname is SecurityBlanket AND the method name is checkPermission.

So, it is NOT an error.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 9106

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5