Whitespace-only code formatting changes.

This commit is contained in:
akwizgran
2015-11-30 09:38:25 +00:00
parent 1950c13ffb
commit 027ae8340f
202 changed files with 2993 additions and 2993 deletions

View File

@@ -17,10 +17,10 @@ public class Author {
int length;
try {
length = name.getBytes("UTF-8").length;
} catch(UnsupportedEncodingException e) {
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
if(length == 0 || length > MAX_AUTHOR_NAME_LENGTH)
if (length == 0 || length > MAX_AUTHOR_NAME_LENGTH)
throw new IllegalArgumentException();
this.id = id;
this.name = name;

View File

@@ -14,7 +14,7 @@ public class AuthorId extends UniqueId {
@Override
public boolean equals(Object o) {
if(o instanceof AuthorId)
if (o instanceof AuthorId)
return Arrays.equals(id, ((AuthorId) o).id);
return false;
}

View File

@@ -21,13 +21,13 @@ public class Bytes {
public int hashCode() {
// Thread-safe because if two or more threads check and update the
// value, they'll calculate the same value
if(hashCode == -1) hashCode = Arrays.hashCode(bytes);
if (hashCode == -1) hashCode = Arrays.hashCode(bytes);
return hashCode;
}
@Override
public boolean equals(Object o) {
if(o instanceof Bytes)
if (o instanceof Bytes)
return Arrays.equals(bytes, ((Bytes) o).bytes);
return false;
}

View File

@@ -31,7 +31,7 @@ public class Contact {
@Override
public boolean equals(Object o) {
if(o instanceof Contact) return id.equals(((Contact) o).id);
if (o instanceof Contact) return id.equals(((Contact) o).id);
return false;
}
}

View File

@@ -23,7 +23,7 @@ public class ContactId {
@Override
public boolean equals(Object o) {
if(o instanceof ContactId) return id == ((ContactId) o).id;
if (o instanceof ContactId) return id == ((ContactId) o).id;
return false;
}
}

View File

@@ -17,9 +17,9 @@ abstract class StringMap extends Hashtable<String, String> {
public boolean getBoolean(String key, boolean defaultValue) {
String s = get(key);
if(s == null) return defaultValue;
if("true".equals(s)) return true;
if("false".equals(s)) return false;
if (s == null) return defaultValue;
if ("true".equals(s)) return true;
if ("false".equals(s)) return false;
return defaultValue;
}

View File

@@ -10,7 +10,7 @@ public class TransportId {
private final String id;
public TransportId(String id) {
if(id.length() == 0 || id.length() > MAX_TRANSPORT_ID_LENGTH)
if (id.length() == 0 || id.length() > MAX_TRANSPORT_ID_LENGTH)
throw new IllegalArgumentException();
this.id = id;
}
@@ -21,7 +21,7 @@ public class TransportId {
@Override
public boolean equals(Object o) {
if(o instanceof TransportId) return id.equals(((TransportId) o).id);
if (o instanceof TransportId) return id.equals(((TransportId) o).id);
return false;
}

View File

@@ -12,7 +12,7 @@ public abstract class UniqueId {
private int hashCode = -1;
protected UniqueId(byte[] id) {
if(id.length != LENGTH) throw new IllegalArgumentException();
if (id.length != LENGTH) throw new IllegalArgumentException();
this.id = id;
}
@@ -24,7 +24,7 @@ public abstract class UniqueId {
public int hashCode() {
// Thread-safe because if two or more threads check and update the
// value, they'll calculate the same value
if(hashCode == -1) hashCode = Arrays.hashCode(id);
if (hashCode == -1) hashCode = Arrays.hashCode(id);
return hashCode;
}
}

View File

@@ -8,7 +8,7 @@ public class SecretKey {
private final byte[] key;
public SecretKey(byte[] key) {
if(key.length != LENGTH) throw new IllegalArgumentException();
if (key.length != LENGTH) throw new IllegalArgumentException();
this.key = key;
}

View File

@@ -16,12 +16,12 @@ public class Group {
int length;
try {
length = name.getBytes("UTF-8").length;
} catch(UnsupportedEncodingException e) {
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
if(length == 0 || length > MAX_GROUP_NAME_LENGTH)
if (length == 0 || length > MAX_GROUP_NAME_LENGTH)
throw new IllegalArgumentException();
if(salt.length != GROUP_SALT_LENGTH)
if (salt.length != GROUP_SALT_LENGTH)
throw new IllegalArgumentException();
this.id = id;
this.name = name;

View File

@@ -15,7 +15,7 @@ public class GroupId extends UniqueId {
@Override
public boolean equals(Object o) {
if(o instanceof GroupId)
if (o instanceof GroupId)
return Arrays.equals(id, ((GroupId) o).id);
return false;
}

View File

@@ -16,7 +16,7 @@ public class MessageId extends UniqueId {
@Override
public boolean equals(Object o) {
if(o instanceof MessageId)
if (o instanceof MessageId)
return Arrays.equals(id, ((MessageId) o).id);
return false;
}

View File

@@ -63,7 +63,7 @@ public class TemporarySecret extends Endpoint {
@Override
public boolean equals(Object o) {
if(o instanceof TemporarySecret) {
if (o instanceof TemporarySecret) {
TemporarySecret s = (TemporarySecret) o;
return contactId.equals(s.contactId) &&
transportId.equals(s.transportId) && period == s.period;