Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Java 11 compatibility cont. #845

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<finalName>vaadin-spreadsheet-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
Expand Down
22 changes: 14 additions & 8 deletions vaadin-spreadsheet-charts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<properties>
<!-- These lines are required for Java 9+ compilation -->
<!-- Comment out the following line when building with Java 8 -->
<maven.compiler.release>8</maven.compiler.release>
<!-- Use Java 8 locale formats -->
<argLine>-Djava.locale.providers=COMPAT</argLine>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -12,7 +18,7 @@
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<testbench.version>5.3.0</testbench.version>
<testbench.api.version>${vaadin.version}</testbench.api.version>
<jetty.plugin.version>9.4.54.v20240208</jetty.plugin.version>
<jetty.plugin.version>9.3.30.v20211001</jetty.plugin.version>
<tb.hub>testbench-hub.intra.itmill.com</tb.hub>
</properties>

Expand Down Expand Up @@ -151,6 +157,7 @@
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<release>8</release>
</configuration>
<executions>
<execution>
Expand All @@ -168,7 +175,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<version>3.6.3</version>
<configuration>
<source>8</source>
<failOnError>false</failOnError>
Expand All @@ -186,7 +193,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down Expand Up @@ -262,7 +269,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<version>3.2.5</version>
<configuration>
<excludes>
<exclude>
Expand All @@ -276,7 +283,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<version>3.2.5</version>
<configuration>
<includes>
<include>**/*TBTest.java</include>
Expand Down Expand Up @@ -403,11 +410,9 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<source>1.8</source>
<target>1.8</target>
<release>8</release>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
Expand Down Expand Up @@ -499,6 +504,7 @@
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>8</release>
<encoding>UTF-8</encoding>
</configuration>
<executions>
Expand Down
9 changes: 7 additions & 2 deletions vaadin-spreadsheet-testbench-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<inceptionYear>2013</inceptionYear>

<properties>
<!-- This line is required for Java 9+ compilation -->
<!-- Comment out the following line when building with Java 8 -->
<maven.compiler.release>8</maven.compiler.release>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -73,7 +77,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<version>3.6.3</version>
<configuration>
<source>8</source>
<failOnError>false</failOnError>
Expand All @@ -95,12 +99,13 @@
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<release>8</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down
41 changes: 32 additions & 9 deletions vaadin-spreadsheet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
<tag>Spreadsheet add-on for Vaadin</tag> </scm> -->

<properties>
<!-- These lines are required for Java 9+ compilation -->
<!-- Comment out the following line when building with Java 8 -->
<maven.compiler.release>8</maven.compiler.release>
<!-- Use Java 8 locale formats -->
<argLine>-Djava.locale.providers=COMPAT</argLine>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>9.4.54.v20240208</jetty.version>
<vaadin.version>8.14.3</vaadin.version>
Expand Down Expand Up @@ -68,6 +74,7 @@
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<release>8</release>
</configuration>
</plugin>

Expand Down Expand Up @@ -126,7 +133,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.4</version>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand All @@ -153,7 +160,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<version>3.6.3</version>
<configuration>
<source>8</source>
<additionalparam>-Xdoclint:none</additionalparam>
Expand All @@ -171,7 +178,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -185,6 +192,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
Expand All @@ -203,6 +211,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<finalName>directorystuff</finalName>
<appendAssemblyId>false</appendAssemblyId>
Expand Down Expand Up @@ -230,7 +239,7 @@
</goals>
<configuration>
<webappDirectory>${project.build.directory}/testwebapp/VAADIN/widgetsets</webappDirectory>
<extraJvmArgs>-Xmx1g -Xms1g -XX:MaxPermSize=512m</extraJvmArgs>
<extraJvmArgs>-Xmx1g -Xms1g</extraJvmArgs>
<hostedWebapp>${project.build.directory}/testwebapp</hostedWebapp>
<noServer>true</noServer>
<runTarget>http://localhost:9998/</runTarget>
Expand All @@ -245,7 +254,7 @@
<!-- Testing -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<version>3.2.5</version>
<configuration>
<includes>
<include>**/junit/*</include>
Expand All @@ -255,7 +264,7 @@

<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.17</version>
<version>3.2.5</version>
<configuration>
<excludes>
<!-- Files here might match to naming convetions,
Expand All @@ -268,12 +277,12 @@
<includes>
<include>**/*Test*.java</include>
</includes>
<systemProperties>
<systemPropertyVariables>
<property>
<name>tb.hub</name>
<value>${tb.hub}</value>
</property>
</systemProperties>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -332,7 +341,7 @@
<version>${vaadin.version}</version>
<configuration>
<webappDirectory>${project.build.directory}/testwebapp/VAADIN/widgetsets</webappDirectory>
<extraJvmArgs>-Xmx1g -Xms1g -XX:MaxPermSize=512m</extraJvmArgs>
<extraJvmArgs>-Xmx1g -Xms1g</extraJvmArgs>
<hostedWebapp>${project.build.directory}/testwebapp</hostedWebapp>
<noServer>true</noServer>
<runTarget>http://localhost:9998/</runTarget>
Expand Down Expand Up @@ -578,6 +587,20 @@
<artifactId>ooxml-schemas</artifactId>
<version>1.4</version>
</dependency>

