Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix null pointer exception for large document list in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed May 21, 2015
1 parent 485f1b5 commit 86b9334
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/release-notes.md
Expand Up @@ -18,6 +18,7 @@ The Zanata installer's configuration now enables "connection debugging" to preve
<h5>Bugfixes</h5>
* [1207575](https://bugzilla.redhat.com/show_bug.cgi?id=1207575) - Zanata still creates MyISAM (not InnoDB) tables in some cases
* [1197955](https://bugzilla.redhat.com/show_bug.cgi?id=1197955) - [WildFly] IllegalStateException: UT000010: Session not found
* [[1197955]](https://bugzilla.redhat.com/show_bug.cgi?id=1223597) - Statistic on last page in document list view in Editor always loading

-----------------------

Expand Down
Expand Up @@ -464,20 +464,22 @@ public void onProjectStatsUpdated(RefreshProjectStatsEvent event) {
ContainerTranslationStatistics statsContainer =
documentNode.getDocInfo().getStats();

TranslationStatistics msgStats =
statsContainer.getStats(localeId.getId(), StatUnit.MESSAGE);
if(statsContainer != null) {
TranslationStatistics msgStats =
statsContainer.getStats(localeId.getId(), StatUnit.MESSAGE);

if (msgStats != null) {
projectStats.getStats(localeId.getId(), StatUnit.MESSAGE).add(
msgStats);
}
if (msgStats != null) {
projectStats.getStats(localeId.getId(), StatUnit.MESSAGE).add(
msgStats);
}

TranslationStatistics wordStats =
statsContainer.getStats(localeId.getId(), StatUnit.WORD);
TranslationStatistics wordStats =
statsContainer.getStats(localeId.getId(), StatUnit.WORD);

if (wordStats != null) {
projectStats.getStats(localeId.getId(), StatUnit.WORD).add(
wordStats);
if (wordStats != null) {
projectStats.getStats(localeId.getId(), StatUnit.WORD).add(
wordStats);
}
}
}
refreshStatsDisplay();
Expand Down

0 comments on commit 86b9334

Please sign in to comment.