From 75ef76d19cb0bfda30c9fc8a3b46586cce5beb02 Mon Sep 17 00:00:00 2001 From: Arne Augenstein Date: Fri, 22 Sep 2017 18:55:07 +0200 Subject: [PATCH 1/8] Add spotless --- build.gradle | 20 +++ spotless.eclipseformat.xml | 314 +++++++++++++++++++++++++++++++++++++ 2 files changed, 334 insertions(+) create mode 100644 spotless.eclipseformat.xml diff --git a/build.gradle b/build.gradle index 3e50de5..2e8f6b2 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,10 @@ * along with this program. If not, see . */ +plugins { + id "com.diffplug.gradle.spotless" version "3.5.2" +} + group = 'io.kamax' version = '0.0.2' @@ -67,3 +71,19 @@ uploadArchives { } } } + +// Settings for automatic code formatting +compileJava.dependsOn { spotlessApply } + +spotless { + format 'misc', { + target '**/*.gradle', '**/*.md', '**/.gitignore' + + trimTrailingWhitespace() + indentWithSpaces() + endWithNewline() + } + java { + eclipse().configFile 'spotless.eclipseformat.xml' + } +} diff --git a/spotless.eclipseformat.xml b/spotless.eclipseformat.xml new file mode 100644 index 0000000..f92ec90 --- /dev/null +++ b/spotless.eclipseformat.xml @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 495e1351306b8ab40168c429e999868f752bf770 Mon Sep 17 00:00:00 2001 From: Arne Augenstein Date: Fri, 22 Sep 2017 18:56:33 +0200 Subject: [PATCH 2/8] Apply initial formatting --- src/main/java/io/kamax/matrix/_MatrixID.java | 9 +++-- .../matrix/client/AMatrixHttpClient.java | 6 ++-- .../matrix/client/MatrixClientContext.java | 3 +- .../matrix/client/MatrixHttpContent.java | 21 ++++++++---- .../kamax/matrix/client/MatrixHttpRoom.java | 34 +++++++++++++------ .../kamax/matrix/client/MatrixHttpUser.java | 6 ++-- .../as/MatrixApplicationServiceClient.java | 9 +++-- .../client/regular/MatrixHttpClient.java | 3 +- .../io/kamax/matrix/event/_RoomEvent.java | 1 - .../kamax/matrix/event/_RoomMessageEvent.java | 1 - .../matrix/json/event/MatrixJsonEvent.java | 1 - .../event/MatrixJsonRoomMembershipEvent.java | 3 +- .../java/io/kamax/matrix/MatrixIDTest.java | 1 - 13 files changed, 61 insertions(+), 37 deletions(-) diff --git a/src/main/java/io/kamax/matrix/_MatrixID.java b/src/main/java/io/kamax/matrix/_MatrixID.java index e8a1480..c6868fb 100644 --- a/src/main/java/io/kamax/matrix/_MatrixID.java +++ b/src/main/java/io/kamax/matrix/_MatrixID.java @@ -29,21 +29,24 @@ public interface _MatrixID { String getDomain(); /** - * Render this Matrix ID strictly valid. In technical term, transform this ID so isValid() returns true. + * Render this Matrix ID strictly valid. In technical term, transform this ID so + * isValid() returns true. * * @return A canonical Matrix ID */ _MatrixID canonicalize(); /** - * If the Matrix ID is strictly valid in the protocol as per http://matrix.org/docs/spec/intro.html#user-identifiers + * If the Matrix ID is strictly valid in the protocol as per + * http://matrix.org/docs/spec/intro.html#user-identifiers * * @return true if strictly valid, false if not */ boolean isValid(); /** - * If the Matrix ID is acceptable in the protocol as per http://matrix.org/docs/spec/intro.html#historical-user-ids + * If the Matrix ID is acceptable in the protocol as per + * http://matrix.org/docs/spec/intro.html#historical-user-ids * * @return */ diff --git a/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java b/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java index 3f88573..2ccffe5 100644 --- a/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java +++ b/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java @@ -127,10 +127,8 @@ protected URI getMediaPath(String action) { } protected HttpEntity getJsonEntity(Object o) { - return EntityBuilder.create() - .setText(gson.toJson(o)) - .setContentType(ContentType.APPLICATION_JSON) - .build(); + return EntityBuilder.create().setText(gson.toJson(o)) + .setContentType(ContentType.APPLICATION_JSON).build(); } } diff --git a/src/main/java/io/kamax/matrix/client/MatrixClientContext.java b/src/main/java/io/kamax/matrix/client/MatrixClientContext.java index 09fe2f4..6f510ee 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixClientContext.java +++ b/src/main/java/io/kamax/matrix/client/MatrixClientContext.java @@ -34,7 +34,8 @@ public MatrixClientContext(_MatrixHomeserver hs, _MatrixID user, String token) { this(hs, user, token, false); } - public MatrixClientContext(_MatrixHomeserver hs, _MatrixID user, String token, boolean isVirtualUser) { + public MatrixClientContext(_MatrixHomeserver hs, _MatrixID user, String token, + boolean isVirtualUser) { this.hs = hs; this.user = user; this.token = token; diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java b/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java index 48b56ad..89a9be8 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java @@ -67,19 +67,23 @@ private synchronized void load() { try { if (!StringUtils.equalsIgnoreCase("mxc", address.getScheme())) { - log.error("{} is not a supported protocol for avatars, ignoring", address.getScheme()); + log.error("{} is not a supported protocol for avatars, ignoring", + address.getScheme()); } else { URI path = getMediaPath("/download/" + address.getHost() + address.getPath()); try (CloseableHttpResponse res = client.execute(log(new HttpGet(path)))) { if (res.getStatusLine().getStatusCode() != 200) { if (res.getStatusLine().getStatusCode() == 404) { - log.info("Media {} does not exist on the HS {}", address.toString(), getContext().getHs().getDomain()); + log.info("Media {} does not exist on the HS {}", address.toString(), + getContext().getHs().getDomain()); } else { - Charset charset = ContentType.getOrDefault(res.getEntity()).getCharset(); + Charset charset = ContentType.getOrDefault(res.getEntity()) + .getCharset(); String body = IOUtils.toString(res.getEntity().getContent(), charset); MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - log.error("Couldn't get content data for {}: {} - {}", address.toString(), info.getErrcode(), info.getError()); + log.error("Couldn't get content data for {}: {} - {}", + address.toString(), info.getErrcode(), info.getError()); } } else { HttpEntity entity = res.getEntity(); @@ -88,7 +92,8 @@ private synchronized void load() { } else { Header contentType = entity.getContentType(); if (contentType == null) { - log.info("No content type was given, unable to process avatar data"); + log.info( + "No content type was given, unable to process avatar data"); } else { type = contentType.getValue(); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); @@ -96,9 +101,11 @@ private synchronized void load() { data = outStream.toByteArray(); isValid = true; - Header contentDisposition = res.getFirstHeader("Content-Disposition"); + Header contentDisposition = res + .getFirstHeader("Content-Disposition"); if (contentDisposition != null) { - Matcher m = filenamePattern.matcher(contentDisposition.getValue()); + Matcher m = filenamePattern + .matcher(contentDisposition.getValue()); if (m.find()) { filename = m.group("filename"); } diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java b/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java index 3c5f649..bd74f52 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java @@ -90,10 +90,12 @@ public Optional getName() { log.warn("Request was rate limited", new Exception()); } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - throw new IOException("Couldn't get name for room " + roomId + " - " + info.getErrcode() + ": " + info.getError()); + throw new IOException("Couldn't get name for room " + roomId + " - " + + info.getErrcode() + ": " + info.getError()); } - return Optional.of(jsonParser.parse(body).getAsJsonObject().get("name").getAsString()); + return Optional + .of(jsonParser.parse(body).getAsJsonObject().get("name").getAsString()); } } catch (IOException e) { throw new MatrixClientRequestException(e); @@ -120,10 +122,12 @@ public Optional getTopic() { log.warn("Request was rate limited", new Exception()); } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - throw new MatrixClientRequestException(info, "Couldn't get topic for room " + roomId); + throw new MatrixClientRequestException(info, + "Couldn't get topic for room " + roomId); } - return Optional.of(jsonParser.parse(body).getAsJsonObject().get("topic").getAsString()); + return Optional + .of(jsonParser.parse(body).getAsJsonObject().get("topic").getAsString()); } } catch (IOException e) { throw new MatrixClientRequestException(e); @@ -151,7 +155,8 @@ public void join() { MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); if (res.getStatusLine().getStatusCode() == 403) { - log.error("Failed to join room, we are not allowed: {} - {}", info.getErrcode(), info.getError()); + log.error("Failed to join room, we are not allowed: {} - {}", info.getErrcode(), + info.getError()); } else { throw new MatrixClientRequestException(info, "Error joining for " + getUser()); } @@ -188,9 +193,12 @@ public void leave() { MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); if (res.getStatusLine().getStatusCode() == 403) { - log.debug("Failed to leave room, we are not allowed, most likely already left: {} - {}", info.getErrcode(), info.getError()); + log.debug( + "Failed to leave room, we are not allowed, most likely already left: {} - {}", + info.getErrcode(), info.getError()); } else { - throw new MatrixClientRequestException(info, "Error when leaving room " + roomId + " as " + getUser()); + throw new MatrixClientRequestException(info, + "Error when leaving room " + roomId + " as " + getUser()); } } } @@ -201,7 +209,8 @@ public void leave() { private void sendMessage(RoomMessageTextPutBody content) { try { - URI path = getClientPath("/rooms/{roomId}/send/m.room.message/" + System.currentTimeMillis()); + URI path = getClientPath( + "/rooms/{roomId}/send/m.room.message/" + System.currentTimeMillis()); HttpPut req = new HttpPut(path); req.setEntity(getJsonEntity(content)); @@ -221,7 +230,8 @@ private void sendMessage(RoomMessageTextPutBody content) { if (res.getStatusLine().getStatusCode() == 403) { log.error("Failed send message, we are not allowed: {}", info.getError()); } else { - throw new IOException("Error sending message for " + getUser() + " - " + info.getErrcode() + ": " + info.getError()); + throw new IOException("Error sending message for " + getUser() + " - " + + info.getErrcode() + ": " + info.getError()); } } } @@ -273,10 +283,12 @@ public List<_MatrixID> getJoinedUsers() { log.warn("Request was rate limited", new Exception()); } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - throw new IOException("Couldn't list joined users in " + roomId + " - " + info.getErrcode() + ": " + info.getError()); + throw new IOException("Couldn't list joined users in " + roomId + " - " + + info.getErrcode() + ": " + info.getError()); } - JsonObject joinedUsers = jsonParser.parse(body).getAsJsonObject().get("joined").getAsJsonObject(); + JsonObject joinedUsers = jsonParser.parse(body).getAsJsonObject().get("joined") + .getAsJsonObject(); List<_MatrixID> ids = new ArrayList<>(); for (Map.Entry entry : joinedUsers.entrySet()) { ids.add(new MatrixID(entry.getKey())); diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java b/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java index eff3b5a..817a9de 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java @@ -76,7 +76,8 @@ public Optional getName() { } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - log.error("Couldn't get the displayname of {}: {} - {}", mxId, info.getErrcode(), info.getError()); + log.error("Couldn't get the displayname of {}: {} - {}", mxId, + info.getErrcode(), info.getError()); return Optional.empty(); } @@ -114,7 +115,8 @@ public Optional<_MatrixContent> getAvatar() { } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - log.error("Couldn't get the avatar_url of {}: {} - {}", mxId, info.getErrcode(), info.getError()); + log.error("Couldn't get the avatar_url of {}: {} - {}", mxId, info.getErrcode(), + info.getError()); return Optional.empty(); } diff --git a/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java b/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java index 9e3dc32..06e3a95 100644 --- a/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java +++ b/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java @@ -39,7 +39,8 @@ import java.net.URI; import java.nio.charset.Charset; -public class MatrixApplicationServiceClient extends MatrixHttpClient implements _MatrixApplicationServiceClient { +public class MatrixApplicationServiceClient extends MatrixHttpClient + implements _MatrixApplicationServiceClient { private Logger log = LoggerFactory.getLogger(MatrixApplicationServiceClient.class); @@ -48,7 +49,8 @@ public MatrixApplicationServiceClient(_MatrixHomeserver hs, String token, String } private MatrixHttpClient createClient(String localpart) { - return new MatrixHttpClient(new MatrixClientContext(getHomeserver(), getMatrixId(localpart), getAccessToken(), true)); + return new MatrixHttpClient(new MatrixClientContext(getHomeserver(), getMatrixId(localpart), + getAccessToken(), true)); } @Override @@ -70,7 +72,8 @@ public _MatrixClient createUser(String localpart) { log.warn("User {} already exists, ignoring", localpart); } else { // TODO turn into dedicated exceptions, following the Spec distinct errors - throw new MatrixClientRequestException(info, "Error creating the new user " + localpart); + throw new MatrixClientRequestException(info, + "Error creating the new user " + localpart); } } } diff --git a/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java b/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java index 472ba08..8f6e847 100644 --- a/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java +++ b/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java @@ -69,7 +69,8 @@ public void setDisplayName(String name) { Charset charset = ContentType.getOrDefault(res.getEntity()).getCharset(); String body = IOUtils.toString(res.getEntity().getContent(), charset); MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - throw new MatrixClientRequestException(info, "Error changing display name for " + getUser()); + throw new MatrixClientRequestException(info, + "Error changing display name for " + getUser()); } } } catch (IOException e) { diff --git a/src/main/java/io/kamax/matrix/event/_RoomEvent.java b/src/main/java/io/kamax/matrix/event/_RoomEvent.java index b216cfb..89e3b5a 100644 --- a/src/main/java/io/kamax/matrix/event/_RoomEvent.java +++ b/src/main/java/io/kamax/matrix/event/_RoomEvent.java @@ -20,7 +20,6 @@ package io.kamax.matrix.event; - public interface _RoomEvent extends _MatrixEvent { String getRoomId(); diff --git a/src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java b/src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java index 0896598..a6c99fa 100644 --- a/src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java +++ b/src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java @@ -20,7 +20,6 @@ package io.kamax.matrix.event; - public interface _RoomMessageEvent extends _RoomEvent { String getBody(); diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java index e0b3c48..ae03e85 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java @@ -20,7 +20,6 @@ package io.kamax.matrix.json.event; - import com.google.gson.JsonObject; import io.kamax.matrix.MatrixID; import io.kamax.matrix._MatrixID; diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java index f034f48..dec430a 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java @@ -28,7 +28,8 @@ import java.util.Optional; -public class MatrixJsonRoomMembershipEvent extends MatrixJsonRoomEvent implements _RoomMembershipEvent { +public class MatrixJsonRoomMembershipEvent extends MatrixJsonRoomEvent + implements _RoomMembershipEvent { private Content content; private _MatrixID invitee; diff --git a/src/test/java/io/kamax/matrix/MatrixIDTest.java b/src/test/java/io/kamax/matrix/MatrixIDTest.java index 1818d3c..2c503a2 100644 --- a/src/test/java/io/kamax/matrix/MatrixIDTest.java +++ b/src/test/java/io/kamax/matrix/MatrixIDTest.java @@ -36,7 +36,6 @@ public class MatrixIDTest { private static String invalidMxId4 = "@:"; private static String invalidMxId5 = "@john.doe:"; - @Test public void validMatrixIDs() { _MatrixID mxId1 = new MatrixID(validMxId1); From 19d05df7539156386f4b096dde319f7d07e39ac2 Mon Sep 17 00:00:00 2001 From: Arne Augenstein Date: Fri, 22 Sep 2017 19:01:08 +0200 Subject: [PATCH 3/8] Enable header comment formatting --- spotless.eclipseformat.xml | 2 +- src/main/java/io/kamax/matrix/MatrixErrorInfo.java | 4 ++-- src/main/java/io/kamax/matrix/MatrixID.java | 4 ++-- src/main/java/io/kamax/matrix/ThreePid.java | 4 ++-- src/main/java/io/kamax/matrix/ThreePidMapping.java | 4 ++-- src/main/java/io/kamax/matrix/ThreePidMedium.java | 4 ++-- src/main/java/io/kamax/matrix/_MatrixContent.java | 4 ++-- src/main/java/io/kamax/matrix/_MatrixID.java | 4 ++-- src/main/java/io/kamax/matrix/_MatrixUser.java | 4 ++-- src/main/java/io/kamax/matrix/_ThreePid.java | 4 ++-- src/main/java/io/kamax/matrix/_ThreePidMapping.java | 4 ++-- src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java | 4 ++-- src/main/java/io/kamax/matrix/client/MatrixClientContext.java | 4 ++-- .../io/kamax/matrix/client/MatrixClientRequestException.java | 4 ++-- src/main/java/io/kamax/matrix/client/MatrixHttpContent.java | 4 ++-- src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java | 4 ++-- src/main/java/io/kamax/matrix/client/MatrixHttpUser.java | 4 ++-- src/main/java/io/kamax/matrix/client/_MatrixClient.java | 4 ++-- src/main/java/io/kamax/matrix/client/_MatrixClientRaw.java | 4 ++-- .../matrix/client/as/MatrixApplicationServiceClient.java | 4 ++-- .../matrix/client/as/_MatrixApplicationServiceClient.java | 4 ++-- .../java/io/kamax/matrix/client/regular/MatrixHttpClient.java | 4 ++-- src/main/java/io/kamax/matrix/event/_MatrixEvent.java | 4 ++-- src/main/java/io/kamax/matrix/event/_RoomEvent.java | 4 ++-- src/main/java/io/kamax/matrix/event/_RoomMembershipEvent.java | 4 ++-- src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java | 4 ++-- src/main/java/io/kamax/matrix/hs/MatrixHomeserver.java | 4 ++-- src/main/java/io/kamax/matrix/hs/RoomMembership.java | 4 ++-- src/main/java/io/kamax/matrix/hs/_MatrixHomeserver.java | 4 ++-- src/main/java/io/kamax/matrix/hs/_MatrixRoom.java | 4 ++-- src/main/java/io/kamax/matrix/is/_IdentityServer.java | 4 ++-- .../java/io/kamax/matrix/json/MatrixJsonEventFactory.java | 4 ++-- src/main/java/io/kamax/matrix/json/MatrixJsonObject.java | 4 ++-- .../io/kamax/matrix/json/RoomMessageFormattedTextPutBody.java | 4 ++-- .../java/io/kamax/matrix/json/RoomMessageTextPutBody.java | 4 ++-- .../java/io/kamax/matrix/json/UserDisplaynameSetBody.java | 4 ++-- .../io/kamax/matrix/json/VirtualUserRegistrationBody.java | 4 ++-- src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java | 4 ++-- .../java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java | 4 ++-- .../matrix/json/event/MatrixJsonRoomMembershipEvent.java | 4 ++-- .../kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java | 4 ++-- src/test/java/io/kamax/matrix/LoggingDependencyTest.java | 4 ++-- src/test/java/io/kamax/matrix/MatrixIDTest.java | 4 ++-- src/test/java/io/kamax/matrix/ThreePidTest.java | 4 ++-- 44 files changed, 87 insertions(+), 87 deletions(-) diff --git a/spotless.eclipseformat.xml b/spotless.eclipseformat.xml index f92ec90..8ca8897 100644 --- a/spotless.eclipseformat.xml +++ b/spotless.eclipseformat.xml @@ -155,7 +155,7 @@ - + diff --git a/src/main/java/io/kamax/matrix/MatrixErrorInfo.java b/src/main/java/io/kamax/matrix/MatrixErrorInfo.java index dbd8ad6..7c11761 100644 --- a/src/main/java/io/kamax/matrix/MatrixErrorInfo.java +++ b/src/main/java/io/kamax/matrix/MatrixErrorInfo.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/MatrixID.java b/src/main/java/io/kamax/matrix/MatrixID.java index ae4b524..2950449 100644 --- a/src/main/java/io/kamax/matrix/MatrixID.java +++ b/src/main/java/io/kamax/matrix/MatrixID.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/ThreePid.java b/src/main/java/io/kamax/matrix/ThreePid.java index 7a73a82..fe6b442 100644 --- a/src/main/java/io/kamax/matrix/ThreePid.java +++ b/src/main/java/io/kamax/matrix/ThreePid.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/ThreePidMapping.java b/src/main/java/io/kamax/matrix/ThreePidMapping.java index 03f6830..ee8c861 100644 --- a/src/main/java/io/kamax/matrix/ThreePidMapping.java +++ b/src/main/java/io/kamax/matrix/ThreePidMapping.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/ThreePidMedium.java b/src/main/java/io/kamax/matrix/ThreePidMedium.java index 4f69b69..e81d508 100644 --- a/src/main/java/io/kamax/matrix/ThreePidMedium.java +++ b/src/main/java/io/kamax/matrix/ThreePidMedium.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/_MatrixContent.java b/src/main/java/io/kamax/matrix/_MatrixContent.java index 4dd043d..bfdfc50 100644 --- a/src/main/java/io/kamax/matrix/_MatrixContent.java +++ b/src/main/java/io/kamax/matrix/_MatrixContent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/_MatrixID.java b/src/main/java/io/kamax/matrix/_MatrixID.java index c6868fb..f316b5c 100644 --- a/src/main/java/io/kamax/matrix/_MatrixID.java +++ b/src/main/java/io/kamax/matrix/_MatrixID.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/_MatrixUser.java b/src/main/java/io/kamax/matrix/_MatrixUser.java index 5b5405d..71c002e 100644 --- a/src/main/java/io/kamax/matrix/_MatrixUser.java +++ b/src/main/java/io/kamax/matrix/_MatrixUser.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/_ThreePid.java b/src/main/java/io/kamax/matrix/_ThreePid.java index 0e4d8da..72ff914 100644 --- a/src/main/java/io/kamax/matrix/_ThreePid.java +++ b/src/main/java/io/kamax/matrix/_ThreePid.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/_ThreePidMapping.java b/src/main/java/io/kamax/matrix/_ThreePidMapping.java index 3adc6d8..6c81df4 100644 --- a/src/main/java/io/kamax/matrix/_ThreePidMapping.java +++ b/src/main/java/io/kamax/matrix/_ThreePidMapping.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java b/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java index 2ccffe5..65e3af1 100644 --- a/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java +++ b/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client; diff --git a/src/main/java/io/kamax/matrix/client/MatrixClientContext.java b/src/main/java/io/kamax/matrix/client/MatrixClientContext.java index 6f510ee..4d05f4b 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixClientContext.java +++ b/src/main/java/io/kamax/matrix/client/MatrixClientContext.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client; diff --git a/src/main/java/io/kamax/matrix/client/MatrixClientRequestException.java b/src/main/java/io/kamax/matrix/client/MatrixClientRequestException.java index 4402a47..83e98f1 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixClientRequestException.java +++ b/src/main/java/io/kamax/matrix/client/MatrixClientRequestException.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client; diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java b/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java index 89a9be8..02de541 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client; diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java b/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java index bd74f52..66203bd 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client; diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java b/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java index 817a9de..afe8573 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client; diff --git a/src/main/java/io/kamax/matrix/client/_MatrixClient.java b/src/main/java/io/kamax/matrix/client/_MatrixClient.java index 6a0a988..9679a2a 100644 --- a/src/main/java/io/kamax/matrix/client/_MatrixClient.java +++ b/src/main/java/io/kamax/matrix/client/_MatrixClient.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client; diff --git a/src/main/java/io/kamax/matrix/client/_MatrixClientRaw.java b/src/main/java/io/kamax/matrix/client/_MatrixClientRaw.java index cfc15b4..ea106ec 100644 --- a/src/main/java/io/kamax/matrix/client/_MatrixClientRaw.java +++ b/src/main/java/io/kamax/matrix/client/_MatrixClientRaw.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client; diff --git a/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java b/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java index 06e3a95..66c03c7 100644 --- a/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java +++ b/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client.as; diff --git a/src/main/java/io/kamax/matrix/client/as/_MatrixApplicationServiceClient.java b/src/main/java/io/kamax/matrix/client/as/_MatrixApplicationServiceClient.java index 919c8e8..da1c55e 100644 --- a/src/main/java/io/kamax/matrix/client/as/_MatrixApplicationServiceClient.java +++ b/src/main/java/io/kamax/matrix/client/as/_MatrixApplicationServiceClient.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client.as; diff --git a/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java b/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java index 8f6e847..9416393 100644 --- a/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java +++ b/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.client.regular; diff --git a/src/main/java/io/kamax/matrix/event/_MatrixEvent.java b/src/main/java/io/kamax/matrix/event/_MatrixEvent.java index 4c96a5d..97c5fbb 100644 --- a/src/main/java/io/kamax/matrix/event/_MatrixEvent.java +++ b/src/main/java/io/kamax/matrix/event/_MatrixEvent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.event; diff --git a/src/main/java/io/kamax/matrix/event/_RoomEvent.java b/src/main/java/io/kamax/matrix/event/_RoomEvent.java index 89e3b5a..dd7f0a6 100644 --- a/src/main/java/io/kamax/matrix/event/_RoomEvent.java +++ b/src/main/java/io/kamax/matrix/event/_RoomEvent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.event; diff --git a/src/main/java/io/kamax/matrix/event/_RoomMembershipEvent.java b/src/main/java/io/kamax/matrix/event/_RoomMembershipEvent.java index fa63a95..5496415 100644 --- a/src/main/java/io/kamax/matrix/event/_RoomMembershipEvent.java +++ b/src/main/java/io/kamax/matrix/event/_RoomMembershipEvent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.event; diff --git a/src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java b/src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java index a6c99fa..b5e366a 100644 --- a/src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java +++ b/src/main/java/io/kamax/matrix/event/_RoomMessageEvent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.event; diff --git a/src/main/java/io/kamax/matrix/hs/MatrixHomeserver.java b/src/main/java/io/kamax/matrix/hs/MatrixHomeserver.java index 54c79f7..38808c6 100644 --- a/src/main/java/io/kamax/matrix/hs/MatrixHomeserver.java +++ b/src/main/java/io/kamax/matrix/hs/MatrixHomeserver.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.hs; diff --git a/src/main/java/io/kamax/matrix/hs/RoomMembership.java b/src/main/java/io/kamax/matrix/hs/RoomMembership.java index 39e9667..e40d660 100644 --- a/src/main/java/io/kamax/matrix/hs/RoomMembership.java +++ b/src/main/java/io/kamax/matrix/hs/RoomMembership.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.hs; diff --git a/src/main/java/io/kamax/matrix/hs/_MatrixHomeserver.java b/src/main/java/io/kamax/matrix/hs/_MatrixHomeserver.java index 92d3cbd..7484353 100644 --- a/src/main/java/io/kamax/matrix/hs/_MatrixHomeserver.java +++ b/src/main/java/io/kamax/matrix/hs/_MatrixHomeserver.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.hs; diff --git a/src/main/java/io/kamax/matrix/hs/_MatrixRoom.java b/src/main/java/io/kamax/matrix/hs/_MatrixRoom.java index 0830876..777415b 100644 --- a/src/main/java/io/kamax/matrix/hs/_MatrixRoom.java +++ b/src/main/java/io/kamax/matrix/hs/_MatrixRoom.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.hs; diff --git a/src/main/java/io/kamax/matrix/is/_IdentityServer.java b/src/main/java/io/kamax/matrix/is/_IdentityServer.java index e5eb191..f8f0e09 100644 --- a/src/main/java/io/kamax/matrix/is/_IdentityServer.java +++ b/src/main/java/io/kamax/matrix/is/_IdentityServer.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.is; diff --git a/src/main/java/io/kamax/matrix/json/MatrixJsonEventFactory.java b/src/main/java/io/kamax/matrix/json/MatrixJsonEventFactory.java index 4db4789..e5d68e3 100644 --- a/src/main/java/io/kamax/matrix/json/MatrixJsonEventFactory.java +++ b/src/main/java/io/kamax/matrix/json/MatrixJsonEventFactory.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json; diff --git a/src/main/java/io/kamax/matrix/json/MatrixJsonObject.java b/src/main/java/io/kamax/matrix/json/MatrixJsonObject.java index ecbd3f4..3b5f413 100644 --- a/src/main/java/io/kamax/matrix/json/MatrixJsonObject.java +++ b/src/main/java/io/kamax/matrix/json/MatrixJsonObject.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json; diff --git a/src/main/java/io/kamax/matrix/json/RoomMessageFormattedTextPutBody.java b/src/main/java/io/kamax/matrix/json/RoomMessageFormattedTextPutBody.java index 324755c..22c802a 100644 --- a/src/main/java/io/kamax/matrix/json/RoomMessageFormattedTextPutBody.java +++ b/src/main/java/io/kamax/matrix/json/RoomMessageFormattedTextPutBody.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json; diff --git a/src/main/java/io/kamax/matrix/json/RoomMessageTextPutBody.java b/src/main/java/io/kamax/matrix/json/RoomMessageTextPutBody.java index b322f2b..be2f34c 100644 --- a/src/main/java/io/kamax/matrix/json/RoomMessageTextPutBody.java +++ b/src/main/java/io/kamax/matrix/json/RoomMessageTextPutBody.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json; diff --git a/src/main/java/io/kamax/matrix/json/UserDisplaynameSetBody.java b/src/main/java/io/kamax/matrix/json/UserDisplaynameSetBody.java index 197516c..c5b38d8 100644 --- a/src/main/java/io/kamax/matrix/json/UserDisplaynameSetBody.java +++ b/src/main/java/io/kamax/matrix/json/UserDisplaynameSetBody.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json; diff --git a/src/main/java/io/kamax/matrix/json/VirtualUserRegistrationBody.java b/src/main/java/io/kamax/matrix/json/VirtualUserRegistrationBody.java index 383c19a..89930b6 100644 --- a/src/main/java/io/kamax/matrix/json/VirtualUserRegistrationBody.java +++ b/src/main/java/io/kamax/matrix/json/VirtualUserRegistrationBody.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json; diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java index ae03e85..3ac1caa 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json.event; diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java index ace732d..17028a9 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json.event; diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java index dec430a..b023039 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json.event; diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java index 8e65487..6bfe686 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix.json.event; diff --git a/src/test/java/io/kamax/matrix/LoggingDependencyTest.java b/src/test/java/io/kamax/matrix/LoggingDependencyTest.java index 1e6bd73..e57ab33 100644 --- a/src/test/java/io/kamax/matrix/LoggingDependencyTest.java +++ b/src/test/java/io/kamax/matrix/LoggingDependencyTest.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/test/java/io/kamax/matrix/MatrixIDTest.java b/src/test/java/io/kamax/matrix/MatrixIDTest.java index 2c503a2..36c3003 100644 --- a/src/test/java/io/kamax/matrix/MatrixIDTest.java +++ b/src/test/java/io/kamax/matrix/MatrixIDTest.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; diff --git a/src/test/java/io/kamax/matrix/ThreePidTest.java b/src/test/java/io/kamax/matrix/ThreePidTest.java index 7e097d6..91a8484 100644 --- a/src/test/java/io/kamax/matrix/ThreePidTest.java +++ b/src/test/java/io/kamax/matrix/ThreePidTest.java @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package io.kamax.matrix; From 7604cd20fc2f639e57070148b608a4d99ed41fde Mon Sep 17 00:00:00 2001 From: Arne Augenstein Date: Fri, 22 Sep 2017 19:45:24 +0200 Subject: [PATCH 4/8] Add spotless' import management --- build.gradle | 2 ++ spotless.importorder | 8 ++++++++ .../java/io/kamax/matrix/client/AMatrixHttpClient.java | 2 ++ .../java/io/kamax/matrix/client/MatrixHttpContent.java | 1 + src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java | 2 ++ src/main/java/io/kamax/matrix/client/MatrixHttpUser.java | 2 ++ .../matrix/client/as/MatrixApplicationServiceClient.java | 1 + .../io/kamax/matrix/client/regular/MatrixHttpClient.java | 1 + .../java/io/kamax/matrix/json/MatrixJsonEventFactory.java | 1 + .../java/io/kamax/matrix/json/event/MatrixJsonEvent.java | 1 + .../io/kamax/matrix/json/event/MatrixJsonRoomEvent.java | 1 + .../matrix/json/event/MatrixJsonRoomMembershipEvent.java | 1 + .../matrix/json/event/MatrixJsonRoomMessageEvent.java | 1 + 13 files changed, 24 insertions(+) create mode 100644 spotless.importorder diff --git a/build.gradle b/build.gradle index 2e8f6b2..c924ab8 100644 --- a/build.gradle +++ b/build.gradle @@ -85,5 +85,7 @@ spotless { } java { eclipse().configFile 'spotless.eclipseformat.xml' + removeUnusedImports() + importOrderFile 'spotless.importorder' } } diff --git a/spotless.importorder b/spotless.importorder new file mode 100644 index 0000000..67a613c --- /dev/null +++ b/spotless.importorder @@ -0,0 +1,8 @@ +#Organize Import Order +#Fri Sep 22 19:44:55 CEST 2017 +5=\#org +4=javax +3=java +2=org +1=io +0=com diff --git a/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java b/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java index 65e3af1..83ac5b9 100644 --- a/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java +++ b/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java @@ -22,8 +22,10 @@ import com.google.gson.Gson; import com.google.gson.JsonParser; + import io.kamax.matrix._MatrixID; import io.kamax.matrix.hs._MatrixHomeserver; + import org.apache.http.HttpEntity; import org.apache.http.client.entity.EntityBuilder; import org.apache.http.client.methods.HttpRequestBase; diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java b/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java index 02de541..0f5f609 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java @@ -22,6 +22,7 @@ import io.kamax.matrix.MatrixErrorInfo; import io.kamax.matrix._MatrixContent; + import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import org.apache.http.Header; diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java b/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java index 66203bd..45c2761 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java @@ -22,12 +22,14 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import io.kamax.matrix.MatrixErrorInfo; import io.kamax.matrix.MatrixID; import io.kamax.matrix._MatrixID; import io.kamax.matrix.hs._MatrixRoom; import io.kamax.matrix.json.RoomMessageFormattedTextPutBody; import io.kamax.matrix.json.RoomMessageTextPutBody; + import org.apache.commons.io.IOUtils; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java b/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java index afe8573..3ee9b0d 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java @@ -21,10 +21,12 @@ package io.kamax.matrix.client; import com.google.gson.JsonObject; + import io.kamax.matrix.MatrixErrorInfo; import io.kamax.matrix._MatrixContent; import io.kamax.matrix._MatrixID; import io.kamax.matrix._MatrixUser; + import org.apache.commons.io.IOUtils; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; diff --git a/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java b/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java index 66c03c7..7631974 100644 --- a/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java +++ b/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java @@ -28,6 +28,7 @@ import io.kamax.matrix.client.regular.MatrixHttpClient; import io.kamax.matrix.hs._MatrixHomeserver; import io.kamax.matrix.json.VirtualUserRegistrationBody; + import org.apache.commons.io.IOUtils; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; diff --git a/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java b/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java index 9416393..a902023 100644 --- a/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java +++ b/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java @@ -27,6 +27,7 @@ import io.kamax.matrix.client.*; import io.kamax.matrix.hs._MatrixRoom; import io.kamax.matrix.json.UserDisplaynameSetBody; + import org.apache.commons.io.IOUtils; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPut; diff --git a/src/main/java/io/kamax/matrix/json/MatrixJsonEventFactory.java b/src/main/java/io/kamax/matrix/json/MatrixJsonEventFactory.java index e5d68e3..e760c76 100644 --- a/src/main/java/io/kamax/matrix/json/MatrixJsonEventFactory.java +++ b/src/main/java/io/kamax/matrix/json/MatrixJsonEventFactory.java @@ -21,6 +21,7 @@ package io.kamax.matrix.json; import com.google.gson.JsonObject; + import io.kamax.matrix.event._MatrixEvent; import io.kamax.matrix.json.event.MatrixJsonEvent; import io.kamax.matrix.json.event.MatrixJsonRoomMembershipEvent; diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java index 3ac1caa..57e11fc 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonEvent.java @@ -21,6 +21,7 @@ package io.kamax.matrix.json.event; import com.google.gson.JsonObject; + import io.kamax.matrix.MatrixID; import io.kamax.matrix._MatrixID; import io.kamax.matrix.event._MatrixEvent; diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java index 17028a9..dc6db93 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomEvent.java @@ -21,6 +21,7 @@ package io.kamax.matrix.json.event; import com.google.gson.JsonObject; + import io.kamax.matrix.event._RoomEvent; public class MatrixJsonRoomEvent extends MatrixJsonEvent implements _RoomEvent { diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java index b023039..f4869a4 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java @@ -21,6 +21,7 @@ package io.kamax.matrix.json.event; import com.google.gson.JsonObject; + import io.kamax.matrix.MatrixID; import io.kamax.matrix._MatrixID; import io.kamax.matrix.event._RoomMembershipEvent; diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java index 6bfe686..3f1df04 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMessageEvent.java @@ -21,6 +21,7 @@ package io.kamax.matrix.json.event; import com.google.gson.JsonObject; + import io.kamax.matrix.event._RoomMessageEvent; public class MatrixJsonRoomMessageEvent extends MatrixJsonRoomEvent implements _RoomMessageEvent { From ededa9cb6d657d6f97f5b0c92a7d5b54190691fa Mon Sep 17 00:00:00 2001 From: Arne Augenstein Date: Wed, 27 Sep 2017 17:17:36 +0200 Subject: [PATCH 5/8] Remove spotlessApply-dependency --- build.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle b/build.gradle index c924ab8..d67a704 100644 --- a/build.gradle +++ b/build.gradle @@ -72,9 +72,6 @@ uploadArchives { } } -// Settings for automatic code formatting -compileJava.dependsOn { spotlessApply } - spotless { format 'misc', { target '**/*.gradle', '**/*.md', '**/.gitignore' From 9f1043f43f64e0922e9a3df612fd948502faaae9 Mon Sep 17 00:00:00 2001 From: Arne Augenstein Date: Wed, 27 Sep 2017 17:21:09 +0200 Subject: [PATCH 6/8] Remove formatting error in settings.gradle --- settings.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/settings.gradle b/settings.gradle index 48f378c..5375dd7 100644 --- a/settings.gradle +++ b/settings.gradle @@ -19,4 +19,3 @@ */ rootProject.name = 'matrix-java-sdk' - From 6f953f1d006466c811786b4035d493a0abb15a93 Mon Sep 17 00:00:00 2001 From: Arne Augenstein Date: Wed, 27 Sep 2017 18:05:43 +0200 Subject: [PATCH 7/8] Change line width to 120 --- spotless.eclipseformat.xml | 4 +-- .../matrix/client/AMatrixHttpClient.java | 3 +- .../matrix/client/MatrixClientContext.java | 3 +- .../matrix/client/MatrixHttpContent.java | 19 ++++------- .../kamax/matrix/client/MatrixHttpRoom.java | 33 ++++++++----------- .../kamax/matrix/client/MatrixHttpUser.java | 6 ++-- .../as/MatrixApplicationServiceClient.java | 10 +++--- .../client/regular/MatrixHttpClient.java | 3 +- .../event/MatrixJsonRoomMembershipEvent.java | 3 +- 9 files changed, 32 insertions(+), 52 deletions(-) diff --git a/spotless.eclipseformat.xml b/spotless.eclipseformat.xml index 8ca8897..063e59a 100644 --- a/spotless.eclipseformat.xml +++ b/spotless.eclipseformat.xml @@ -72,7 +72,7 @@ - + @@ -307,7 +307,7 @@ - + diff --git a/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java b/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java index 83ac5b9..dcd7348 100644 --- a/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java +++ b/src/main/java/io/kamax/matrix/client/AMatrixHttpClient.java @@ -129,8 +129,7 @@ protected URI getMediaPath(String action) { } protected HttpEntity getJsonEntity(Object o) { - return EntityBuilder.create().setText(gson.toJson(o)) - .setContentType(ContentType.APPLICATION_JSON).build(); + return EntityBuilder.create().setText(gson.toJson(o)).setContentType(ContentType.APPLICATION_JSON).build(); } } diff --git a/src/main/java/io/kamax/matrix/client/MatrixClientContext.java b/src/main/java/io/kamax/matrix/client/MatrixClientContext.java index 4d05f4b..6dc0c4d 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixClientContext.java +++ b/src/main/java/io/kamax/matrix/client/MatrixClientContext.java @@ -34,8 +34,7 @@ public MatrixClientContext(_MatrixHomeserver hs, _MatrixID user, String token) { this(hs, user, token, false); } - public MatrixClientContext(_MatrixHomeserver hs, _MatrixID user, String token, - boolean isVirtualUser) { + public MatrixClientContext(_MatrixHomeserver hs, _MatrixID user, String token, boolean isVirtualUser) { this.hs = hs; this.user = user; this.token = token; diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java b/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java index 0f5f609..0aac443 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpContent.java @@ -68,8 +68,7 @@ private synchronized void load() { try { if (!StringUtils.equalsIgnoreCase("mxc", address.getScheme())) { - log.error("{} is not a supported protocol for avatars, ignoring", - address.getScheme()); + log.error("{} is not a supported protocol for avatars, ignoring", address.getScheme()); } else { URI path = getMediaPath("/download/" + address.getHost() + address.getPath()); try (CloseableHttpResponse res = client.execute(log(new HttpGet(path)))) { @@ -78,13 +77,12 @@ private synchronized void load() { log.info("Media {} does not exist on the HS {}", address.toString(), getContext().getHs().getDomain()); } else { - Charset charset = ContentType.getOrDefault(res.getEntity()) - .getCharset(); + Charset charset = ContentType.getOrDefault(res.getEntity()).getCharset(); String body = IOUtils.toString(res.getEntity().getContent(), charset); MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - log.error("Couldn't get content data for {}: {} - {}", - address.toString(), info.getErrcode(), info.getError()); + log.error("Couldn't get content data for {}: {} - {}", address.toString(), + info.getErrcode(), info.getError()); } } else { HttpEntity entity = res.getEntity(); @@ -93,8 +91,7 @@ private synchronized void load() { } else { Header contentType = entity.getContentType(); if (contentType == null) { - log.info( - "No content type was given, unable to process avatar data"); + log.info("No content type was given, unable to process avatar data"); } else { type = contentType.getValue(); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); @@ -102,11 +99,9 @@ private synchronized void load() { data = outStream.toByteArray(); isValid = true; - Header contentDisposition = res - .getFirstHeader("Content-Disposition"); + Header contentDisposition = res.getFirstHeader("Content-Disposition"); if (contentDisposition != null) { - Matcher m = filenamePattern - .matcher(contentDisposition.getValue()); + Matcher m = filenamePattern.matcher(contentDisposition.getValue()); if (m.find()) { filename = m.group("filename"); } diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java b/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java index 45c2761..afdd9c3 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpRoom.java @@ -92,12 +92,11 @@ public Optional getName() { log.warn("Request was rate limited", new Exception()); } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - throw new IOException("Couldn't get name for room " + roomId + " - " - + info.getErrcode() + ": " + info.getError()); + throw new IOException("Couldn't get name for room " + roomId + " - " + info.getErrcode() + ": " + + info.getError()); } - return Optional - .of(jsonParser.parse(body).getAsJsonObject().get("name").getAsString()); + return Optional.of(jsonParser.parse(body).getAsJsonObject().get("name").getAsString()); } } catch (IOException e) { throw new MatrixClientRequestException(e); @@ -124,12 +123,10 @@ public Optional getTopic() { log.warn("Request was rate limited", new Exception()); } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - throw new MatrixClientRequestException(info, - "Couldn't get topic for room " + roomId); + throw new MatrixClientRequestException(info, "Couldn't get topic for room " + roomId); } - return Optional - .of(jsonParser.parse(body).getAsJsonObject().get("topic").getAsString()); + return Optional.of(jsonParser.parse(body).getAsJsonObject().get("topic").getAsString()); } } catch (IOException e) { throw new MatrixClientRequestException(e); @@ -157,8 +154,7 @@ public void join() { MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); if (res.getStatusLine().getStatusCode() == 403) { - log.error("Failed to join room, we are not allowed: {} - {}", info.getErrcode(), - info.getError()); + log.error("Failed to join room, we are not allowed: {} - {}", info.getErrcode(), info.getError()); } else { throw new MatrixClientRequestException(info, "Error joining for " + getUser()); } @@ -195,8 +191,7 @@ public void leave() { MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); if (res.getStatusLine().getStatusCode() == 403) { - log.debug( - "Failed to leave room, we are not allowed, most likely already left: {} - {}", + log.debug("Failed to leave room, we are not allowed, most likely already left: {} - {}", info.getErrcode(), info.getError()); } else { throw new MatrixClientRequestException(info, @@ -211,8 +206,7 @@ public void leave() { private void sendMessage(RoomMessageTextPutBody content) { try { - URI path = getClientPath( - "/rooms/{roomId}/send/m.room.message/" + System.currentTimeMillis()); + URI path = getClientPath("/rooms/{roomId}/send/m.room.message/" + System.currentTimeMillis()); HttpPut req = new HttpPut(path); req.setEntity(getJsonEntity(content)); @@ -232,8 +226,8 @@ private void sendMessage(RoomMessageTextPutBody content) { if (res.getStatusLine().getStatusCode() == 403) { log.error("Failed send message, we are not allowed: {}", info.getError()); } else { - throw new IOException("Error sending message for " + getUser() + " - " - + info.getErrcode() + ": " + info.getError()); + throw new IOException("Error sending message for " + getUser() + " - " + info.getErrcode() + + ": " + info.getError()); } } } @@ -285,12 +279,11 @@ public List<_MatrixID> getJoinedUsers() { log.warn("Request was rate limited", new Exception()); } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - throw new IOException("Couldn't list joined users in " + roomId + " - " - + info.getErrcode() + ": " + info.getError()); + throw new IOException("Couldn't list joined users in " + roomId + " - " + info.getErrcode() + ": " + + info.getError()); } - JsonObject joinedUsers = jsonParser.parse(body).getAsJsonObject().get("joined") - .getAsJsonObject(); + JsonObject joinedUsers = jsonParser.parse(body).getAsJsonObject().get("joined").getAsJsonObject(); List<_MatrixID> ids = new ArrayList<>(); for (Map.Entry entry : joinedUsers.entrySet()) { ids.add(new MatrixID(entry.getKey())); diff --git a/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java b/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java index 3ee9b0d..3b45244 100644 --- a/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java +++ b/src/main/java/io/kamax/matrix/client/MatrixHttpUser.java @@ -78,8 +78,7 @@ public Optional getName() { } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - log.error("Couldn't get the displayname of {}: {} - {}", mxId, - info.getErrcode(), info.getError()); + log.error("Couldn't get the displayname of {}: {} - {}", mxId, info.getErrcode(), info.getError()); return Optional.empty(); } @@ -117,8 +116,7 @@ public Optional<_MatrixContent> getAvatar() { } MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - log.error("Couldn't get the avatar_url of {}: {} - {}", mxId, info.getErrcode(), - info.getError()); + log.error("Couldn't get the avatar_url of {}: {} - {}", mxId, info.getErrcode(), info.getError()); return Optional.empty(); } diff --git a/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java b/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java index 7631974..4c6c06b 100644 --- a/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java +++ b/src/main/java/io/kamax/matrix/client/as/MatrixApplicationServiceClient.java @@ -40,8 +40,7 @@ import java.net.URI; import java.nio.charset.Charset; -public class MatrixApplicationServiceClient extends MatrixHttpClient - implements _MatrixApplicationServiceClient { +public class MatrixApplicationServiceClient extends MatrixHttpClient implements _MatrixApplicationServiceClient { private Logger log = LoggerFactory.getLogger(MatrixApplicationServiceClient.class); @@ -50,8 +49,8 @@ public MatrixApplicationServiceClient(_MatrixHomeserver hs, String token, String } private MatrixHttpClient createClient(String localpart) { - return new MatrixHttpClient(new MatrixClientContext(getHomeserver(), getMatrixId(localpart), - getAccessToken(), true)); + return new MatrixHttpClient( + new MatrixClientContext(getHomeserver(), getMatrixId(localpart), getAccessToken(), true)); } @Override @@ -73,8 +72,7 @@ public _MatrixClient createUser(String localpart) { log.warn("User {} already exists, ignoring", localpart); } else { // TODO turn into dedicated exceptions, following the Spec distinct errors - throw new MatrixClientRequestException(info, - "Error creating the new user " + localpart); + throw new MatrixClientRequestException(info, "Error creating the new user " + localpart); } } } diff --git a/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java b/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java index a902023..8d21222 100644 --- a/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java +++ b/src/main/java/io/kamax/matrix/client/regular/MatrixHttpClient.java @@ -70,8 +70,7 @@ public void setDisplayName(String name) { Charset charset = ContentType.getOrDefault(res.getEntity()).getCharset(); String body = IOUtils.toString(res.getEntity().getContent(), charset); MatrixErrorInfo info = gson.fromJson(body, MatrixErrorInfo.class); - throw new MatrixClientRequestException(info, - "Error changing display name for " + getUser()); + throw new MatrixClientRequestException(info, "Error changing display name for " + getUser()); } } } catch (IOException e) { diff --git a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java index f4869a4..4655bc8 100644 --- a/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java +++ b/src/main/java/io/kamax/matrix/json/event/MatrixJsonRoomMembershipEvent.java @@ -29,8 +29,7 @@ import java.util.Optional; -public class MatrixJsonRoomMembershipEvent extends MatrixJsonRoomEvent - implements _RoomMembershipEvent { +public class MatrixJsonRoomMembershipEvent extends MatrixJsonRoomEvent implements _RoomMembershipEvent { private Content content; private _MatrixID invitee; From 2c3076ac3fcefef4016f1a0f0fe0fd7ef10f3147 Mon Sep 17 00:00:00 2001 From: Arne Augenstein Date: Mon, 2 Oct 2017 22:32:33 +0200 Subject: [PATCH 8/8] Don't check and format *.md-files --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d67a704..2f8fdfc 100644 --- a/build.gradle +++ b/build.gradle @@ -74,7 +74,7 @@ uploadArchives { spotless { format 'misc', { - target '**/*.gradle', '**/*.md', '**/.gitignore' + target '**/*.gradle', '**/.gitignore' trimTrailingWhitespace() indentWithSpaces()