<!-- Required for some reflection issues -->
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.30.2-GA</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
</dependencies>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ public String getOriginalCellValue(Cell cell) {
}

private boolean valueContainsOnlyNumbers(String value) {
return value.matches("^-?\\d+("
return value.matches("^" + localeDecimalSymbols.getMinusSign()
+ "?\\d+("
+ localeDecimalSymbols.getDecimalSeparator() + "\\d+)?$");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* #L%
*/

import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Iterator;
Expand All @@ -28,6 +27,8 @@
import com.vaadin.addon.spreadsheet.client.PopupButtonServerRpc;
import com.vaadin.addon.spreadsheet.client.PopupButtonState;
import com.vaadin.addon.spreadsheet.client.PopupButtonWidget;
import com.vaadin.event.SerializableEventListener;
import com.vaadin.shared.Registration;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.AbstractSingleComponentContainer;
import com.vaadin.ui.Component;
Expand Down Expand Up @@ -255,41 +256,53 @@ public boolean isActive() {

/**
* Adds a {@link PopupOpenListener} to this pop-up button.
*
*
* @param listener
* The listener to add
* @return a registration object for removing the listener
*/
public void addPopupOpenListener(PopupOpenListener listener) {
addListener(PopupOpenEvent.class, listener,
public Registration addPopupOpenListener(PopupOpenListener listener) {
return addListener(PopupOpenEvent.class, listener,
PopupOpenListener.POPUP_OPEN_METHOD);
}

/**
* Removes the given {@link PopupOpenListener} from this pop-up button.
*
*
* @param listener
* The listener to remove
* @deprecated use a {@link Registration} from
* {@link #removePopupOpenListener(PopupOpenListener)} to remove
* a listener
*/
@Deprecated
public void removePopupOpenListener(PopupOpenListener listener) {
removeListener(PopupOpenEvent.class, listener,
PopupOpenListener.POPUP_OPEN_METHOD);
}

/**
* Adds a {@link PopupCloseListener} to this pop-up button.
*
*
* @param listener
* the listener to add
* @return a registration object for removing the listener
*/
public void addPopupCloseListener(PopupCloseListener listener) {
addListener(PopupCloseEvent.class, listener,
public Registration addPopupCloseListener(PopupCloseListener listener) {
return addListener(PopupCloseEvent.class, listener,
PopupCloseListener.POPUP_CLOSE_METHOD);
}

/**
* Removes the given {@link PopupCloseListener} from this pop-up button.
*
*
* @param listener
* the listener to remove
* @deprecated use a {@link Registration} from
* {@link #removePopupCloseListener(PopupCloseListener)} to
* remove a listener
*/
@Deprecated
public void removePopupCloseListener(PopupCloseListener listener) {
removeListener(PopupCloseEvent.class, listener,
PopupCloseListener.POPUP_CLOSE_METHOD);
Expand Down Expand Up @@ -345,7 +358,7 @@ public PopupButton getPopupButton() {
* Interface for listening for a {@link PopupOpenEvent} fired by a
* {@link PopupButton}.
*/
public interface PopupOpenListener extends Serializable {
public interface PopupOpenListener extends SerializableEventListener {
public static final Method POPUP_OPEN_METHOD = ReflectTools.findMethod(
PopupOpenListener.class, "onPopupOpen", PopupOpenEvent.class);

Expand Down Expand Up @@ -389,7 +402,7 @@ public PopupButton getPopupButton() {
* Interface for listening for a {@link PopupCloseEvent} fired by a
* {@link PopupButton}.
*/
public interface PopupCloseListener extends Serializable {
public interface PopupCloseListener extends SerializableEventListener {
public static final Method POPUP_CLOSE_METHOD = ReflectTools
.findMethod(PopupCloseListener.class, "onPopupClose",
PopupCloseEvent.class);
Expand Down
Loading