From 9f0887e2056c3c535eb5a5df2c945d77d1290ce7 Mon Sep 17 00:00:00 2001 From: ScientificWare Date: Wed, 25 Jan 2023 19:20:39 +0000 Subject: [PATCH] 8296661: Typo Found In CSSParser.java Reviewed-by: angorya, aivanov, prr --- .../javax/swing/text/html/CSSParser.java | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/src/java.desktop/share/classes/javax/swing/text/html/CSSParser.java b/src/java.desktop/share/classes/javax/swing/text/html/CSSParser.java index 9228d126dd8..f1fde188c32 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/CSSParser.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/CSSParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,29 +28,30 @@ import java.io.*; /** * A CSS parser. This works by way of a delegate that implements the - * CSSParserCallback interface. The delegate is notified of the following + * {@code CSSParserCallback} interface. The delegate is notified of the following * events: * * This will parse much more than CSS 1, and loosely implements the * recommendation for Forward-compatible parsing in section * 7.1 of the CSS spec found at: * http://www.w3.org/TR/REC-CSS1. - * If an error results in parsing, a RuntimeException will be thrown. *

- * This will preserve case. If the callback wishes to treat certain poritions - * case insensitively (such as selectors), it should use toLowerCase, or + * If parsing results in an error, a {@code RuntimeException} will be thrown. + *

+ * This will preserve case. If the callback wishes to treat certain portions + * case-insensitively (such as selectors), it should use {@code toLowerCase}, or * something similar. * * @author Scott Violet @@ -118,7 +119,7 @@ class CSSParser { // The delegate interface. static interface CSSParserCallback { - /** Called when an @import is encountered. */ + /** Called when an {@code @import} is encountered. */ void handleImport(String importString); // There is currently no way to distinguish between '"foo,"' and // 'foo,'. But this generally isn't valid CSS. If it becomes @@ -360,9 +361,9 @@ class CSSParser { } /** - * Parses identifiers until extraChar is encountered, - * returning the ending token, which will be IDENTIFIER if extraChar - * is found. + * Parses identifiers until {@code extraChar} is encountered, + * returning the ending token, which will be {@code IDENTIFIER} if + * {@code extraChar} is found. */ private int parseIdentifiers(char extraChar, boolean wantsBlocks) throws IOException { @@ -508,9 +509,9 @@ class CSSParser { } /** - * Gets an identifier, returning true if the length of the string is greater than 0, - * stopping when stopChar, whitespace, or one of {}()[] is - * hit. + * Gets an identifier, returning {@code true} if the length of the string is + * greater than 0, stopping when {@code stopChar}, whitespace, or one of + * {}()[] is hit. */ // NOTE: this could be combined with readTill, as they contain somewhat // similar functionality. @@ -631,7 +632,7 @@ class CSSParser { } /** - * Reads till a stopChar is encountered, escaping characters + * Reads till a {@code stopChar} is encountered, escaping characters * as necessary. */ private void readTill(char stopChar) throws IOException {