[Git][java-team/cssparser][upstream] New upstream version 0.9.30

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Wed Nov 11 00:37:51 GMT 2026



Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / cssparser


Commits:
695f9977 by Emmanuel Bourg at 2026-11-10T23:52:14+01:00
New upstream version 0.9.30
- - - - -


10 changed files:

- pom.xml
- src/changes/changes.xml
- src/main/javacc/SACParserCSS1.jj
- src/main/javacc/SACParserCSS2.jj
- src/main/javacc/SACParserCSS21.jj
- src/main/javacc/SACParserCSS3.jj
- src/site/xdoc/index.xml
- src/test/java/com/steadystate/css/parser/SACParserCSS21Test.java
- src/test/java/com/steadystate/css/parser/SACParserCSS2Test.java
- src/test/java/com/steadystate/css/parser/SACParserCSS3Test.java


Changes:

=====================================
pom.xml
=====================================
@@ -4,7 +4,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>net.sourceforge.cssparser</groupId>
     <artifactId>cssparser</artifactId>
-    <version>0.9.29</version>
+    <version>0.9.30</version>
     <name>CSS Parser</name>
     <url>http://cssparser.sourceforge.net/</url>
     <packaging>jar</packaging>
@@ -24,10 +24,48 @@
 
     <build>
         <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <version>3.1.0</version>
+                <executions>
+                    <execution>
+                        <id>enforce-maven</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <requireMavenVersion>
+                                    <version>3.6.3</version>
+                                </requireMavenVersion>
+                                <requireJavaVersion>
+                                    <version>1.8.0</version>
+                                </requireJavaVersion>
+                            </rules>
+                        </configuration>
+                  </execution>
+                </executions>
+            </plugin>
+            <plugin>
+              <groupId>org.owasp</groupId>
+              <artifactId>dependency-check-maven</artifactId>
+              <version>7.4.1</version>
+                <configuration>
+                    <failBuildOnCVSS>0</failBuildOnCVSS>
+                </configuration>
+              <executions>
+                  <execution>
+                      <goals>
+                          <goal>check</goal>
+                      </goals>
+                  </execution>
+              </executions>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.1</version>
+                <version>3.10.1</version>
             </plugin>
             <plugin>
                 <!-- generate parsers and lexers before compiling -->
@@ -46,7 +84,7 @@
                     <dependency>
                         <groupId>net.java.dev.javacc</groupId>
                         <artifactId>javacc</artifactId>
-                        <version>7.0.4</version>
+                        <version>7.0.12</version>
                     </dependency>
                 </dependencies>
             </plugin>
@@ -118,7 +156,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
-                <version>3.0.0</version>
+                <version>3.1.2</version>
                 <configuration>
                     <configLocation>checkstyle.xml</configLocation>
                     <suppressionsLocation>checkstyle_suppressions.xml</suppressionsLocation>
@@ -130,14 +168,14 @@
                     <dependency>
                         <groupId>com.puppycrawl.tools</groupId>
                         <artifactId>checkstyle</artifactId>
-                        <version>8.11</version>
+                        <version>9.3</version>
                     </dependency>
                 </dependencies>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
-                <version>3.1.0</version>
+                <version>3.3.0</version>
                 <configuration>
                     <archive>
                         <manifest>
@@ -156,7 +194,7 @@
                 <!-- always generate a source JAR -->
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-source-plugin</artifactId>
-                <version>3.0.1</version>
+                <version>3.2.1</version>
                 <executions>
                     <execution>
                         <id>attach-sources</id>
@@ -170,7 +208,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>3.2.0</version>
+                <version>3.4.1</version>
                 <configuration>
                     <doclint>none</doclint>
                     <links>
@@ -191,7 +229,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-gpg-plugin</artifactId>
-                <version>1.6</version>
+                <version>3.0.1</version>
                 <executions>
                     <execution>
                         <phase>verify</phase>
@@ -357,7 +395,7 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.11</version>
+            <version>4.13.2</version>
             <scope>test</scope>
         </dependency>
     </dependencies>


=====================================
src/changes/changes.xml
=====================================
@@ -7,6 +7,11 @@
   </properties>
 
   <body>
+    <release version="0.9.30" date="28.12.2022" description="bugfix">
+        <action type="fix" dev="rbri">
+            Unknown rule values are printed as ems instead of em.
+        </action>
+    </release>
     <release version="0.9.29" date="07.11.2020" description="more dimensions, new format option and bugfixes">
         <action type="add" dev="rbri" issue="6">
             New CSSFormat setting useSingleQuotes to force the usage of single quotes instead


