Repository: incubator-taverna-osgi
Updated Branches:
  refs/heads/master 32ec15a8c -> 1676c03f9


changed the dependency version and adapt to the new cvs API


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/commit/c7005e86
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/tree/c7005e86
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/diff/c7005e86

Branch: refs/heads/master
Commit: c7005e8642df4b143c35ba95f30810e483f4acd5
Parents: 32ec15a
Author: ThilinaManamgoda <[email protected]>
Authored: Fri Jul 15 20:31:41 2016 +0530
Committer: ThilinaManamgoda <[email protected]>
Committed: Fri Jul 15 20:31:41 2016 +0530

----------------------------------------------------------------------
 pom.xml                                         |  2 +-
 pom.xml~                                        | 68 ++++++++++++++++++++
 taverna-configuration-api/pom.xml               |  2 +-
 .../configuration/AbstractConfigurable.java     | 21 ++++--
 4 files changed, 85 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/c7005e86/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8023e69..1aae512 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
        <parent>
                <groupId>org.apache.taverna</groupId>
                <artifactId>apache-taverna-parent</artifactId>
-               <version>2-incubating</version>
+               <version>3-incubating-SNAPSHOT</version>
        </parent>
        <groupId>org.apache.taverna.osgi</groupId>
        <artifactId>apache-taverna-osgi</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/c7005e86/pom.xml~
----------------------------------------------------------------------
diff --git a/pom.xml~ b/pom.xml~
new file mode 100644
index 0000000..8023e69
--- /dev/null
+++ b/pom.xml~
@@ -0,0 +1,68 @@
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.apache.taverna</groupId>
+               <artifactId>apache-taverna-parent</artifactId>
+               <version>2-incubating</version>
+       </parent>
+       <groupId>org.apache.taverna.osgi</groupId>
+       <artifactId>apache-taverna-osgi</artifactId>
+       <version>0.2.2-incubating-SNAPSHOT</version>
+       <packaging>pom</packaging>
+       <name>Apache Taverna OSGi plugin system</name>
+       <description>OSGi-based plugin system, including
+online updates. Written for Apache Taverna,
+probably usable for any OSGi-based
+command line/desktop product.</description>
+       <scm>
+               
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi.git</connection>
+               
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi.git</developerConnection>
+               <url>https://github.com/apache/incubator-taverna-osgi</url>
+               <tag>HEAD</tag>
+       </scm>
+       <repositories>
+               <repository>
+                       <id>apache.snapshots</id>
+                       <name>Apache Snapshot Repository</name>
+                       <url>https://repository.apache.org/snapshots</url>
+                       <releases>
+                               <enabled>false</enabled>
+                       </releases>
+               </repository>
+       </repositories>
+       <modules>
+               <module>xml-parser-service</module>
+               <module>xml-transformer-service</module>
+               <module>taverna-osgi-launcher</module>
+               <module>taverna-app-configuration-api</module>
+               <module>taverna-app-configuration-impl</module>
+               <module>taverna-configuration-api</module>
+               <module>taverna-configuration-impl</module>
+               <module>taverna-download-api</module>
+               <module>taverna-download-impl</module>
+               <module>taverna-maven-plugin</module>
+               <module>taverna-plugin-api</module>
+               <module>taverna-plugin-impl</module>
+               <module>taverna-update-api</module>
+               <module>taverna-update-impl</module>
+               <module>taverna-osgi-schemas</module>
+       </modules>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/c7005e86/taverna-configuration-api/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-configuration-api/pom.xml 
b/taverna-configuration-api/pom.xml
index 35d5b70..bfd29a5 100644
--- a/taverna-configuration-api/pom.xml
+++ b/taverna-configuration-api/pom.xml
@@ -29,7 +29,7 @@
        <dependencies>
                <dependency>
                        <groupId>org.apache.commons</groupId>
-                       
<artifactId>com.springsource.org.apache.commons.csv</artifactId>
+                       <artifactId>commons-csv</artifactId>
                        <version>${apache.commons.csv.version}</version>
                </dependency>
                <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/c7005e86/taverna-configuration-api/src/main/java/org/apache/taverna/configuration/AbstractConfigurable.java
----------------------------------------------------------------------
diff --git 
a/taverna-configuration-api/src/main/java/org/apache/taverna/configuration/AbstractConfigurable.java
 
b/taverna-configuration-api/src/main/java/org/apache/taverna/configuration/AbstractConfigurable.java
index d23d035..07b88e5 100644
--- 
a/taverna-configuration-api/src/main/java/org/apache/taverna/configuration/AbstractConfigurable.java
+++ 
b/taverna-configuration-api/src/main/java/org/apache/taverna/configuration/AbstractConfigurable.java
@@ -22,12 +22,15 @@ import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.commons.csv.CSVFormat;
 import org.apache.commons.csv.CSVParser;
 import org.apache.commons.csv.CSVPrinter;
+import org.apache.commons.csv.CSVRecord;
 import org.apache.log4j.Logger;
 
 /**
@@ -149,14 +152,17 @@ public abstract class AbstractConfigurable implements 
Configurable {
                List<String> result = new ArrayList<String>();
                if (property.length()>0) { //an empty string as assumed to be 
an empty list, rather than a list with 1 empty string in it!
                        StringReader reader = new StringReader(property);
-                       CSVParser csvReader = new CSVParser(reader);
-                       try {
-                               for (String v : csvReader.getLine()) {
-                                       result.add(v);
+                       try (CSVParser csvReader = new 
CSVParser(reader,CSVFormat.DEFAULT)){
+                               
+                               for (CSVRecord v : csvReader.getRecords()) {
+                                       Iterator<String> itr = v.iterator();
+                                       
while(itr.hasNext())result.add(itr.next());
+                                       
                                }
                        } catch (IOException e) {
                                logger.error("Exception occurred parsing CSV 
properties:"+property,e);
                        }
+                       
                }
                return result;
        }
@@ -172,8 +178,11 @@ public abstract class AbstractConfigurable implements 
Configurable {
 
        private String toListText(List<String> values) {
                StringWriter writer = new StringWriter();
-               CSVPrinter csvWriter = new CSVPrinter(writer);
-               csvWriter.println(values.toArray(new String[]{}));
+               try(CSVPrinter csvWriter = new 
CSVPrinter(writer,CSVFormat.DEFAULT)) {
+                       csvWriter.printRecord(values);
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
                return writer.getBuffer().toString().trim();
        }
 

Reply via email to