Skip to content

Commit

Permalink
Cosmetic stuff.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@297 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Jan 9, 2010
1 parent b0ef48c commit 5218d69
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,8 @@ public List<Integer> ordinalToCoordinates(int ordinal) {
if (ordinal < 0 || ordinal >= modulo) {
throw new IndexOutOfBoundsException(
"Cell ordinal " + ordinal
+ ") lies outside CellSet bounds ("
+ getBoundsAsString() + ")");
+ ") lies outside CellSet bounds ("
+ getBoundsAsString() + ")");
}
return list;
}
Expand All @@ -682,9 +682,9 @@ public int coordinatesToOrdinal(List<Integer> coordinates) {
if (coordinate < 0 || coordinate >= axis.getPositionCount()) {
throw new IndexOutOfBoundsException(
"Coordinate " + coordinate
+ " of axis " + k
+ " is out of range ("
+ getBoundsAsString() + ")");
+ " of axis " + k
+ " is out of range ("
+ getBoundsAsString() + ")");
}
ordinal += coordinate * modulo;
modulo *= axis.getPositionCount();
Expand Down
2 changes: 1 addition & 1 deletion src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public static synchronized String nextCookie() {
public enum Property {
TestProxyCookie(
"String that uniquely identifies a proxy object via which to send "
+ "XMLA requests for testing purposes."),
+ "XMLA requests for testing purposes."),
Server("URL of HTTP server"),
Catalog("Catalog name"),
Provider("Name of the datasource provider"),
Expand Down
36 changes: 18 additions & 18 deletions testsrc/org/olap4j/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1098,17 +1098,17 @@ public void testCell() throws Exception {
cellSet =
olapStatement.executeOlapQuery(
"select from [Sales]\n"
+ "where ([Time].[1997].[Q4].[12],\n"
+ " [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer],\n"
+ " [Store].[All Stores].[USA].[WA].[Bellingham])");
+ "where ([Time].[1997].[Q4].[12],\n"
+ " [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer],\n"
+ " [Store].[All Stores].[USA].[WA].[Bellingham])");
cell = cellSet.getCell(0);
assertTrue(cell.isEmpty());

// Error cell
cellSet =
olapStatement.executeOlapQuery(
"with member [Measures].[Foo] as ' Dimensions(-1).Name '\n"
+ "select {[Measures].[Foo]} on columns from [Sales]");
+ "select {[Measures].[Foo]} on columns from [Sales]");
cell = cellSet.getCell(0);
switch (tester.getFlavor()) {
case XMLA:
Expand Down Expand Up @@ -1894,8 +1894,8 @@ public void testParentChild() throws ClassNotFoundException, SQLException {
final CellSet cellSet =
olapConnection.createStatement().executeOlapQuery(
"select {[Measures].[Org Salary]} on 0,\n"
+ " Head([Employees].Members, 10) DIMENSION PROPERTIES DEPTH ON 1\n"
+ "from [HR]");
+ " Head([Employees].Members, 10) DIMENSION PROPERTIES DEPTH ON 1\n"
+ "from [HR]");
final CellSetAxis rowsAxis = cellSet.getAxes().get(1);
assertEquals(10, rowsAxis.getPositionCount());
Member member0 = rowsAxis.getPositions().get(0).getMembers().get(0);
Expand Down Expand Up @@ -2124,8 +2124,8 @@ public void testParseQueryWithNoFilter() throws Exception {
SelectNode select =
mdxParser.parseSelect(
"select ([Gender], [Store]) on columns\n,"
+ "{[Customers].[City].Members} on rows\n"
+ "from [sales]");
+ "{[Customers].[City].Members} on rows\n"
+ "from [sales]");
select = mdxValidator.validateSelect(select);
AxisNode filterAxis = select.getFilterAxis();
assertNotNull(filterAxis);
Expand All @@ -2135,9 +2135,9 @@ public void testParseQueryWithNoFilter() throws Exception {
select =
mdxParser.parseSelect(
"select ([Gender], [Store]) on columns\n,"
+ "{[Customers].[City].Members} on rows\n"
+ "from [sales]\n"
+ "where ()");
+ "{[Customers].[City].Members} on rows\n"
+ "from [sales]\n"
+ "where ()");
fail("expected parse error, got " + select);
} catch (RuntimeException e) {
assertTrue(
Expand Down Expand Up @@ -2166,8 +2166,8 @@ public void testValidateError() throws Exception {
SelectNode select =
mdxParser.parseSelect(
"select ([Gender], [Store]) on columns\n,"
+ "crossjoin([Customers].[City].Members, [Gender].members) on rows\n"
+ "from [sales]");
+ "crossjoin([Customers].[City].Members, [Gender].members) on rows\n"
+ "from [sales]");
AxisNode filterAxis = select.getFilterAxis();
assertNotNull(filterAxis);
assertNull(filterAxis.getExpression());
Expand Down Expand Up @@ -2222,8 +2222,8 @@ public void run() {
try {
final CellSet cellSet = olapStatement.executeOlapQuery(
"SELECT [Customers].Members * \n"
+ " [Time].Members on columns\n"
+ "from [Sales]");
+ " [Time].Members on columns\n"
+ "from [Sales]");
fail(
"expected exception indicating stmt had been canceled,"
+ " got cellSet " + cellSet);
Expand Down Expand Up @@ -2252,9 +2252,9 @@ public void testStatementTimeout() throws Throwable {
final CellSet cellSet =
olapStatement.executeOlapQuery(
"SELECT [Store].Members * \n"
+ " [Customers].Members * \n"
+ " [Time].Members on columns\n"
+ "from [Sales]");
+ " [Customers].Members * \n"
+ " [Time].Members on columns\n"
+ "from [Sales]");
fail(
"expected exception indicating timeout,"
+ " got cellSet " + cellSet);
Expand Down
6 changes: 3 additions & 3 deletions testsrc/org/olap4j/OlapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public void testModel() {
Class.forName("mondrian.olap4j.MondrianOlap4jDriver");
connection = DriverManager.getConnection(
"jdbc:mondrian:Jdbc=" + jdbc
+ ";User=" + userName
+ ";Password=" + password
+ ";Catalog=" + schemaUri);
+ ";User=" + userName
+ ";Password=" + password
+ ";Catalog=" + schemaUri);
} else {
connection = tester.createConnection();
}
Expand Down
6 changes: 3 additions & 3 deletions testsrc/org/olap4j/impl/ConnectStringParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ public void testBug1938151 () {
// actual testcase for bug
properties = ConnectStringParser.parseConnectString(
"provider=mondrian; JdbcDrivers=org.hsqldb.jdbcDriver;"
+ "Jdbc=jdbc:hsqldb:./sql/sampledata;"
+ "Catalog=C:\\cygwin\\home\\src\\jfreereport\\engines\\classic\\extensions-mondrian\\demo\\steelwheels.mondrian.xml;"
+ "JdbcUser=sa; JdbcPassword=; ");
+ "Jdbc=jdbc:hsqldb:./sql/sampledata;"
+ "Catalog=C:\\cygwin\\home\\src\\jfreereport\\engines\\classic\\extensions-mondrian\\demo\\steelwheels.mondrian.xml;"
+ "JdbcUser=sa; JdbcPassword=; ");
assertEquals(6, properties.size());
assertEquals("", properties.get("JdbcPassword"));
}
Expand Down

0 comments on commit 5218d69

Please sign in to comment.