abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calav...@apache.org
Subject svn commit: r684744 - in /incubator/abdera/java/trunk/extensions/opensearch/src: main/java/org/apache/abdera/ext/opensearch/model/ test/java/org/apache/abdera/test/ext/opensearch/
Date Mon, 11 Aug 2008 13:37:01 GMT
Author: calavera
Date: Mon Aug 11 06:37:01 2008
New Revision: 684744

URL: http://svn.apache.org/viewvc?rev=684744&view=rev
Log:
[ABDERA-195]: OpenSearchDescription setters don't handle null args gracefully. Thanks to Christopher
Elkins.

all the test classes have been added to the test suite class.
OpenSearchTest class is removed due to is not been used.

Removed:
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/OpenSearchTest.java
Modified:
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/model/OpenSearchDescription.java
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/TestSuite.java

Modified: incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/model/OpenSearchDescription.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/model/OpenSearchDescription.java?rev=684744&r1=684743&r2=684744&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/model/OpenSearchDescription.java
(original)
+++ incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/model/OpenSearchDescription.java
Mon Aug 11 06:37:01 2008
@@ -68,7 +68,7 @@
     }
 
     public void setTags(String... tags) {
-        if (tags.length > 0) {
+        if (tags != null && tags.length > 0) {
             StringBuilder builder = new StringBuilder();
             for (int i = 0; i < tags.length - 1; i++) {
                 builder.append(tags[i]).append(" ");
@@ -86,7 +86,7 @@
     }
     
     public void addUrls(Url... urls) {
-        if (urls.length > 0) {
+        if (urls != null && urls.length > 0) {
             for (Url url : urls) {
                 this.addExtension(url);
             }
@@ -98,7 +98,7 @@
     }
     
     public void addQueries(Query... queries) {
-        if (queries.length > 0) {
+        if (queries != null && queries.length > 0) {
             for (Query query : queries) {
                 this.addExtension(query);
             }

Modified: incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/TestSuite.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/TestSuite.java?rev=684744&r1=684743&r2=684744&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/TestSuite.java
(original)
+++ incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/TestSuite.java
Mon Aug 11 06:37:01 2008
@@ -0,0 +1,41 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.test.ext.opensearch;
+
+import org.apache.abdera.test.ext.opensearch.model.OpenSearchAtomTest;
+import org.apache.abdera.test.ext.opensearch.model.OpenSearchDescriptionTest;
+import org.apache.abdera.test.ext.opensearch.server.impl.AbstractOpenSearchUrlAdapterTest;
+import org.apache.abdera.test.ext.opensearch.server.impl.SimpleOpenSearchInfoTest;
+import org.apache.abdera.test.ext.opensearch.server.processors.OpenSearchDescriptionRequestProcessorTest;
+import org.apache.abdera.test.ext.opensearch.server.processors.OpenSearchUrlRequestProcessorTest;
+import org.junit.internal.runners.TextListener;
+import org.junit.runner.JUnitCore;
+
+public class TestSuite  {
+  public static void main(String[] args) {
+    JUnitCore runner = new JUnitCore();
+    runner.addListener(new TextListener(System.out));
+    runner.run(
+      OpenSearchAtomTest.class,
+      OpenSearchDescriptionTest.class,
+      AbstractOpenSearchUrlAdapterTest.class,
+      SimpleOpenSearchInfoTest.class,
+      OpenSearchDescriptionRequestProcessorTest.class,
+      OpenSearchUrlRequestProcessorTest.class);
+  }
+}
\ No newline at end of file



Mime
View raw message