Repository: camel
Updated Branches:
  refs/heads/master 72f75a3cd -> 5c09c641b


Add review remarks.

Store FTP reply code after storing the file and before chmod operation.
Remove author tag, add apache license header.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5c09c641
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5c09c641
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5c09c641

Branch: refs/heads/master
Commit: 5c09c641bb872ca994ad454b406820c69666466e
Parents: 27ed9cb
Author: eidottermihi <eidotterm...@gmail.com>
Authored: Fri Oct 21 08:38:36 2016 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Fri Oct 21 16:21:30 2016 +0200

----------------------------------------------------------------------
 .../component/file/remote/FtpOperations.java    |  7 ++++---
 .../file/remote/FromFileToFtpWithChmodTest.java | 21 ++++++++++++++------
 2 files changed, 19 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5c09c641/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
----------------------------------------------------------------------
diff --git 
a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
 
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
index e0af7fc..ad55ea8 100644
--- 
a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
+++ 
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
@@ -594,6 +594,10 @@ public class FtpOperations implements 
RemoteFileOperations<FTPFile> {
                         new Object[]{TimeUtils.printDuration(watch.taken()), 
watch.taken(), targetName, answer});
             }
             
+            // store client reply information after the operation
+            exchange.getIn().setHeader(FtpConstants.FTP_REPLY_CODE, 
client.getReplyCode());
+            exchange.getIn().setHeader(FtpConstants.FTP_REPLY_STRING, 
client.getReplyString());
+
             // after storing file, we may set chmod on the file
             String chmod = ((FtpConfiguration) 
endpoint.getConfiguration()).getChmod();
             if (ObjectHelper.isNotEmpty(chmod)) {
@@ -604,9 +608,6 @@ public class FtpOperations implements 
RemoteFileOperations<FTPFile> {
                 log.trace("Client sendSiteCommand successful: {}", success);
             }
             
-            // store client reply information after the operation
-            exchange.getIn().setHeader(FtpConstants.FTP_REPLY_CODE, 
client.getReplyCode());
-            exchange.getIn().setHeader(FtpConstants.FTP_REPLY_STRING, 
client.getReplyString());
 
             return answer;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/5c09c641/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpWithChmodTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpWithChmodTest.java
 
b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpWithChmodTest.java
index 446254a..f8d0bfd 100644
--- 
a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpWithChmodTest.java
+++ 
b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpWithChmodTest.java
@@ -1,6 +1,18 @@
-/*
- * Copyright (c): it@M - Dienstleister für Informations- und 
Telekommunikationstechnik
- * der Landeshauptstadt München, 2016
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.apache.camel.component.file.remote;
 
@@ -8,9 +20,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @author eidottermihi
- */
 public class FromFileToFtpWithChmodTest extends FtpServerTestSupport {
     
     protected String getFtpUrl() {

Reply via email to