Skip to content

Commit d850d6f

Browse files
committed
cleanup
1 parent 5170f6b commit d850d6f

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

src/main/java/org/htmlunit/cyberneko/HTMLScanner.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,9 +3206,6 @@ else if (c != currentQuote) {
32063206
// ok, we finally have found the matching quote and can end here
32073207
break;
32083208
}
3209-
// moved into IFs to safe on conditions
3210-
// prevSpace = c == ' ' || c == '\t' || c == '\r' || c == '\n';
3211-
isStart = isStart && prevSpace;
32123209
}
32133210
}
32143211

@@ -3271,10 +3268,8 @@ public Scanner setElementName(final String ename) {
32713268
/** Scan. */
32723269
@Override
32733270
public boolean scan(final boolean complete) throws IOException {
3274-
boolean next;
32753271
do {
32763272
try {
3277-
next = false;
32783273
switch (fScannerState) {
32793274
case STATE_CONTENT: {
32803275
fBeginLineNumber = fCurrentEntity.getLineNumber();
@@ -3361,7 +3356,7 @@ public boolean scan(final boolean complete) throws IOException {
33613356
return true;
33623357
}
33633358
}
3364-
while (next || complete);
3359+
while (complete);
33653360
return true;
33663361
}
33673362

src/main/java/org/htmlunit/cyberneko/xerces/util/DOMMessageFormatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
public final class DOMMessageFormatter {
2727

28-
private static ResourceBundle DomResourceBundle_ =
28+
private static final ResourceBundle DomResourceBundle_ =
2929
ResourceBundle.getBundle("org.htmlunit.cyberneko.res.DOMMessages");
3030

3131
private DOMMessageFormatter() {

src/main/java/org/htmlunit/cyberneko/xerces/util/URI.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,6 @@ else if (numDigits == 3) {
16381638
public static boolean isWellFormedIPv6Reference(final String address) {
16391639

16401640
final int addrLength = address.length();
1641-
int index = 1;
16421641
final int end = addrLength - 1;
16431642

16441643
// Check if string is a potential match for IPv6reference.
@@ -1650,12 +1649,12 @@ public static boolean isWellFormedIPv6Reference(final String address) {
16501649
final int[] counter = new int[1];
16511650

16521651
// Scan hex sequence before possible '::' or IPv4 address.
1653-
index = scanHexSequence(address, index, end, counter);
1652+
int index = scanHexSequence(address, 1, end, counter);
16541653
if (index == -1) {
16551654
return false;
16561655
}
16571656
// Address must contain 128-bits of information.
1658-
else if (index == end) {
1657+
if (index == end) {
16591658
return counter[0] == 8;
16601659
}
16611660

0 commit comments

Comments
 (0)