Skip to content

Commit

Permalink
HSEARCH-1442 Foring reset of parseContext.maxDepth _after_ having par…
Browse files Browse the repository at this point in the history
…sed an IndexedEmbedded annotation (especially when it has been set to 0)
  • Loading branch information
yrodiere authored and hferentschik committed Dec 13, 2013
1 parent 442f08a commit 9997952
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -1070,7 +1070,9 @@ private void checkForIndexedEmbedded(
if ( potentialLevel < 0 ) {
potentialLevel = Integer.MAX_VALUE;
}
parseContext.setMaxLevel( potentialLevel );
if ( potentialLevel < oldMaxLevel ) {
parseContext.setMaxLevel( potentialLevel );
}
parseContext.incrementLevel();

XClass elementClass;
Expand Down Expand Up @@ -1409,8 +1411,8 @@ public int getMaxLevel() {
return maxLevel;
}

public void setMaxLevel(int potentialLevel) {
this.maxLevel = potentialLevel > this.maxLevel ? this.maxLevel : potentialLevel;
public void setMaxLevel(int newMaxLevel) {
this.maxLevel = newMaxLevel;
}

public int getLevel() {
Expand Down

0 comments on commit 9997952

Please sign in to comment.