Skip to content

Commit

Permalink
[FIX](NPE PentahoRepositoryAccess#getRepositoryFile) Method didn't te…
Browse files Browse the repository at this point in the history
…st if the Pentaho solution repository returned a null ISolutionFile.

It wrapped the null anyway.
Later, calling the returned IRepositoryFile's methods caused NPEs.
  • Loading branch information
dcleao committed Jul 3, 2013
1 parent be675a9 commit c736351
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ public void setUserSession(IUserSession userSession) {

@Override
public IRepositoryFile getRepositoryFile(String path, FileAccess fileAccess) {
return new PentahoRepositoryFile(getSolutionRepository().getSolutionFile(path, fileAccess.ordinal()));
ISolutionFile file = getSolutionRepository().getSolutionFile(path, fileAccess.ordinal());
return file != null ? new PentahoRepositoryFile(file) : null;
}


Expand Down

0 comments on commit c736351

Please sign in to comment.