Skip to content

Commit

Permalink
Comply with new checkFile rules.
Browse files Browse the repository at this point in the history
Remove calls to fold, and instead call assertEqualsVerbose, which calls fold internally.


git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@253 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Jun 30, 2009
1 parent bf0c6dc commit e4b2fdb
Show file tree
Hide file tree
Showing 26 changed files with 693 additions and 330 deletions.
10 changes: 7 additions & 3 deletions src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,8 @@ public void handle(
<ROLES>California manager,No HR Cube</ROLES>
</row>
*/
String catalogName = XmlaOlap4jUtil.stringElement(row, "CATALOG_NAME");
String catalogName =
XmlaOlap4jUtil.stringElement(row, "CATALOG_NAME");
// Unused: DESCRIPTION, ROLES
list.add(
new XmlaOlap4jCatalog(
Expand Down Expand Up @@ -1328,7 +1329,9 @@ static class CatalogSchemaHandler extends HandlerImpl<XmlaOlap4jSchema> {
public CatalogSchemaHandler(String catalogName) {
super();
if (catalogName == null) {
throw new RuntimeException("The CatalogSchemaHandler handler requires a catalog name.");
throw new RuntimeException(
"The CatalogSchemaHandler handler requires a catalog "
+ "name.");
}
this.catalogName = catalogName;
}
Expand Down Expand Up @@ -1891,7 +1894,8 @@ public MetadataColumn getColumn(String name) {
}
}

private static final Pattern LOWERCASE_PATTERN = Pattern.compile(".*[a-z].*");
private static final Pattern LOWERCASE_PATTERN =
Pattern.compile(".*[a-z].*");

static class MetadataColumn {
final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,17 @@ public static enum Property {
* The number of entries to maintain in cache under
* the given cache name.
*/
Size("Maximum number of SOAP requests which will be cached under the given cache name."),
Size(
"Maximum number of SOAP requests which will be cached under the "
+ "given cache name."),

/**
* The number of seconds to maintain
* entries in cache before expiration.
*/
Timeout("Maximum TTL of SOAP requests which will be cached under the given cache name."),
Timeout(
"Maximum TTL of SOAP requests which will be cached under the given "
+ "cache name."),

/**
* Eviction mode. Supported eviction modes are
Expand Down
7 changes: 4 additions & 3 deletions src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCookieManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ public void storeCookies(URLConnection conn) {
domainStore.put(name, cookie);
cookie.put(name, value);

if (this.debug == true) {
System.out.println("Saving cookie : " + name + "=" + value);
if (this.debug) {
System.out.println(
"Saving cookie : " + name + "=" + value);
}
}

Expand Down Expand Up @@ -198,7 +199,7 @@ && isNotExpired((String) cookie.get(EXPIRES)))
}
}
try {
if (this.debug == true
if (this.debug
&& !(cookieStringBuffer.toString().equals("")))
{
System.out.println(
Expand Down
4 changes: 3 additions & 1 deletion src/org/olap4j/driver/xmla/proxy/XmlaOlap4jHttpProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ public byte[] getResponse(URL url, String request)
// The response will only be available here anyways.
} catch (Exception e) {
throw new XmlaOlap4jProxyException(
"This proxy encountered an exception while processing the query.", e);
"This proxy encountered an exception while processing the "
+ "query.",
e);
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/org/olap4j/mdx/IdentifierNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ public IdentifierNode deepCopy() {
* was {@link Quoting quoted}. For example,
*
* <blockquote><code>
* parseIdentifier("[Customers].USA.[South Dakota].[Sioux Falls].&amp;[1245]")
* parseIdentifier(
* "[Customers].USA.[South Dakota].[Sioux Falls].&amp;[1245]")
* </code></blockquote>
*
* returns
Expand Down
21 changes: 11 additions & 10 deletions src/org/olap4j/mdx/parser/impl/DefaultMdxParser.cup
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ parser code {:
return (ParseTreeNode) parse_tree.value;
} catch (Exception e) {
throw new RuntimeException(
"Syntax error while parsing MDX expression '" + queryString +
"'",
"Syntax error while parsing MDX expression '" + queryString
+ "'",
e);
} finally {
this.scanner = null;
Expand Down Expand Up @@ -151,9 +151,9 @@ parser code {:
List<IdentifierNode> cellProps)
{
final AxisNode filterAxis =
filter == null ?
null :
new AxisNode(
filter == null
? null
: new AxisNode(
filter.getRegion(), false, Axis.FILTER,
Collections.<IdentifierNode>emptyList(), filter);
// sort axes by ordinal
Expand Down Expand Up @@ -202,8 +202,8 @@ parser code {:
scanner.createRegion(cur_token.left, cur_token.right);
throw new MdxParseException(
region,
"Syntax error at " + region +
", token '" + s + "'");
"Syntax error at " + region
+ ", token '" + s + "'");
} else {
throw new RuntimeException(
"Syntax error at token '" + s + "'");
Expand Down Expand Up @@ -763,7 +763,8 @@ term3 ::=
ParseRegion region = createRegion(xleft, nright);
RESULT = new CallNode(region, "IS NULL", Syntax.Postfix, x);
:}
| term3:x IS term2:y {: // e.g. "x IS y"; but "x IS NULL" is handled elsewhere
| term3:x IS term2:y {:
// e.g. "x IS y"; but "x IS NULL" is handled elsewhere
ParseRegion region = createRegion(xleft, yright);
RESULT = new CallNode(region, "IS", Syntax.Infix, x, y);
:}
Expand Down Expand Up @@ -1502,8 +1503,8 @@ axis_specification ::=
if (index < 0 || index != d) {
throw new MdxParseException(
createRegion(nleft, nright),
"Invalid axis specification. The axis number must be a " +
"non-negative integer, but it was " + d + ".");
"Invalid axis specification. The axis number must be a "
+ "non-negative integer, but it was " + d + ".");
}

Axis axis = Axis.Factory.forOrdinal(index);
Expand Down
36 changes: 31 additions & 5 deletions src/org/olap4j/metadata/Datatype.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ public enum Datatype {

DOUBLE(5, "DBTYPE_R8", "A double-precision floating-point value: Double"),

CURRENCY(6, "DBTYPE_CY", "A currency value: LARGE_INTEGER, Currency is a fixed-point number with four digits to the right of the decimal point. It is stored in an eight-byte signed integer, scaled by 10,000."),

BOOLEAN(11, "DBTYPE_BOOL", "A Boolean value stored in the same way as in Automation: VARIANT_BOOL; 0 means false and ~0 (bitwise, the value is not 0; that is, all bits are set to 1) means true."),
CURRENCY(
6,
"DBTYPE_CY",
"A currency value: LARGE_INTEGER, Currency is a fixed-point number with "
+ "four digits to the right of the decimal point. It is stored in an "
+ "eight-byte signed integer, scaled by 10,000."),

BOOLEAN(
11,
"DBTYPE_BOOL",
"A Boolean value stored in the same way as in Automation: VARIANT_BOOL; "
+ "0 means false and ~0 (bitwise, the value is not 0; that is, all bits "
+ "are set to 1) means true."),

/**
* Used by SQL Server for value.
Expand All @@ -54,12 +64,28 @@ public enum Datatype {
* The following values exactly match VARENUM
* in Automation but cannot be used in VARIANT.
*/
LARGE_INTEGER(20, "DBTYPE_I8", "An eight-byte, signed integer: LARGE_INTEGER"),
LARGE_INTEGER(
20,
"DBTYPE_I8",
"An eight-byte, signed integer: LARGE_INTEGER"),

/*
* The following values are not in VARENUM in OLE.
*/
STRING(130, "DBTYPE_WSTR", "A null-terminated Unicode character string: wchar_t[length]; If DBTYPE_WSTR is used by itself, the number of bytes allocated for the string, including the null-termination character, is specified by cbMaxLen in the DBBINDING structure. If DBTYPE_WSTR is combined with DBTYPE_BYREF, the number of bytes allocated for the string, including the null-termination character, is at least the length of the string plus two. In either case, the actual length of the string is determined from the bound length value. The maximum length of the string is the number of allocated bytes divided by sizeof(wchar_t) and truncated to the nearest integer.");
STRING(
130,
"DBTYPE_WSTR",
"A null-terminated Unicode character string: wchar_t[length]; If "
+ "DBTYPE_WSTR is used by itself, the number of bytes allocated "
+ "for the string, including the null-termination character, is "
+ "specified by cbMaxLen in the DBBINDING structure. If "
+ "DBTYPE_WSTR is combined with DBTYPE_BYREF, the number of bytes "
+ "allocated for the string, including the null-termination character, "
+ "is at least the length of the string plus two. In either case, the "
+ "actual length of the string is determined from the bound length "
+ "value. The maximum length of the string is the number of allocated "
+ "bytes divided by sizeof(wchar_t) and truncated to the nearest "
+ "integer.");

private final int xmlaOrdinal;

Expand Down
Loading

0 comments on commit e4b2fdb

Please sign in to comment.