Repository: camel
Updated Branches:
  refs/heads/master c8b617940 -> 2999a50c6


CAMEL-8738: Added unit test


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

Branch: refs/heads/master
Commit: 2999a50c6f2ef6cb2c7ead05f804319bc9e3e8d3
Parents: c8b6179
Author: Claus Ibsen <davscl...@apache.org>
Authored: Mon May 4 14:07:04 2015 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Mon May 4 14:07:04 2015 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/Exchange.java    |  1 -
 .../apache/camel/language/simple/Constants.java | 28 ++++++++++++++++++++
 .../camel/language/simple/SimpleTest.java       |  5 ++++
 3 files changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2999a50c/camel-core/src/main/java/org/apache/camel/Exchange.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/Exchange.java 
b/camel-core/src/main/java/org/apache/camel/Exchange.java
index 9f21f15..fbf6176 100644
--- a/camel-core/src/main/java/org/apache/camel/Exchange.java
+++ b/camel-core/src/main/java/org/apache/camel/Exchange.java
@@ -559,6 +559,5 @@ public interface Exchange {
      * @return the on completions
      */
     List<Synchronization> handoverCompletions();
-    
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/2999a50c/camel-core/src/test/java/org/apache/camel/language/simple/Constants.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/test/java/org/apache/camel/language/simple/Constants.java 
b/camel-core/src/test/java/org/apache/camel/language/simple/Constants.java
new file mode 100644
index 0000000..6edb246
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/language/simple/Constants.java
@@ -0,0 +1,28 @@
+/**
+ * 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.language.simple;
+
+public class Constants {
+
+    public static String BAR = "456";
+
+    public static class MyInnerStuff {
+
+        public static String FOO = "123";
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/2999a50c/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java 
b/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
index 351efec..dfcaf4e 100644
--- a/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
+++ b/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
@@ -1379,6 +1379,11 @@ public class SimpleTest extends LanguageTestSupport {
         assertExpression("${type:org.apache.camel.ExchangePattern.UNKNOWN}", 
null);
     }
 
+    public void testTypeConstantInnerClass() throws Exception {
+        
assertExpression("${type:org.apache.camel.language.simple.Constants$MyInnerStuff.FOO}",
 123);
+        
assertExpression("${type:org.apache.camel.language.simple.Constants.BAR}", 456);
+    }
+
     public void testStringArrayLength() throws Exception {
         exchange.getIn().setBody(new String[]{"foo", "bar"});
         assertExpression("${body[0]}", "foo");

Reply via email to