knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From su...@apache.org
Subject knox git commit: KNOX-658 slight change to the way JAXB works in JDK8
Date Fri, 29 Jan 2016 15:11:00 GMT
Repository: knox
Updated Branches:
  refs/heads/master db601e350 -> 6769bd889


KNOX-658 slight change to the way JAXB works in JDK8


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/6769bd88
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/6769bd88
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/6769bd88

Branch: refs/heads/master
Commit: 6769bd88906158c2352d1a0aeece5d1e0622452d
Parents: db601e3
Author: Sumit Gupta <sumit@apache.org>
Authored: Fri Jan 29 10:10:00 2016 -0500
Committer: Sumit Gupta <sumit@apache.org>
Committed: Fri Jan 29 10:10:00 2016 -0500

----------------------------------------------------------------------
 .../hadoop/gateway/service/definition/ServiceDefinition.java  | 7 +------
 .../gateway/service/definition/ServiceDefinitionTest.java     | 2 ++
 .../src/test/resources/services/foo/1.0.0/service.xml         | 4 ++++
 3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/6769bd88/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
b/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
index e85e6f9..f5706f7 100644
--- a/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
+++ b/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
@@ -96,12 +96,7 @@ public class ServiceDefinition {
   @XmlElement(name = "testURL")
   @XmlElementWrapper(name = "testURLs")
   public List<String> getTestURLs() {
-
-    if(testURLs != null){
-      return testURLs;
-    } else {
-      return new ArrayList<String>();
-    }
+    return testURLs;
   }
 
   public void setTestURLs(List<String> testURLs) {

http://git-wip-us.apache.org/repos/asf/knox/blob/6769bd88/gateway-service-definitions/src/test/java/org/apache/hadoop/gateway/service/definition/ServiceDefinitionTest.java
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/test/java/org/apache/hadoop/gateway/service/definition/ServiceDefinitionTest.java
b/gateway-service-definitions/src/test/java/org/apache/hadoop/gateway/service/definition/ServiceDefinitionTest.java
index c8ab790..436e83d 100644
--- a/gateway-service-definitions/src/test/java/org/apache/hadoop/gateway/service/definition/ServiceDefinitionTest.java
+++ b/gateway-service-definitions/src/test/java/org/apache/hadoop/gateway/service/definition/ServiceDefinitionTest.java
@@ -59,6 +59,8 @@ public class ServiceDefinitionTest {
     for (int i=0; i< policyOrder.length; i++ ) {
       assertEquals(policyOrder[i], policies.get(i).getRole());
     }
+    assertNotNull(definition.getTestURLs());
+    assertEquals(2, definition.getTestURLs().size());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/knox/blob/6769bd88/gateway-service-definitions/src/test/resources/services/foo/1.0.0/service.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/test/resources/services/foo/1.0.0/service.xml
b/gateway-service-definitions/src/test/resources/services/foo/1.0.0/service.xml
index f18a74b..ab1d966 100644
--- a/gateway-service-definitions/src/test/resources/services/foo/1.0.0/service.xml
+++ b/gateway-service-definitions/src/test/resources/services/foo/1.0.0/service.xml
@@ -36,4 +36,8 @@
         </route>
     </routes>
     <dispatch contributor-name="custom-client" ha-contributor-name="ha-client" http-client-factory="org.apache.hadoop.gateway.MockHttpClientFactory"/>
+    <testURLs>
+        <testURL>/foo/version</testURL>
+        <testURL>/foo/bar/status</testURL>
+    </testURLs>
 </service>
\ No newline at end of file


Mime
View raw message