certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-dev] Bug jcert CertiLogicalTime


From: Sven Schultschik
Subject: [certi-dev] Bug jcert CertiLogicalTime
Date: Mon, 15 Oct 2012 14:31:45 +0200

Aloha,

the following is unlogical I think.

You are inside of CertiLogicalTime Class this means that getClass()
returns "CertiLogicalTime" and the addend have to be
LogicalTimeInterval, which means that getClass returns
CertiLogicalTimeIntervall which will be always true!

Am I that wrong or is this really a bug?

public void increaseBy(LogicalTimeInterval addend) throws
IllegalTimeArithmetic {
        if (getClass() != addend.getClass()) {
            throw new IllegalTimeArithmetic("Different implementation of
logical time supplied" + getClass() + addend.getClass());
        }

        time += ((CertiLogicalTimeInterval) addend).getInterval();
    }

regards

Sven




reply via email to

[Prev in Thread] Current Thread [Next in Thread]