Skip to content

Commit

Permalink
MONDRIAN: Fix broken junit test for FunctionTest::testPropertyInCalcu…
Browse files Browse the repository at this point in the history
…latedMember

[git-p4: depot-paths = "//open/mondrian/": change = 6572]
  • Loading branch information
Benny Chow committed May 14, 2006
1 parent 099ed38 commit 4ed373f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main/mondrian/rolap/RolapMember.java
Expand Up @@ -96,10 +96,11 @@ private static int setAllChildren(
*/
private static String keyToString(Object key) {
String name = null;
if (key == null)
if (key == null) {
name = RolapUtil.mdxNullLiteral;
else
} else {
name = key.toString();
}
if ((key instanceof Number) && name.endsWith(".0")) {
name = name.substring(0, name.length() - 2);
}
Expand Down Expand Up @@ -238,12 +239,14 @@ public synchronized void setProperty(String name, Object value) {
// the empty map is shared and immutable; create our own
mapPropertyNameToValue = new HashMap();
}
if (value == null)
value = RolapUtil.mdxNullLiteral;
mapPropertyNameToValue.put(name, value);
if (name.equals(Property.NAME.name)) {
setUniqueName(value);
if (value == null) {
value = RolapUtil.mdxNullLiteral;
}
setUniqueName(value);
}
mapPropertyNameToValue.put(name, value);

}

public Object getPropertyValue(String name) {
Expand Down

0 comments on commit 4ed373f

Please sign in to comment.