From: Niels Erik G. Nielsen Date: Tue, 25 Jun 2013 17:49:40 +0000 (-0400) Subject: Fixes vararg issue in Glassfish EL X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=refs%2Fheads%2Fglassfish-version;p=mkjsf-moved-to-github.git Fixes vararg issue in Glassfish EL The JSF 2.0 expression language in Glassfish does not support Java varargs. Converted to a semicolon separated list. --- diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/Pazpar2Command.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/Pazpar2Command.java index 25ea8db..0a609c6 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/Pazpar2Command.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/Pazpar2Command.java @@ -85,9 +85,11 @@ public abstract class Pazpar2Command implements Serializable { * * @return Response data object based on the Pazpar2 service response */ - public ResponseDataObject runWith(String... parameters) { - for (String parameter : parameters) { - StringTokenizer tokenizer = new StringTokenizer(parameter,"="); + public ResponseDataObject runWith(String parameters) { + StringTokenizer expressions = new StringTokenizer(parameters,";"); + while (expressions.hasMoreTokens()) { + String expression = expressions.nextToken(); + StringTokenizer tokenizer = new StringTokenizer(expression,"="); String name = (String) tokenizer.nextElement(); String value = (String) tokenizer.nextElement(); CommandParameter commandParameter = new CommandParameter(name,"=",value);