Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e4b2fdb

Browse files
committedJun 30, 2009
Comply with new checkFile rules.
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
1 parent bf0c6dc commit e4b2fdb

26 files changed

+693
-330
lines changed
 

‎src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,8 @@ public void handle(
836836
<ROLES>California manager,No HR Cube</ROLES>
837837
</row>
838838
*/
839-
String catalogName = XmlaOlap4jUtil.stringElement(row, "CATALOG_NAME");
839+
String catalogName =
840+
XmlaOlap4jUtil.stringElement(row, "CATALOG_NAME");
840841
// Unused: DESCRIPTION, ROLES
841842
list.add(
842843
new XmlaOlap4jCatalog(
@@ -1328,7 +1329,9 @@ static class CatalogSchemaHandler extends HandlerImpl<XmlaOlap4jSchema> {
13281329
public CatalogSchemaHandler(String catalogName) {
13291330
super();
13301331
if (catalogName == null) {
1331-
throw new RuntimeException("The CatalogSchemaHandler handler requires a catalog name.");
1332+
throw new RuntimeException(
1333+
"The CatalogSchemaHandler handler requires a catalog "
1334+
+ "name.");
13321335
}
13331336
this.catalogName = catalogName;
13341337
}
@@ -1891,7 +1894,8 @@ public MetadataColumn getColumn(String name) {
18911894
}
18921895
}
18931896

1894-
private static final Pattern LOWERCASE_PATTERN = Pattern.compile(".*[a-z].*");
1897+
private static final Pattern LOWERCASE_PATTERN =
1898+
Pattern.compile(".*[a-z].*");
18951899

18961900
static class MetadataColumn {
18971901
final String name;

‎src/org/olap4j/driver/xmla/cache/XmlaOlap4jNamedMemoryCache.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,17 @@ public static enum Property {
6969
* The number of entries to maintain in cache under
7070
* the given cache name.
7171
*/
72-
Size("Maximum number of SOAP requests which will be cached under the given cache name."),
72+
Size(
73+
"Maximum number of SOAP requests which will be cached under the "
74+
+ "given cache name."),
7375

7476
/**
7577
* The number of seconds to maintain
7678
* entries in cache before expiration.
7779
*/
78-
Timeout("Maximum TTL of SOAP requests which will be cached under the given cache name."),
80+
Timeout(
81+
"Maximum TTL of SOAP requests which will be cached under the given "
82+
+ "cache name."),
7983

8084
/**
8185
* Eviction mode. Supported eviction modes are

‎src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCookieManager.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ public void storeCookies(URLConnection conn) {
123123
domainStore.put(name, cookie);
124124
cookie.put(name, value);
125125

126-
if (this.debug == true) {
127-
System.out.println("Saving cookie : " + name + "=" + value);
126+
if (this.debug) {
127+
System.out.println(
128+
"Saving cookie : " + name + "=" + value);
128129
}
129130
}
130131

@@ -198,7 +199,7 @@ && isNotExpired((String) cookie.get(EXPIRES)))
198199
}
199200
}
200201
try {
201-
if (this.debug == true
202+
if (this.debug
202203
&& !(cookieStringBuffer.toString().equals("")))
203204
{
204205
System.out.println(

‎src/org/olap4j/driver/xmla/proxy/XmlaOlap4jHttpProxy.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ public byte[] getResponse(URL url, String request)
103103
// The response will only be available here anyways.
104104
} catch (Exception e) {
105105
throw new XmlaOlap4jProxyException(
106-
"This proxy encountered an exception while processing the query.", e);
106+
"This proxy encountered an exception while processing the "
107+
+ "query.",
108+
e);
107109
}
108110
}
109111

‎src/org/olap4j/mdx/IdentifierNode.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ public IdentifierNode deepCopy() {
181181
* was {@link Quoting quoted}. For example,
182182
*
183183
* <blockquote><code>
184-
* parseIdentifier("[Customers].USA.[South Dakota].[Sioux Falls].&amp;[1245]")
184+
* parseIdentifier(
185+
* "[Customers].USA.[South Dakota].[Sioux Falls].&amp;[1245]")
185186
* </code></blockquote>
186187
*
187188
* returns

‎src/org/olap4j/mdx/parser/impl/DefaultMdxParser.cup

+11-10
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ parser code {:
9595
return (ParseTreeNode) parse_tree.value;
9696
} catch (Exception e) {
9797
throw new RuntimeException(
98-
"Syntax error while parsing MDX expression '" + queryString +
99-
"'",
98+
"Syntax error while parsing MDX expression '" + queryString
99+
+ "'",
100100
e);
101101
} finally {
102102
this.scanner = null;
@@ -151,9 +151,9 @@ parser code {:
151151
List<IdentifierNode> cellProps)
152152
{
153153
final AxisNode filterAxis =
154-
filter == null ?
155-
null :
156-
new AxisNode(
154+
filter == null
155+
? null
156+
: new AxisNode(
157157
filter.getRegion(), false, Axis.FILTER,
158158
Collections.<IdentifierNode>emptyList(), filter);
159159
// sort axes by ordinal
@@ -202,8 +202,8 @@ parser code {:
202202
scanner.createRegion(cur_token.left, cur_token.right);
203203
throw new MdxParseException(
204204
region,
205-
"Syntax error at " + region +
206-
", token '" + s + "'");
205+
"Syntax error at " + region
206+
+ ", token '" + s + "'");
207207
} else {
208208
throw new RuntimeException(
209209
"Syntax error at token '" + s + "'");
@@ -763,7 +763,8 @@ term3 ::=
763763
ParseRegion region = createRegion(xleft, nright);
764764
RESULT = new CallNode(region, "IS NULL", Syntax.Postfix, x);
765765
:}
766-
| term3:x IS term2:y {: // e.g. "x IS y"; but "x IS NULL" is handled elsewhere
766+
| term3:x IS term2:y {:
767+
// e.g. "x IS y"; but "x IS NULL" is handled elsewhere
767768
ParseRegion region = createRegion(xleft, yright);
768769
RESULT = new CallNode(region, "IS", Syntax.Infix, x, y);
769770
:}
@@ -1502,8 +1503,8 @@ axis_specification ::=
15021503
if (index < 0 || index != d) {
15031504
throw new MdxParseException(
15041505
createRegion(nleft, nright),
1505-
"Invalid axis specification. The axis number must be a " +
1506-
"non-negative integer, but it was " + d + ".");
1506+
"Invalid axis specification. The axis number must be a "
1507+
+ "non-negative integer, but it was " + d + ".");
15071508
}
15081509

15091510
Axis axis = Axis.Factory.forOrdinal(index);

‎src/org/olap4j/metadata/Datatype.java

+31-5
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,19 @@ public enum Datatype {
3131

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

34-
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."),
35-
36-
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."),
34+
CURRENCY(
35+
6,
36+
"DBTYPE_CY",
37+
"A currency value: LARGE_INTEGER, Currency is a fixed-point number with "
38+
+ "four digits to the right of the decimal point. It is stored in an "
39+
+ "eight-byte signed integer, scaled by 10,000."),
40+
41+
BOOLEAN(
42+
11,
43+
"DBTYPE_BOOL",
44+
"A Boolean value stored in the same way as in Automation: VARIANT_BOOL; "
45+
+ "0 means false and ~0 (bitwise, the value is not 0; that is, all bits "
46+
+ "are set to 1) means true."),
3747

3848
/**
3949
* Used by SQL Server for value.
@@ -54,12 +64,28 @@ public enum Datatype {
5464
* The following values exactly match VARENUM
5565
* in Automation but cannot be used in VARIANT.
5666
*/
57-
LARGE_INTEGER(20, "DBTYPE_I8", "An eight-byte, signed integer: LARGE_INTEGER"),
67+
LARGE_INTEGER(
68+
20,
69+
"DBTYPE_I8",
70+
"An eight-byte, signed integer: LARGE_INTEGER"),
5871

5972
/*
6073
* The following values are not in VARENUM in OLE.
6174
*/
62-
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.");
75+
STRING(
76+
130,
77+
"DBTYPE_WSTR",
78+
"A null-terminated Unicode character string: wchar_t[length]; If "
79+
+ "DBTYPE_WSTR is used by itself, the number of bytes allocated "
80+
+ "for the string, including the null-termination character, is "
81+
+ "specified by cbMaxLen in the DBBINDING structure. If "
82+
+ "DBTYPE_WSTR is combined with DBTYPE_BYREF, the number of bytes "
83+
+ "allocated for the string, including the null-termination character, "
84+
+ "is at least the length of the string plus two. In either case, the "
85+
+ "actual length of the string is determined from the bound length "
86+
+ "value. The maximum length of the string is the number of allocated "
87+
+ "bytes divided by sizeof(wchar_t) and truncated to the nearest "
88+
+ "integer.");
6389

6490
private final int xmlaOrdinal;
6591

0 commit comments

Comments
 (0)
Please sign in to comment.