Skip to content

Commit

Permalink
#40: Occurrence constants are misspelled
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed Oct 19, 2023
1 parent 5e9132f commit d0809fe
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,32 @@ void attributeDecl(String elementName, String attributeName, String attributeTyp
*/
void connector(short connectorType) throws SAXException;

short OCCURENCE_ZERO_OR_MORE = 0;
short OCCURENCE_ONE_OR_MORE = 1;
short OCCURENCE_ZERO_OR_ONE = 2;
short OCCURENCE_ONCE = 3;
short OCCURRENCE_ZERO_OR_MORE = 0;
short OCCURRENCE_ONE_OR_MORE = 1;
short OCCURRENCE_ZERO_OR_ONE = 2;
short OCCURRENCE_ONCE = 3;

/**
* @deprecated Use {@link #OCCURRENCE_ZERO_OR_MORE} instead.
*/
@Deprecated(since = "1.5.1", forRemoval = true)
short OCCURENCE_ZERO_OR_MORE = OCCURRENCE_ZERO_OR_MORE;

/**
* @deprecated Use {@link #OCCURRENCE_ONE_OR_MORE} instead.
*/
@Deprecated(since = "1.5.1", forRemoval = true)
short OCCURENCE_ONE_OR_MORE = OCCURRENCE_ONE_OR_MORE;

/**
* @deprecated Use {@link #OCCURRENCE_ZERO_OR_ONE} instead.
*/
@Deprecated(since = "1.5.1", forRemoval = true)
short OCCURENCE_ZERO_OR_ONE = OCCURRENCE_ZERO_OR_ONE;

/**
* @deprecated Use {@link #OCCURRENCE_ONCE} instead.
*/
@Deprecated(since = "1.5.1", forRemoval = true)
short OCCURENCE_ONCE = OCCURRENCE_ONCE;
}
8 changes: 4 additions & 4 deletions dtd-parser/src/main/java/com/sun/xml/dtdparser/DTDParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -1276,19 +1276,19 @@ private short getFrequency()

if (c == '?') {
strTmp.append(c);
return DTDEventListener.OCCURENCE_ZERO_OR_ONE;
return DTDEventListener.OCCURRENCE_ZERO_OR_ONE;
// original.setRepeat(Repeat.ZERO_OR_ONE);
} else if (c == '+') {
strTmp.append(c);
return DTDEventListener.OCCURENCE_ONE_OR_MORE;
return DTDEventListener.OCCURRENCE_ONE_OR_MORE;
// original.setRepeat(Repeat.ONE_OR_MORE);
} else if (c == '*') {
strTmp.append(c);
return DTDEventListener.OCCURENCE_ZERO_OR_MORE;
return DTDEventListener.OCCURRENCE_ZERO_OR_MORE;
// original.setRepeat(Repeat.ZERO_OR_MORE);
} else {
ungetc();
return DTDEventListener.OCCURENCE_ONCE;
return DTDEventListener.OCCURRENCE_ONCE;
}
}

Expand Down

0 comments on commit d0809fe

Please sign in to comment.