camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r936888 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/language/simple/SimpleLanguage.java test/java/org/apache/camel/language/FileLanguageTest.java
Date Thu, 22 Apr 2010 15:04:18 GMT
Author: davsclaus
Date: Thu Apr 22 15:04:17 2010
New Revision: 936888

URL: http://svn.apache.org/viewvc?rev=936888&view=rev
Log:
Add name.ext to file language.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java?rev=936888&r1=936887&r2=936888&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
Thu Apr 22 15:04:17 2010
@@ -242,6 +242,8 @@ public class SimpleLanguage extends Simp
             return ExpressionBuilder.fileNameExpression();
         } else if (ObjectHelper.equal(remainder, "name.noext")) {
             return ExpressionBuilder.fileNameNoExtensionExpression();
+        } else if (ObjectHelper.equal(remainder, "name.ext")) {
+            return ExpressionBuilder.fileExtensionExpression();
         } else if (ObjectHelper.equal(remainder, "onlyname")) {
             return ExpressionBuilder.fileOnlyNameExpression();
         } else if (ObjectHelper.equal(remainder, "onlyname.noext")) {

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java?rev=936888&r1=936887&r2=936888&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java Thu
Apr 22 15:04:17 2010
@@ -61,6 +61,7 @@ public class FileLanguageTest extends La
 
     public void testFile() throws Exception {
         assertExpression("${file:ext}", "txt");
+        assertExpression("${file:name.ext}", "txt");
         assertExpression("${file:name}", "test" + File.separator + file.getName());
         assertExpression("${file:name.noext}", "test" + File.separator + "hello");
         assertExpression("${file:onlyname}", file.getName());



Mime
View raw message