Skip to content

Commit

Permalink
Oops: fix for JDK 1.5, and fix typo in ant classpath; update web home…
Browse files Browse the repository at this point in the history
… page for 0.9.3.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@53 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Dec 14, 2007
1 parent 179dd06 commit 84e5841
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 21 deletions.
11 changes: 6 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,17 @@ ${jar-jdk14.file}"/>
<!-- To use the checked in mondrian.jar, make sure the <pathelement>
element following this comment is uncommented; to develop code against
'live' mondrian source code, uncomment <pathelement> elements 2 and 3
following this comment. Between releases, we don't keep mondrian.jar
up to date, so probably the latter option is the only one which will
work. One day the mondrian driver will be part of the mondrian source
code and all mondrian dependencies will go away. -->
following this comment. If the latter, you will also need to define
mondrian.dir in build.properties. Between releases, we don't keep
mondrian.jar up to date, so probably the latter option is the only one
which will work. One day the mondrian driver will be part of the
mondrian source code and all mondrian dependencies will go away. -->
<!--
<pathelement location="${lib.dir}/mondrian.jar"/>
-->
<pathelement location="${mondrian.dir}/classes"/>
<pathelement location="${mondrian.dir}/testclasses"/>
-->

<!-- The following libraries are required by mondrian, and therefore olap4j
needs them too, for now. When olap4j no longer depends on
mondrian, and the mondrian olap4j driver is tested as part of
Expand Down
4 changes: 2 additions & 2 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@

<tr>
<td width="100%" valign="top" style="padding-bottom: 10px;"><h4>Status</h4>
<p>The olap4j specification will go beta in early December 2007. The second release candidate, olap4j-0.9.2, is available for download now.</p><br/>
<p><b>olap4j is beta!</b> olap4j-0.9.3 (beta) was released on December 10th, 2007.</p><br/>
<p>The olap4j release includes the specification, a reference implementation of the API in the form of a olap4j driver for mondrian, and a Test Compatibility Kit (TCK) consisting of a suite of JUnit tests. In the 0.9 beta release, the API includes full support for managing connections, statements, multidimensional result sets, parsing and validating MDX, and managing metadata.</p>
<h4>Resources</h4>
<ul>
Expand Down Expand Up @@ -202,8 +202,8 @@ <h5 style="margin-top: 5px;">Projects</h5>
</ul>
<h5>Companies</h5>
<ul style="white-space:nowrap">
<li><a href="http://www.jedox.com">Jedox</a></li>
<li><a href="http://www.jaspersoft.com">JasperSoft</a></li>
<li><a href="http://www.jedox.com">Jedox</a></li>
<li><a href="http://www.loyaltymatrix.com">Loyalty Matrix</a></li>
<li><a href="http://www.lucidera.com">LucidEra</a></li>
<li><a href="http://www.pentaho.org">Pentaho</a></li>
Expand Down
11 changes: 7 additions & 4 deletions src/org/olap4j/driver/xmla/FactoryJdbc3Impl.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public XmlaOlap4jCellSet newCellSet(

public XmlaOlap4jPreparedStatement newPreparedStatement(
String mdx,
XmlaOlap4jConnection olap4jConnection)
XmlaOlap4jConnection olap4jConnection) throws OlapException
{
return new FactoryJdbc3Impl.XmlaOlap4jPreparedStatementJdbc3(
olap4jConnection, mdx);
Expand All @@ -73,16 +73,19 @@ public XmlaOlap4jDatabaseMetaData newDatabaseMetaData(
// Inner classes

private static class XmlaOlap4jPreparedStatementJdbc3
extends XmlaOlap4jPreparedStatement {
extends XmlaOlap4jPreparedStatement
{
public XmlaOlap4jPreparedStatementJdbc3(
XmlaOlap4jConnection olap4jConnection,
String mdx) {
String mdx) throws OlapException
{
super(olap4jConnection, mdx);
}
}

private static class XmlaOlap4jCellSetJdbc3
extends XmlaOlap4jCellSet {
extends XmlaOlap4jCellSet
{
public XmlaOlap4jCellSetJdbc3(
XmlaOlap4jStatement olap4jStatement) throws OlapException
{
Expand Down
14 changes: 6 additions & 8 deletions src/org/olap4j/impl/ArrayMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public boolean containsKey(Object key) {

private int indexOfKey(Object key) {
for (int i = 0; i < keyValues.length; i += 2) {
if (equal(keyValues[i], key)) {
if (Olap4jUtil.equal(keyValues[i], key)) {
return i;
}
}
Expand All @@ -76,7 +76,7 @@ private int indexOfKey(Object key) {

public boolean containsValue(Object value) {
for (int i = 1; i < keyValues.length; i += 2) {
if (equal(keyValues[i], value)) {
if (Olap4jUtil.equal(keyValues[i], value)) {
return true;
}
}
Expand Down Expand Up @@ -151,10 +151,6 @@ public Set<Entry<K, V>> entrySet() {
return new EntrySet();
}

private static <T> boolean equal(T t1, T t2) {
return t1 == null ? t2 == null : t1.equals(t2);
}

private class KeySet extends AbstractSet<K> {
public Iterator<K> iterator() {
return new Iterator<K>() {
Expand Down Expand Up @@ -199,8 +195,10 @@ public boolean hasNext() {
}

public Entry<K, V> next() {
final AbstractMap.SimpleEntry<K, V> entry =
new AbstractMap.SimpleEntry<K, V>(
// We would use AbstractMap.SimpleEntry but it is not public
// until JDK 1.6.
final Entry<K, V> entry =
new Pair<K,V>(
(K) keyValues[i], (V) keyValues[i + 1]);
i += 2;
return entry;
Expand Down
3 changes: 3 additions & 0 deletions src/org/olap4j/mdx/IdentifierNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ static void quoteMdxIdentifier(
* <li>"New Mexico", {@link IdentifierNode.Quoting#QUOTED}</li>
* <li>"45", {@link IdentifierNode.Quoting#KEY}</li>
* </ul>
*
* To parse an identifier into a list of segments, use the method
* {@link IdentifierNode#parseIdentifier(String)}.</p>
*/
public static class Segment {
final String name;
Expand Down
6 changes: 5 additions & 1 deletion test.properties.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

# Path to the FoodMart.xml catalog file.
# Must be specified if you are using XmlaTester; there is no default.
#org.olap4j.XmlaTester.CatalogUrl=/a/path/mondrian/demo/FoodMart.xml
#org.olap4j.XmlaTester.CatalogUrl=file:/a/path/mondrian/demo/FoodMart.xml

# Classpath for your JDBC driver. Only required if the driver isn't already on
# the classpath.
#org.olap4j.test.driverClasspath=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/jdbc/lib/ojdbc14.jar

# End test.properties.example
2 changes: 1 addition & 1 deletion testsrc/org/olap4j/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public void testInvalidStatement() throws SQLException {
}
}
// Error does not cause statement to become closed.
assertFalse(olapStatement.isClosed());
assertIsClosed(olapStatement, false);
olapStatement.close();
connection.close();
}
Expand Down

0 comments on commit 84e5841

Please sign in to comment.