=====================================
src/main/javacc/SACParserCSS1.jj
=====================================
@@ -910,7 +910,7 @@ String skip() {
 JAVACODE
 void appendUnit(Token t, StringBuilder sb) {
     if (t.kind == EMS) {
-      sb.append("ems");
+      sb.append("em");
       return;
     }
     if (t.kind == EXS) {


=====================================
src/main/javacc/SACParserCSS2.jj
=====================================
@@ -1362,7 +1362,7 @@ String skip() {
 JAVACODE
 void appendUnit(Token t, StringBuilder sb) {
     if (t.kind == EMS) {
-      sb.append("ems");
+      sb.append("em");
       return;
     }
     if (t.kind == EXS) {


=====================================
src/main/javacc/SACParserCSS21.jj
=====================================
@@ -1441,7 +1441,7 @@ String skipUnit() {
 JAVACODE
 void appendUnit(Token t, StringBuilder sb) {
     if (t.kind == EMS) {
-      sb.append("ems");
+      sb.append("em");
       return;
     }
     if (t.kind == EXS) {


=====================================
src/main/javacc/SACParserCSS3.jj
=====================================
@@ -2133,7 +2133,7 @@ String skipUnit() {
 JAVACODE
 void appendUnit(Token t, StringBuilder sb) {
     if (t.kind == EMS) {
-      sb.append("ems");
+      sb.append("em");
       return;
     }
     if (t.kind == REM) {


=====================================
src/site/xdoc/index.xml
=====================================
@@ -43,8 +43,7 @@
                 </ul>
         </section>
 
-        <section name="Download latest release 0.9.29 (07.11.2020)">
-
+        <section name="Download latest release 0.9.30 (28.12.2022)">
             <p>from the <a href="http://sourceforge.net/projects/cssparser/">SourceForge Project Page</a>    
                 <a href="changes-report.html">Change history</a>.
             </p>


=====================================
src/test/java/com/steadystate/css/parser/SACParserCSS21Test.java
=====================================
@@ -2458,6 +2458,39 @@ public class SACParserCSS21Test extends AbstractSACParserTest {
         Assert.assertEquals("h1:first-line { color: red }", rule.toString());
         Assert.assertEquals("h1:first-line { color: red }", rule.getCssText());
     }
+
+    /**
+     * @throws Exception if any error occurs
+     */
+    @Test
+    public void unknownRule() throws Exception {
+        final String css = "@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}";
+
+        final CSSStyleSheet sheet = parse(css);
+        final CSSRuleList rules = sheet.getCssRules();
+
+        Assert.assertEquals(1, rules.getLength());
+
+        final CSSRule rule = rules.item(0);
+        Assert.assertEquals("@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}", rule.toString());
+        Assert.assertEquals("@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}", rule.getCssText());
+    }
+
 //
 //    /**
 //     * @throws Exception if any error occurs


=====================================
src/test/java/com/steadystate/css/parser/SACParserCSS2Test.java
=====================================
@@ -795,4 +795,36 @@ public class SACParserCSS2Test extends AbstractSACParserTest {
         Assert.assertEquals("h1:first-line { color: red }", rule.toString());
         Assert.assertEquals("h1:first-line { color: red }", rule.getCssText());
     }
+
+    /**
+     * @throws Exception if any error occurs
+     */
+    @Test
+    public void unknownRule() throws Exception {
+        final String css = "@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}";
+
+        final CSSStyleSheet sheet = parse(css);
+        final CSSRuleList rules = sheet.getCssRules();
+
+        Assert.assertEquals(1, rules.getLength());
+
+        final CSSRule rule = rules.item(0);
+        Assert.assertEquals("@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}", rule.toString());
+        Assert.assertEquals("@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}", rule.getCssText());
+    }
 }


=====================================
src/test/java/com/steadystate/css/parser/SACParserCSS3Test.java
=====================================
@@ -4120,6 +4120,38 @@ public class SACParserCSS3Test  extends AbstractSACParserTest {
         Assert.assertEquals("h1::link { color: red }", rule.getCssText());
     }
 
+    /**
+     * @throws Exception if any error occurs
+     */
+    @Test
+    public void unknownRule() throws Exception {
+        final String css = "@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}";
+
+        final CSSStyleSheet sheet = parse(css);
+        final CSSRuleList rules = sheet.getCssRules();
+
+        Assert.assertEquals(1, rules.getLength());
+
+        final CSSRule rule = rules.item(0);
+        Assert.assertEquals("@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}", rule.toString());
+        Assert.assertEquals("@keyframes load5 {0%, 100% {"
+                + "box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), "
+                + "0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), "
+                + "-2.6em 0em 0 0em rgba(0, 0, 0, 0.5), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.7);"
+                + "}", rule.getCssText());
+    }
+
 //
 //    /**
 //     * @throws Exception if any error occurs



View it on GitLab: https://salsa.debian.org/java-team/cssparser/-/commit/695f99771868e9930902094fc0754750414310bf

-- 
View it on GitLab: https://salsa.debian.org/java-team/cssparser/-/commit/695f99771868e9930902094fc0754750414310bf
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261111/36bbc858/attachment.htm>


More information about the pkg-java-commits mailing list