Skip to content

Commit 48fcd48

Browse files
authored
Remove unnecessary scope checks (#677)
1 parent 6cc868b commit 48fcd48

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

smile/src/main/java/tools/jackson/dataformat/smile/SmileParser.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -682,9 +682,7 @@ public String nextName() throws JacksonException
682682
{
683683
if (ch > 0x37) {
684684
if (ch == 0x3B) {
685-
if (!_streamReadContext.inObject()) {
686-
_reportMismatchedEndMarker('}', ']');
687-
}
685+
// Must be in Object context, no need to check
688686
_streamReadContext = _streamReadContext.getParent();
689687
_updateToken(JsonToken.END_OBJECT);
690688
return null;
@@ -1733,9 +1731,7 @@ protected final JsonToken _handlePropertyName() throws JacksonException
17331731
{
17341732
if (ch > 0x37) {
17351733
if (ch == 0x3B) {
1736-
if (!_streamReadContext.inObject()) {
1737-
_reportMismatchedEndMarker('}', ']');
1738-
}
1734+
// Must be in Object context, no need to check
17391735
_streamReadContext = _streamReadContext.getParent();
17401736
return JsonToken.END_OBJECT;
17411737
}

0 commit comments

Comments
 (0)