Skip to content

Commit

Permalink
backout revision 26, return to revision 25
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 752]
  • Loading branch information
hhaas committed Sep 5, 2003
1 parent 95bcdc6 commit 807b408
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/main/mondrian/olap/Query.java
Expand Up @@ -1083,9 +1083,8 @@ public Parameter lookupParam(String parameterName)
/**
* Validates each parameter, calculates their usage, and removes unused
* parameters.
* @return the array of parameter usage counts
*/
private int[] resolveParameters() {
private void resolveParameters() {
//validate definitions
for (int i = 0; i < parameters.length; i++) {
parameters[i].validate(this);
Expand All @@ -1108,28 +1107,15 @@ private int[] resolveParameters() {
}
}
}
return usageCount;
}

/**
* Returns the parameters used in this query.
**/
public Parameter[] getParameters()
{
int[] usageCount = resolveParameters();
// count the parameters which are currently used
int nUsed = 0;
for ( int i = 0; i < usageCount.length; i++ ) {
if ( usageCount[i] > 0 )
nUsed++;
}
Parameter[] usedParameters = new Parameter[nUsed];
nUsed = 0;
for ( int i = 0; i < parameters.length; i++ ) {
if ( usageCount[i] > 0 )
usedParameters[nUsed++] = parameters[i];
}
return usedParameters;
resolveParameters();
return parameters;
}

void resetParametersPrintProperty()
Expand Down

0 comments on commit 807b408

Please sign in to comment.