if (i < iMinPosSeparatorAreValid || insideParenthesis > 0 || insideList > 0 || !isCharPresent(c, iSeparator))
insideList++;
} else if (c == LIST_END) {
if (i < iMinPosSeparatorAreValid || insideParenthesis > 0 || insideList > 0 || !isCharPresent(c, iSeparator)) {
if (insideList == 0)
throw new OSerializationException("Found invalid " + LIST_END + " character at position " + i + " of text "
+ new String(iSource) + ". Ensure it is opened and closed correctly.");
insideList--;
}
} else if (c == EMBEDDED_BEGIN) {
insideParenthesis++;
} else if (c == EMBEDDED_END) {
// if (!isCharPresent(c, iRecordSeparator)) {
if (insideParenthesis == 0)
throw new OSerializationException("Found invalid " + EMBEDDED_END + " character at position " + i + " of text "
+ new String(iSource) + ". Ensure it is opened and closed correctly.");
// }
insideParenthesis--;
} else if (c == MAP_BEGIN) {
insideMap++;
} else if (c == MAP_END) {
if (i < iMinPosSeparatorAreValid || !isCharPresent(c, iSeparator)) {
if (insideMap == 0)
throw new OSerializationException("Found invalid " + MAP_END + " character at position " + i + " of text "
+ new String(iSource) + ". Ensure it is opened and closed correctly.");
insideMap--;
}
} else if (c == LINK)
// FIRST PART OF LINK
insideLinkPart = 1;
else if (insideLinkPart == 1 && c == ORID.SEPARATOR)
// SECOND PART OF LINK
insideLinkPart = 2;
else {
if (iConsiderSets)
if (c == SET_BEGIN)
insideSet++;
else if (c == SET_END) {
if (i < iMinPosSeparatorAreValid || !isCharPresent(c, iSeparator)) {
if (insideSet == 0)
throw new OSerializationException("Found invalid " + SET_END + " character at position " + i + " of text "
+ new String(iSource) + ". Ensure it is opened and closed correctly.");
insideSet--;
}
}
if (considerBags) {
if (c == BAG_BEGIN)
insideBag++;
else if (c == BAG_END)
if (!isCharPresent(c, iSeparator)) {
if (insideBag == 0)
throw new OSerializationException("Found invalid " + BAG_BEGIN
+ " character. Ensure it is opened and closed correctly.");
insideBag--;
}
}
}