I have the following class:
public class MPCOSFileAccessCardService extends MPCOSCardService
implements FileAccessCardService {
and another class that extends the previous:
public class MPCOSSecureFileAccess extends MPCOSFileAccessCardService
In main method there is the following line:
MPCOSFileAccessCardService facs = (MPCOSFileAccessCardService)
sc.getCardService(FileAccessCardService.class, true);
With the above line in main everything works fine. When I try to cast the
second class:
MPCOSSecureFileAccess facs = (MPCOSSecureFileAccess)
sc.getCardService(FileAccessCardService.class, true);
the program compiles but I get a runtime error:
Exception in thread "main" java.lang.ClassCastException:
mpcos.service.MPCOSFileAccessCardService
at Test.main(Test.java:41)
Can anyone tell me why is this?
---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
! [EMAIL PROTECTED]
! containing the word
! unsubscribe
! in the body.