cziegeler 01/10/16 05:26:55
Modified: . changes.xml
src/org/apache/cocoon/environment/commandline
CommandLineRequest.java
Log:
Fixed parameter handling for cli
Revision Changes Path
1.39 +5 -1 xml-cocoon2/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/changes.xml,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- changes.xml 2001/10/16 12:02:01 1.38
+++ changes.xml 2001/10/16 12:26:54 1.39
@@ -4,7 +4,7 @@
<!--
History of Cocoon changes
- $Id: changes.xml,v 1.38 2001/10/16 12:02:01 cziegeler Exp $
+ $Id: changes.xml,v 1.39 2001/10/16 12:26:54 cziegeler Exp $
-->
<changes title="History of Changes">
@@ -26,6 +26,10 @@
</devs>
<release version="2.1-dev" date="@date@">
+ <action dev="CZ" type="fix">
+ Updated session handling of commandline interface and fixed
+ parameter handling.
+ </action>
<action dev="CZ" type="fix">
Fixed missing prefix in elements generated by the directory and image
directory generator.
1.10 +8 -9
xml-cocoon2/src/org/apache/cocoon/environment/commandline/CommandLineRequest.java
Index: CommandLineRequest.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/org/apache/cocoon/environment/commandline/CommandLineRequest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- CommandLineRequest.java 2001/10/15 13:09:58 1.9
+++ CommandLineRequest.java 2001/10/16 12:26:55 1.10
@@ -20,7 +20,8 @@
* Creates a specific servlet request simulation from command line usage.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.9 $ $Date: 2001/10/15 13:09:58 $
+ * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
+ * @version CVS $Revision: 1.10 $ $Date: 2001/10/16 12:26:55 $
*/
/*
@@ -133,19 +134,17 @@
}
public String getParameter(String name) {
- return (parameters != null) ? (String) parameters.get(name) : null;
+ return (this.parameters != null) ? (String)this.parameters.get(name)
: null;
}
+
public Enumeration getParameterNames() {
- return (parameters != null) ? new
IteratorWrapper(parameters.keySet().iterator()) : null;
+ return (this.parameters != null) ? new
IteratorWrapper(this.parameters.keySet().iterator()) : null;
}
public String[] getParameterValues(String name) {
- if (parameters != null) {
- Object [] obj = parameters.values().toArray();
- String [] str = new String [obj.length];
- for (int i = 0; i < obj.length; i++)
- str[i] = (String)obj[i];
- return str;
+ final String value = this.getParameter(name);
+ if (value != null) {
+ return new String[] {value};
}
return null;
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]