Skip to content

Commit

Permalink
Revert "Allow nullable subscript/superscript for brackets. subscript …
Browse files Browse the repository at this point in the history
…default …"
  • Loading branch information
egonw committed Apr 27, 2017
1 parent ba1a266 commit db99555
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Expand Up @@ -264,11 +264,9 @@ public int compare(PolymerSgroup a, PolymerSgroup b) {
sb.append(':');
appendIntegers(ordering, ',', sb, sgroup.atomset);
sb.append(':');
if (sgroup.subscript != null)
sb.append(sgroup.subscript);
sb.append(sgroup.subscript);
sb.append(':');
if (sgroup.supscript != null)
sb.append(sgroup.supscript.toLowerCase(Locale.ROOT));
sb.append(sgroup.supscript.toLowerCase(Locale.ROOT));
}
}

Expand Down
Expand Up @@ -117,7 +117,7 @@ static final class PolymerSgroup {
final String supscript;

PolymerSgroup(String type, List<Integer> atomset, String subscript, String supscript) {
assert type != null && atomset != null;
assert type != null && atomset != null && subscript != null && supscript != null;
this.type = type;
this.atomset = new ArrayList<>(atomset);
this.subscript = subscript;
Expand Down
Expand Up @@ -836,11 +836,10 @@ else if (val == CxSmilesState.Radical.Trivalent)
case CtabGeneric:
case CtabComponent:
case CtabGraft:
String supscript = sgroup.getValue(SgroupKey.CtabConnectivity);
state.sgroups.add(new CxSmilesState.PolymerSgroup(getSgroupPolymerKey(sgroup),
toAtomIdxs(sgroup.getAtoms(), atomidx),
sgroup.getSubscript(),
supscript));
(String) sgroup.getValue(SgroupKey.CtabConnectivity)));
break;

case ExtMulticenter:
Expand Down

0 comments on commit db99555

Please sign in to comment.