Skip to content

Commit

Permalink
Oops!
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@232 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed May 9, 2009
1 parent 8d210c4 commit b41879b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/org/olap4j/mdx/IdentifierNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public IdentifierNode(List<IdentifierNode.Segment> segments) {
this.segments =
new UnmodifiableArrayList<Segment>(
segments.toArray(
new NameSegment[segments.size()]));
new Segment[segments.size()]));
}

public Type getType() {
Expand Down Expand Up @@ -422,6 +422,9 @@ public NameSegment(
this.region = region;
this.name = name;
this.quoting = quoting;
if (!(quoting == Quoting.QUOTED || quoting == Quoting.UNQUOTED)) {
throw new IllegalArgumentException();
}
}

/**
Expand Down
6 changes: 3 additions & 3 deletions testsrc/org/olap4j/test/ParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.olap4j.mdx.*;
import org.olap4j.OlapConnection;
import org.olap4j.Axis;
import org.olap4j.impl.Olap4jUtil;

import java.sql.SQLException;
import java.sql.Connection;
Expand Down Expand Up @@ -747,8 +746,9 @@ public void testIdentifier() {

// append does not mutate
IdentifierNode id2 = id.append(
new IdentifierNode.NameSegment(
null, "bar", IdentifierNode.Quoting.KEY));
new IdentifierNode.KeySegment(
new IdentifierNode.NameSegment(
null, "bar", IdentifierNode.Quoting.QUOTED)));
assertTrue(id != id2);
assertEquals("[foo]", id.toString());
assertEquals("[foo].&[bar]", id2.toString());
Expand Down

0 comments on commit b41879b

Please sign in to comment.