Projects tigase _server server-core Issues #1398
When following the example code, the method package.getElemTo not found (#1398)
Closed
Unknown opened 4 years ago

https://docs.tigase.net/tigase-server/master-snapshot/Development_Guide/html/#componentdevelpoment

java compiler reports can not found getElemTo(), and also getElemFrom()

public int hashCodeForPacket(Packet packet) {
        if (packet.getElemTo() != null) {
            return packet.getElemTo().hashCode();
        }
        // This should not happen, every packet must have a destination
        // address, but maybe our SPAM checker is used for checking
        // strange kind of packets too....
        if (packet.getElemFrom() != null) {
            return packet.getElemFrom().hashCode();
        }
        // If this really happens on your system you should look carefully
        // at packets arriving to your component and decide a better way
        // to calculate hashCode
        return 1;
    }
Unknown commented 4 years ago

Thank you for mentioning it - the method was deprecated and you should use .getStanzaFrom() method. (fixed: https://github.com/tigase/tigase-server/commit/6bf8adc448e93307f01237a2833632c652cc78c5)

issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1398
Please wait...
Page is in error, reload to recover