1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Make Smack Java8's javac and javadoc ready

This commit is contained in:
Florian Schmaus 2015-04-03 19:15:35 +02:00
parent cf2027fce7
commit dc373f641c
18 changed files with 112 additions and 49 deletions

View file

@ -293,11 +293,7 @@ public class ICECandidate extends TransportCandidate implements Comparable<ICECa
checkThread.start();
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@ -382,6 +378,22 @@ public class ICECandidate extends TransportCandidate implements Comparable<ICECa
return true;
}
@Override
public int hashCode() {
int res = 37;
res = 37 * res + (getChannel() == null ? 0 : getChannel().hashCode());
res = 37 * res + (getId() == null ? 0 : getId().hashCode());
res = 37 * res + getNetwork();
res = 37 * res + (getPassword() == null ? 0 : getPassword().hashCode());
res = 37 * res + getPreference();
res = 37 * res + (getProto() == null ? 0 : getProto().hashCode());
res = 37 * res + (getUsername() == null ? 0 : getUsername().hashCode());
res = 37 * res + (getIp() == null ? 0 : getIp().hashCode());
res = 37 * res + getPort();
res = 37 * res + (getType() == null ? 0 : getType().hashCode());
return res;
}
public boolean isNull() {
if (super.isNull()) {
return true;

View file

@ -489,11 +489,7 @@ public abstract class TransportCandidate {
}
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@ -515,6 +511,14 @@ public abstract class TransportCandidate {
return true;
}
@Override
public int hashCode() {
if (value == null) {
return -1;
}
return value.hashCode();
}
/**
* Return true if the protocol is not valid.
*
@ -567,11 +571,7 @@ public abstract class TransportCandidate {
}
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@ -593,6 +593,14 @@ public abstract class TransportCandidate {
return true;
}
@Override
public int hashCode() {
if (value == null) {
return -1;
}
return value.hashCode();
}
/**
* Return true if the channel is not valid.
*