mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
Improve readability by fixing wrong indentation levels
This commit is contained in:
parent
6d0bf04c1e
commit
48d5ef9522
4 changed files with 21 additions and 21 deletions
|
@ -316,9 +316,9 @@ public final class OmemoManager extends Manager {
|
|||
throws CryptoFailedException, UndecidedOmemoIdentityException,
|
||||
InterruptedException, SmackException.NotConnectedException,
|
||||
SmackException.NoResponseException, SmackException.NotLoggedInException, IOException {
|
||||
Set<BareJid> recipients = new HashSet<>();
|
||||
recipients.add(recipient);
|
||||
return encrypt(recipients, message);
|
||||
Set<BareJid> recipients = new HashSet<>();
|
||||
recipients.add(recipient);
|
||||
return encrypt(recipients, message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -506,8 +506,8 @@ public final class OmemoManager extends Manager {
|
|||
CryptoFailedException, CannotEstablishOmemoSessionException, IOException {
|
||||
XMPPConnection connection = connection();
|
||||
MessageBuilder message = connection.getStanzaFactory()
|
||||
.buildMessageStanza()
|
||||
.to(recipient.getJid());
|
||||
.buildMessageStanza()
|
||||
.to(recipient.getJid());
|
||||
|
||||
OmemoElement element = getOmemoService().createRatchetUpdateElement(new LoggedInOmemoManager(this), recipient);
|
||||
message.addExtension(element);
|
||||
|
@ -751,8 +751,8 @@ public final class OmemoManager extends Manager {
|
|||
*/
|
||||
public synchronized void rotateSignedPreKey()
|
||||
throws CorruptedOmemoKeyException, SmackException.NotLoggedInException, XMPPException.XMPPErrorException,
|
||||
SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException,
|
||||
IOException, PubSubException.NotALeafNodeException {
|
||||
SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException,
|
||||
IOException, PubSubException.NotALeafNodeException {
|
||||
if (!connection().isAuthenticated()) {
|
||||
throw new SmackException.NotLoggedInException();
|
||||
}
|
||||
|
@ -1037,7 +1037,7 @@ public final class OmemoManager extends Manager {
|
|||
OmemoDeviceListElement receivedDeviceList = (OmemoDeviceListElement) payloadItem.getPayload();
|
||||
try {
|
||||
getOmemoService().getOmemoStoreBackend().mergeCachedDeviceList(getOwnDevice(), from,
|
||||
receivedDeviceList);
|
||||
receivedDeviceList);
|
||||
|
||||
if (!from.asBareJid().equals(getOwnJid())) {
|
||||
continue;
|
||||
|
@ -1046,8 +1046,8 @@ public final class OmemoManager extends Manager {
|
|||
deviceList = getOmemoService().cleanUpDeviceList(getOwnDevice());
|
||||
} catch (IOException e) {
|
||||
LOGGER.log(Level.SEVERE,
|
||||
"IOException while processing OMEMO PEP device updates. Message: " + message,
|
||||
e);
|
||||
"IOException while processing OMEMO PEP device updates. Message: " + message,
|
||||
e);
|
||||
continue;
|
||||
}
|
||||
final OmemoDeviceListElement_VAxolotl newDeviceList = new OmemoDeviceListElement_VAxolotl(deviceList);
|
||||
|
|
|
@ -1141,8 +1141,8 @@ public abstract class OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey,
|
|||
OmemoBundleElement bundleElement = getOmemoStoreBackend().packOmemoBundle(userDevice);
|
||||
publishBundle(manager.getConnection(), userDevice, bundleElement);
|
||||
} catch (CorruptedOmemoKeyException | InterruptedException | SmackException.NoResponseException
|
||||
| SmackException.NotConnectedException | XMPPException.XMPPErrorException
|
||||
| NotALeafNodeException e) {
|
||||
| SmackException.NotConnectedException | XMPPException.XMPPErrorException
|
||||
| NotALeafNodeException e) {
|
||||
LOGGER.log(Level.WARNING, "Could not republish replenished bundle.", e);
|
||||
}
|
||||
}
|
||||
|
@ -1224,8 +1224,8 @@ public abstract class OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey,
|
|||
OmemoBundleElement bundleElement = getOmemoStoreBackend().packOmemoBundle(userDevice);
|
||||
publishBundle(manager.getConnection(), userDevice, bundleElement);
|
||||
} catch (CorruptedOmemoKeyException | InterruptedException | SmackException.NoResponseException
|
||||
| SmackException.NotConnectedException | XMPPException.XMPPErrorException
|
||||
| NotALeafNodeException e) {
|
||||
| SmackException.NotConnectedException | XMPPException.XMPPErrorException
|
||||
| NotALeafNodeException e) {
|
||||
LOGGER.log(Level.WARNING, "Could not republish replenished bundle.", e);
|
||||
}
|
||||
}
|
||||
|
@ -1307,8 +1307,8 @@ public abstract class OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey,
|
|||
OmemoBundleElement bundleElement = getOmemoStoreBackend().packOmemoBundle(userDevice);
|
||||
publishBundle(manager.getConnection(), userDevice, bundleElement);
|
||||
} catch (CorruptedOmemoKeyException | InterruptedException | SmackException.NoResponseException
|
||||
| SmackException.NotConnectedException | XMPPException.XMPPErrorException
|
||||
| NotALeafNodeException e) {
|
||||
| SmackException.NotConnectedException | XMPPException.XMPPErrorException
|
||||
| NotALeafNodeException e) {
|
||||
LOGGER.log(Level.WARNING, "Could not republish replenished bundle.", e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,9 +216,9 @@ public abstract class OmemoBundleElement implements ExtensionElement {
|
|||
.append(IDENTITY_KEY).append(": ").append(identityKeyB64).append('\n')
|
||||
.append(PRE_KEYS).append(" (").append(preKeysB64.size()).append(")\n");
|
||||
for (Map.Entry<Integer, String> e : preKeysB64.entrySet()) {
|
||||
sb.append(PRE_KEY_PUB).append(' ').append(PRE_KEY_ID).append("=").append(e.getKey()).append(": ").append(e.getValue()).append("\n");
|
||||
sb.append(PRE_KEY_PUB).append(' ').append(PRE_KEY_ID).append('=').append(e.getKey()).append(": ").append(e.getValue()).append('\n');
|
||||
}
|
||||
sb.append("]");
|
||||
sb.append(']');
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -152,8 +152,8 @@ public class OmemoMessageBuilder<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_
|
|||
* @throws IllegalBlockSizeException if the input data length is incorrect.
|
||||
*/
|
||||
private void setMessage(String message)
|
||||
throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException,
|
||||
InvalidKeyException, BadPaddingException, IllegalBlockSizeException {
|
||||
throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException,
|
||||
InvalidKeyException, BadPaddingException, IllegalBlockSizeException {
|
||||
if (message == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ public class OmemoMessageBuilder<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_
|
|||
|
||||
if (cipherTextWithoutAuthTag.length != cipherText.length - 16) {
|
||||
throw new IllegalArgumentException("Length of cipherTextWithoutAuthTag must be length of cipherText " +
|
||||
"- length of AuthTag (16)");
|
||||
"- length of AuthTag (16)");
|
||||
}
|
||||
|
||||
// Move auth tag from cipherText to messageKey
|
||||
|
|
Loading…
Reference in a new issue