Fix formatting

This commit is contained in:
AsamK 2015-10-06 21:45:39 +02:00
parent 2c86b0bd9a
commit 1781984221
6 changed files with 10 additions and 8 deletions

View file

@ -3,13 +3,15 @@ package cli;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.whispersystems.libaxolotl.*; import org.whispersystems.libaxolotl.AxolotlAddress;
import org.whispersystems.libaxolotl.IdentityKey;
import org.whispersystems.libaxolotl.IdentityKeyPair;
import org.whispersystems.libaxolotl.InvalidKeyIdException;
import org.whispersystems.libaxolotl.state.AxolotlStore; import org.whispersystems.libaxolotl.state.AxolotlStore;
import org.whispersystems.libaxolotl.state.PreKeyRecord; import org.whispersystems.libaxolotl.state.PreKeyRecord;
import org.whispersystems.libaxolotl.state.SessionRecord; import org.whispersystems.libaxolotl.state.SessionRecord;
import org.whispersystems.libaxolotl.state.SignedPreKeyRecord; import org.whispersystems.libaxolotl.state.SignedPreKeyRecord;
import java.io.IOException;
import java.util.List; import java.util.List;
class JsonAxolotlStore implements AxolotlStore { class JsonAxolotlStore implements AxolotlStore {

View file

@ -69,7 +69,7 @@ class JsonIdentityKeyStore implements IdentityKeyStore {
String trustedKeyName = trustedKey.get("name").asText(); String trustedKeyName = trustedKey.get("name").asText();
try { try {
trustedKeyMap.put(trustedKeyName, new IdentityKey(Base64.decode(trustedKey.get("identityKey").asText()), 0)); trustedKeyMap.put(trustedKeyName, new IdentityKey(Base64.decode(trustedKey.get("identityKey").asText()), 0));
} catch (InvalidKeyException | IOException e) { } catch (InvalidKeyException | IOException e) {
System.out.println(String.format("Error while decoding key for: %s", trustedKeyName)); System.out.println(String.format("Error while decoding key for: %s", trustedKeyName));
} }
} }

View file

@ -66,7 +66,7 @@ class JsonPreKeyStore implements PreKeyStore {
Integer preKeyId = preKey.get("id").asInt(); Integer preKeyId = preKey.get("id").asInt();
try { try {
preKeyMap.put(preKeyId, Base64.decode(preKey.get("record").asText())); preKeyMap.put(preKeyId, Base64.decode(preKey.get("record").asText()));
} catch (IOException e) { } catch (IOException e) {
System.out.println(String.format("Error while decoding prekey for: %s", preKeyId)); System.out.println(String.format("Error while decoding prekey for: %s", preKeyId));
} }
} }

View file

@ -87,7 +87,7 @@ class JsonSessionStore implements SessionStore {
String sessionName = session.get("name").asText(); String sessionName = session.get("name").asText();
try { try {
sessionMap.put(new AxolotlAddress(sessionName, session.get("deviceId").asInt()), Base64.decode(session.get("record").asText())); sessionMap.put(new AxolotlAddress(sessionName, session.get("deviceId").asInt()), Base64.decode(session.get("record").asText()));
} catch (IOException e) { } catch (IOException e) {
System.out.println(String.format("Error while decoding session for: %s", sessionName)); System.out.println(String.format("Error while decoding session for: %s", sessionName));
} }
} }

View file

@ -83,7 +83,7 @@ class JsonSignedPreKeyStore implements SignedPreKeyStore {
Integer preKeyId = preKey.get("id").asInt(); Integer preKeyId = preKey.get("id").asInt();
try { try {
preKeyMap.put(preKeyId, Base64.decode(preKey.get("record").asText())); preKeyMap.put(preKeyId, Base64.decode(preKey.get("record").asText()));
} catch (IOException e) { } catch (IOException e) {
System.out.println(String.format("Error while decoding prekey for: %s", preKeyId)); System.out.println(String.format("Error while decoding prekey for: %s", preKeyId));
} }
} }

View file

@ -56,8 +56,8 @@ class Manager {
private final static String URL = "https://textsecure-service.whispersystems.org"; private final static String URL = "https://textsecure-service.whispersystems.org";
private final static TrustStore TRUST_STORE = new WhisperTrustStore(); private final static TrustStore TRUST_STORE = new WhisperTrustStore();
public final static String PROJECT_NAME = Manager.class.getPackage().getImplementationTitle(); public final static String PROJECT_NAME = Manager.class.getPackage().getImplementationTitle();
public final static String PROJECT_VERSION = Manager.class.getPackage().getImplementationVersion(); public final static String PROJECT_VERSION = Manager.class.getPackage().getImplementationVersion();
private final static String USER_AGENT = PROJECT_NAME + " " + PROJECT_VERSION; private final static String USER_AGENT = PROJECT_NAME + " " + PROJECT_VERSION;
private final static String settingsPath = System.getProperty("user.home") + "/.config/textsecure"; private final static String settingsPath = System.getProperty("user.home") + "/.config/textsecure";