cziegeler 01/10/16 05:26:39
Modified: . Tag: cocoon_20_branch changes.xml
src/org/apache/cocoon/environment/commandline Tag:
cocoon_20_branch CommandLineRequest.java
Log:
Fixed parameter handling for cli
Revision Changes Path
No revision
No revision
1.2.2.40 +5 -1 xml-cocoon2/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/changes.xml,v
retrieving revision 1.2.2.39
retrieving revision 1.2.2.40
diff -u -r1.2.2.39 -r1.2.2.40
--- changes.xml 2001/10/16 12:01:40 1.2.2.39
+++ changes.xml 2001/10/16 12:26:39 1.2.2.40
@@ -4,7 +4,7 @@
<!--
History of Cocoon changes
- $Id: changes.xml,v 1.2.2.39 2001/10/16 12:01:40 cziegeler Exp $
+ $Id: changes.xml,v 1.2.2.40 2001/10/16 12:26:39 cziegeler Exp $
-->
<changes title="History of Changes">
@@ -26,6 +26,10 @@
</devs>
<release version="@version@" 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.
No revision
No revision
1.2.2.8 +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.2.2.7
retrieving revision 1.2.2.8
diff -u -r1.2.2.7 -r1.2.2.8
--- CommandLineRequest.java 2001/10/15 13:09:08 1.2.2.7
+++ CommandLineRequest.java 2001/10/16 12:26:39 1.2.2.8
@@ -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.2.2.7 $ $Date: 2001/10/15 13:09:08 $
+ * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
+ * @version CVS $Revision: 1.2.2.8 $ $Date: 2001/10/16 12:26:39 $
*/
/*
@@ -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]