Add checkstyle check to disallow javafx classes
Change-Id: Ie50447c34d1bc1495a70023535ce822bf55f0c08
diff --git a/tools/build/conf/src/main/resources/onos/checkstyle-mvn.xml b/tools/build/conf/src/main/resources/onos/checkstyle-mvn.xml
index 09c5e5b..cf8fe4d 100644
--- a/tools/build/conf/src/main/resources/onos/checkstyle-mvn.xml
+++ b/tools/build/conf/src/main/resources/onos/checkstyle-mvn.xml
@@ -99,6 +99,22 @@
<property name="message" value="Line has windows line endings."/>
</module>
+ <!-- Don't allow usage of deprecated Throwables propagate methods -->
+ <module name="RegexpSingleline">
+ <property name="format" value="Throwables.propagate.*\("/>
+ <property name="minimum" value="0"/>
+ <property name="maximum" value="0"/>
+ <property name="message" value="Throwables propagate methods have been deprecated."/>
+ </module>
+
+ <!-- Don't allow usage of Oracle JDK only javafx classes -->
+ <module name="RegexpSingleline">
+ <property name="format" value="javafx.*"/>
+ <property name="minimum" value="0"/>
+ <property name="maximum" value="0"/>
+ <property name="message" value="javafx classes are not supported by all JDKs."/>
+ </module>
+
<!-- Checks for Headers -->
<!-- See http://checkstyle.sf.net/config_header.html -->
<!-- <module name="Header"> -->
diff --git a/tools/build/conf/src/main/resources/onos/checkstyle.xml b/tools/build/conf/src/main/resources/onos/checkstyle.xml
index c0fbca7..ce6351f 100644
--- a/tools/build/conf/src/main/resources/onos/checkstyle.xml
+++ b/tools/build/conf/src/main/resources/onos/checkstyle.xml
@@ -107,6 +107,14 @@
<property name="message" value="Throwables propagate methods have been deprecated."/>
</module>
+ <!-- Don't allow usage of Oracle JDK only javafx classes -->
+ <module name="RegexpSingleline">
+ <property name="format" value="javafx.*"/>
+ <property name="minimum" value="0"/>
+ <property name="maximum" value="0"/>
+ <property name="message" value="javafx classes are not supported by all JDKs."/>
+ </module>
+
<!-- Checks for Headers -->
<!-- See http://checkstyle.sf.net/config_header.html -->
<!-- <module name="Header"> -->