Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MONDRIAN-2467] ValidMeasure with a null tuple throws NPE #674

Merged
merged 1 commit into from
Mar 25, 2016

Conversation

ivanpogodin
Copy link
Contributor

No description provided.

@ivanpogodin
Copy link
Contributor Author

@mkambol , could you review it, please?

By the way
If there is no Measure in ValidMeasure arguments, the error is NPE. It's better to throw a more helpful exception, isn't it?

@ivanpogodin
Copy link
Contributor Author

@mkambol , @kurtwalker , @lucboudreau , could you review it?
The customer has requested an escalation on this JIRA.
http://jira.pentaho.com/browse/MONDRIAN-2467

@mkambol mkambol self-assigned this Mar 25, 2016
@kurtwalker
Copy link
Contributor

Did you experiment with returning an empty list instead of null? May be inviting a different null pointer exception later by returning null here

@ivanpogodin
Copy link
Contributor Author

@kurtwalker ,
Yes, I've checked it.
getCalcsMembers is a private method, there is the null control after calling it
https://github.com/pentaho/mondrian/pull/674/files#diff-65efb9fa344d708455af9d59b6928008R72

@kurtwalker
Copy link
Contributor

great. 👍

@mkambol mkambol merged commit dbecbba into pentaho:master Mar 25, 2016
@mkambol
Copy link
Contributor

mkambol commented Mar 25, 2016

@ivanpogodin, regarding having no measure, I would actually expect the default measure to be used in that scenario, since a tuple should implicitly include the default member of each hierarchy not explicitly referenced. SSAS returns a NULL in that case, though, so might be better to mimic their behavior.

Either way, throwing a NPE or OOB is not great. Can you log a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants