Skip to content

Commit

Permalink
Fix FasterXML#147 ("expected" misspelled as "excepted")
Browse files Browse the repository at this point in the history
  • Loading branch information
pdo-axelor committed Apr 26, 2022
1 parent 80e1937 commit 08ba900
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/ctc/wstx/cfg/ErrorConsts.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class ErrorConsts

public static String ERR_WF_PI_MISSING_TARGET = "Missing processing instruction target";
public static String ERR_WF_PI_XML_TARGET = "Illegal processing instruction target (\"{0}\"); 'xml' (case insensitive) is reserved by the specs.";
public static String ERR_WF_PI_XML_MISSING_SPACE = "excepted either space or \"?>\" after PI target";
public static String ERR_WF_PI_XML_MISSING_SPACE = "expected either space or \"?>\" after PI target";

// // // Entity problems:

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/ctc/wstx/dtd/FullDTDReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ private void handleAttlistDecl()
*/
/*
} else if (c != '>') {
throwDTDUnexpectedChar(c, "; excepted either '>' closing ATTLIST declaration, or a white space character separating individual attribute declarations");
throwDTDUnexpectedChar(c, "; expected either '>' closing ATTLIST declaration, or a white space character separating individual attribute declarations");
*/
}
if (c == '>') {
Expand Down Expand Up @@ -2299,7 +2299,7 @@ private void handleElementDecl()
+keyw+"' (for element <"+elemName+">); expected ANY or EMPTY");
} while (false);
} else {
throwDTDUnexpectedChar(c, ": excepted '(' to start content specification for element <"+elemName+">");
throwDTDUnexpectedChar(c, ": expected '(' to start content specification for element <"+elemName+">");
}

// Ok, still need the trailing gt-char to close the declaration:
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/ctc/wstx/sr/BasicStreamReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,7 @@ protected void checkCData() throws XMLStreamException
// Plus, need the bracket too:
char c = getNextCharFromCurrent(SUFFIX_IN_CDATA);
if (c != '[') {
throwUnexpectedChar(c, "excepted '[' after '<![CDATA'");
throwUnexpectedChar(c, "expected '[' after '<![CDATA'");
}
// Cool, that's it!
}
Expand Down Expand Up @@ -3080,7 +3080,7 @@ private final boolean handleNsAttrs(char c)
if (c <= CHAR_SPACE) {
c = getNextInCurrAfterWS(SUFFIX_IN_ELEMENT, c);
} else if (c != '/' && c != '>') {
throwUnexpectedChar(c, " excepted space, or '>' or \"/>\"");
throwUnexpectedChar(c, " expected space, or '>' or \"/>\"");
}

if (c == '/') {
Expand Down Expand Up @@ -3188,7 +3188,7 @@ private final boolean handleNonNsAttrs(char c)
if (c <= CHAR_SPACE) {
c = getNextInCurrAfterWS(SUFFIX_IN_ELEMENT, c);
} else if (c != '/' && c != '>') {
throwUnexpectedChar(c, " excepted space, or '>' or \"/>\"");
throwUnexpectedChar(c, " expected space, or '>' or \"/>\"");
}
if (c == '/') {
c = getNextCharFromCurrent(SUFFIX_IN_ELEMENT);
Expand Down Expand Up @@ -4027,7 +4027,7 @@ private final int readPIPrimary()
// Ok, let's just verify we get space then
char c = getNextCharFromCurrent(SUFFIX_IN_XML_DECL);
if (!isSpaceChar(c)) {
throwUnexpectedChar(c, "excepted a space in xml declaration after 'xml'");
throwUnexpectedChar(c, "expected a space in xml declaration after 'xml'");
}
return handleMultiDocStart(START_DOCUMENT);
}
Expand Down
16 changes: 8 additions & 8 deletions src/test/java/stax2/typed/ReaderBinaryTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public void testInvalidElemPadding()
/*int count = */ sr.readElementAsBinary(resultBuffer, 0, resultBuffer.length, b64variant);
fail("Should have received an exception for invalid padding");
} catch (TypedXMLStreamException ex) {
// any way to check that it's the excepted message? not right now
// any way to check that it's the expected message? not right now
}
sr.close();
}
Expand Down Expand Up @@ -425,7 +425,7 @@ public void testInvalidWhitespace()
/*int count = */ sr.readElementAsBinary(resultBuffer, 0, resultBuffer.length, b64variant);
fail("Should have received an exception for white space used 'inside' 4-char base64 unit");
} catch (TypedXMLStreamException ex) {
// any way to check that it's the excepted message? not right now
// any way to check that it's the expected message? not right now
}
sr.close();
}
Expand All @@ -446,7 +446,7 @@ public void testInvalidWeirdChars()
/*int count = */ sr.readElementAsBinary(resultBuffer, 0, resultBuffer.length, b64variant);
fail("Should have received an exception for invalid base64 character");
} catch (TypedXMLStreamException ex) {
// any way to check that it's the excepted message? not right now
// any way to check that it's the expected message? not right now
}
sr.close();
}
Expand Down Expand Up @@ -482,7 +482,7 @@ public void testIncompleteInvalidElem()
/*int count = */ sr.readElementAsBinary(resultBuffer, 0, resultBuffer.length, b64variant);
fail("Should have received an exception for incomplete base64 unit");
} catch (TypedXMLStreamException ex) {
// any way to check that it's the excepted message? not right now
// any way to check that it's the expected message? not right now
}
sr.close();
}
Expand Down Expand Up @@ -556,7 +556,7 @@ public void testInvalidAttrPadding()
/*byte[] data = */ sr.getAttributeAsBinary(0, b64variant);
fail("Should have received an exception for invalid padding");
} catch (TypedXMLStreamException ex) {
// any way to check that it's the excepted message? not right now
// any way to check that it's the expected message? not right now
}
sr.close();
}
Expand All @@ -575,7 +575,7 @@ public void testInvalidAttrWhitespace()
/*byte[] data = */ sr.getAttributeAsBinary(0, b64variant);
fail("Should have received an exception for white space used 'inside' 4-char base64 unit");
} catch (TypedXMLStreamException ex) {
// any way to check that it's the excepted message? not right now
// any way to check that it's the expected message? not right now
}
sr.close();
}
Expand All @@ -594,7 +594,7 @@ public void testInvalidAttrWeirdChars()
/*byte[] data = */ sr.getAttributeAsBinary(0, b64variant);
fail("Should have received an exception for invalid base64 character");
} catch (TypedXMLStreamException ex) {
// any way to check that it's the excepted message? not right now
// any way to check that it's the expected message? not right now
}
sr.close();
}
Expand Down Expand Up @@ -627,7 +627,7 @@ public void testInvalidAttrIncomplete()
/*byte[] data = */ sr.getAttributeAsBinary(0, b64variant);
fail("Should have received an exception for incomplete base64 unit");
} catch (TypedXMLStreamException ex) {
// any way to check that it's the excepted message? not right now
// any way to check that it's the expected message? not right now
}
sr.close();
}
Expand Down

0 comments on commit 08ba900

Please sign in to comment.