|
From: <mwl...@us...> - 2007-08-01 17:06:31
|
Revision: 451
http://cishell.svn.sourceforge.net/cishell/?rev=451&view=rev
Author: mwlinnem
Date: 2007-08-01 09:57:10 -0700 (Wed, 01 Aug 2007)
Log Message:
-----------
Fixed .toArray calls to work correctly.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-01 16:47:06 UTC (rev 450)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-01 16:57:10 UTC (rev 451)
@@ -211,16 +211,17 @@
}
public ConverterPath[] getTestPath(String s){
- return (ConverterPath[])((ArrayList)this.fileExtensionTestConverters.get(s)).toArray();
+ return (ConverterPath[])((ArrayList)this.fileExtensionTestConverters.get(s)).toArray(new ConverterPath[0]);
}
public ConverterPath[][] getTestPaths(){
- String[] fileExtensions = (String[])this.fileExtensionTestConverters.keySet().toArray();
+ String[] fileExtensions = (String[])this.fileExtensionTestConverters.keySet().toArray(new String[0]);
ArrayList graphs = new ArrayList();
for(int i = 0; i < fileExtensions.length; i++){
graphs.add(getTestPath(fileExtensions[i]));
}
- return (ConverterPath[][])graphs.toArray();
+ //this line may be busted
+ return (ConverterPath[][])graphs.toArray(new ConverterPath[0][]);
}
public ConverterPath getComparePath(String s){
@@ -228,12 +229,12 @@
}
public ConverterPath[] getComparePaths(){
- String[] fileExtensions = (String[])this.fileExtensionCompareConverters.keySet().toArray();
+ String[] fileExtensions = (String[])this.fileExtensionCompareConverters.keySet().toArray(new String[0]);
ArrayList graphs = new ArrayList();
for(int i = 0; i < fileExtensions.length; i++){
graphs.add(getComparePath(fileExtensions[i]));
}
- return (ConverterPath[])graphs.toArray();
+ return (ConverterPath[])graphs.toArray(new ConverterPath[0]);
}
public File asNWB(){
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-01 16:47:06 UTC (rev 450)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-01 16:57:10 UTC (rev 451)
@@ -56,8 +56,8 @@
return this.path;
}
- public ServiceReference[] pathAsArray(){
- return (ServiceReference[])this.path.toArray();
+ public ServiceReference[] getPathAsArray(){
+ return (ServiceReference[])this.path.toArray(new ServiceReference[0]);
}
public String toString(){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|