diff --git a/README.md b/README.md index 07077db1..7ee4374b 100644 --- a/README.md +++ b/README.md @@ -308,6 +308,9 @@ Configuration items are: ## News and noteworthy +* v7.0.2 - work in progress + * Updated to ph-commons 11.1.5 + * Created Java 21 compatibility * v7.0.1 - 2023-07-31 * Updated to ph-commons 11.1 * v7.0.0 - 2023-02-01 diff --git a/ph-css/src/main/java/com/helger/css/decl/shorthand/CSSShortHandDescriptorFlex.java b/ph-css/src/main/java/com/helger/css/decl/shorthand/CSSShortHandDescriptorFlex.java index 518d7400..caabe037 100644 --- a/ph-css/src/main/java/com/helger/css/decl/shorthand/CSSShortHandDescriptorFlex.java +++ b/ph-css/src/main/java/com/helger/css/decl/shorthand/CSSShortHandDescriptorFlex.java @@ -53,7 +53,7 @@ protected void modifyExpressionMembers (@Nonnull final ICommonsList 4px 4px 4px 4px - final ICSSExpressionMember aMember = aExpressionMembers.getFirst (); + final ICSSExpressionMember aMember = aExpressionMembers.getFirstOrNull (); for (int i = 0; i < 3; ++i) aExpressionMembers.add (aMember.getClone ()); } diff --git a/ph-css/src/main/java/com/helger/css/parser/CSSCharStream.java b/ph-css/src/main/java/com/helger/css/parser/CSSCharStream.java index b6c37f62..75337bc5 100644 --- a/ph-css/src/main/java/com/helger/css/parser/CSSCharStream.java +++ b/ph-css/src/main/java/com/helger/css/parser/CSSCharStream.java @@ -211,8 +211,9 @@ private int _handleUnescape (final int cSrcFiltered) throws IOException return nCodePoint; } - public int read (@Nonnull final char [] buf, @Nonnegative final int nOfs, @Nonnegative final int nLen) - throws IOException + public int read (@Nonnull final char [] buf, + @Nonnegative final int nOfs, + @Nonnegative final int nLen) throws IOException { ValueEnforcer.notNull (buf, "buf"); ValueEnforcer.isGE0 (nOfs, "Ofs"); @@ -613,7 +614,7 @@ public void done () * * @param nNewLine * line index - * @param newCol + * @param nNewCol * column index */ public void adjustBeginLineColumn (final int nNewLine, final int nNewCol) diff --git a/ph-css/src/main/java/com/helger/css/propertyvalue/CSSValueMultiValue.java b/ph-css/src/main/java/com/helger/css/propertyvalue/CSSValueMultiValue.java index 35ddb6f9..170da1ff 100644 --- a/ph-css/src/main/java/com/helger/css/propertyvalue/CSSValueMultiValue.java +++ b/ph-css/src/main/java/com/helger/css/propertyvalue/CSSValueMultiValue.java @@ -47,7 +47,9 @@ public class CSSValueMultiValue implements ICSSMultiValue { private final ICommonsList m_aValues = new CommonsArrayList <> (); - public CSSValueMultiValue (@Nonnull final ICSSProperty aProperty, @Nonnull @Nonempty final String [] aValues, final boolean bIsImportant) + public CSSValueMultiValue (@Nonnull final ICSSProperty aProperty, + @Nonnull @Nonempty final String [] aValues, + final boolean bIsImportant) { ValueEnforcer.notNull (aProperty, "Property"); ValueEnforcer.notEmptyNoNullValue (aValues, "Values"); @@ -66,7 +68,7 @@ public ICommonsList getAllContainedValues () @Nonnull public ECSSProperty getProp () { - return m_aValues.getFirst ().getProp (); + return m_aValues.getFirstOrNull ().getProp (); } @Nonnull diff --git a/ph-css/src/main/java/com/helger/css/reader/errorhandler/LoggingCSSParseErrorHandler.java b/ph-css/src/main/java/com/helger/css/reader/errorhandler/LoggingCSSParseErrorHandler.java index a4c6edfa..0aaeded4 100644 --- a/ph-css/src/main/java/com/helger/css/reader/errorhandler/LoggingCSSParseErrorHandler.java +++ b/ph-css/src/main/java/com/helger/css/reader/errorhandler/LoggingCSSParseErrorHandler.java @@ -122,8 +122,8 @@ public static String createLoggingStringParseError (@Nonnull final Token aLastVa return retval.toString (); } - public void onCSSParseError (@Nonnull final ParseException aParseEx, @Nullable final Token aLastSkippedToken) - throws ParseException + public void onCSSParseError (@Nonnull final ParseException aParseEx, + @Nullable final Token aLastSkippedToken) throws ParseException { if (aParseEx.expectedTokenSequences == null) LOGGER.warn (aParseEx.getMessage ()); @@ -178,8 +178,6 @@ public void onCSSUnexpectedRule (@Nonnull final Token aCurrentToken, * The prefix token found (like '$' or '*'). Never null. * @param aIdentifierToken * The identifier token found. Never null. - * @throws ParseException - * In case the error is fatal and should be propagated. * @return The concatenated string with source location, etc. May neither be * null nor empty. */ @@ -239,10 +237,8 @@ public void onCSSBrowserCompliantSkip (@Nullable final ParseException ex, public static String createLoggingStringIllegalCharacter (final char cIllegalChar) { final String sCharHex = "0x" + StringHelper.getHexStringLeadingZero (cIllegalChar, 4); - final String sPrintableChar = cIllegalChar <= 32 || cIllegalChar > 255 ? sCharHex : cIllegalChar + - " (" + - sCharHex + - ")"; + final String sPrintableChar = cIllegalChar <= 32 || cIllegalChar > 255 ? sCharHex + : cIllegalChar + " (" + sCharHex + ")"; return "Found illegal character: " + sPrintableChar; } diff --git a/ph-css/src/test/java/com/helger/css/supplementary/wiki/WikiVisitSelectors.java b/ph-css/src/test/java/com/helger/css/supplementary/wiki/WikiVisitSelectors.java index 237e99e5..f9a33219 100644 --- a/ph-css/src/test/java/com/helger/css/supplementary/wiki/WikiVisitSelectors.java +++ b/ph-css/src/test/java/com/helger/css/supplementary/wiki/WikiVisitSelectors.java @@ -30,7 +30,7 @@ /** * Example how to extract all selectors from a certain CSS file using a - * {@link DefaultCSSUrlVisitor}. + * {@link DefaultCSSVisitor}. * * @author Philip Helger */ diff --git a/pom.xml b/pom.xml index f193c7f5..fa418596 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ com.helger.commons ph-commons-parent-pom - 11.1.4 + 11.1.5 pom import