You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ad...@apache.org on 2017/11/15 11:15:45 UTC

[04/19] james-project git commit: JAMES-2214 Correct error properties when saving with wrong attachments

JAMES-2214 Correct error properties when saving with wrong attachments

Before, messageIds was stated, which was wrong. That error properties was not tested.


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/903ead09
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/903ead09
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/903ead09

Branch: refs/heads/master
Commit: 903ead093cda32982c9651ea5e12ca19592a1c22
Parents: b0f4d06
Author: benwa <bt...@linagora.com>
Authored: Mon Nov 13 11:18:53 2017 +0700
Committer: benwa <bt...@linagora.com>
Committed: Wed Nov 15 17:59:49 2017 +0700

----------------------------------------------------------------------
 .../james/jmap/methods/integration/SetMessagesMethodTest.java      | 1 +
 .../apache/james/jmap/methods/SetMessagesCreationProcessor.java    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/903ead09/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
index 6e74189..54cf67b 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
@@ -2673,6 +2673,7 @@ public abstract class SetMessagesMethodTest {
             .body(NAME, equalTo("messagesSet"))
             .body(ARGUMENTS + ".notCreated", hasKey(messageCreationId))
             .body(notCreatedPath + ".type", equalTo("invalidProperties"))
+            .body(notCreatedPath + ".properties", contains("attachments"))
             .body(notCreatedPath + ".attachmentsNotFound", contains("brokenId1", "brokenId2"))
             .body(ARGUMENTS + ".created", aMapWithSize(0));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/903ead09/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesCreationProcessor.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesCreationProcessor.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesCreationProcessor.java
index 2f12ebd..50407a2 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesCreationProcessor.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesCreationProcessor.java
@@ -124,7 +124,7 @@ public class SetMessagesCreationProcessor implements SetMessagesProcessor {
             responseBuilder.notCreated(create.getCreationId(), 
                     SetMessagesError.builder()
                         .type("invalidProperties")
-                        .properties(MessageProperty.mailboxIds)
+                        .properties(MessageProperty.attachments)
                         .attachmentsNotFound(e.getAttachmentIds())
                         .description("Attachment not found")
                         .build());


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org