You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project mts: Compilation failure: Compilation failure:
[ERROR] /Users/rjlouro/Documents/WIT/RCS/MTS_Git/mts/src/main/java/com/devoteam/srit/xmlloader/gui/model/ModelTreeRTStats.java:[251,77] error: incompatible types: Enumeration<TreeNode> cannot be converted to Enumeration<DefaultMutableTreeNode>
[ERROR] /Users/rjlouro/Documents/WIT/RCS/MTS_Git/mts/src/main/java/com/devoteam/srit/xmlloader/gui/model/ModelTreeRTStats.java:[302,77] error: incompatible types: Enumeration<TreeNode> cannot be converted to Enumeration<DefaultMutableTreeNode>
Solved by the following changes:
--- a/src/main/java/com/devoteam/srit/xmlloader/gui/model/ModelTreeRTStats.java
+++ b/src/main/java/com/devoteam/srit/xmlloader/gui/model/ModelTreeRTStats.java
@@ -248,7 +248,7 @@ public class ModelTreeRTStats extends DefaultTreeModel {
boolean alreadyExist = false;
// We get all children of node parent
- Enumeration<DefaultMutableTreeNode> allChildren = nodeParent.children();
+ Enumeration allChildren = nodeParent.children();
// For each child
while (allChildren.hasMoreElements()) {
@@ -298,12 +298,12 @@ public class ModelTreeRTStats extends DefaultTreeModel {
DefaultMutableTreeNode node = null;
// We get all children of node parent
- Enumeration<DefaultMutableTreeNode> allChildren = nodeParent.children();
+ Enumeration allChildren = nodeParent.children();
// For each child
while (allChildren.hasMoreElements()) {
// Get the current child
- node = allChildren.nextElement();
+ node = (DefaultMutableTreeNode) allChildren.nextElement();
// If this child match (with the name) with the node searching
if (node.toString().equals(nodeChild.toString())) {
My environment:
MacOS Mojave 10.14.6
java 12.0.2 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
The text was updated successfully, but these errors were encountered:
Trying to compile MTS on a macbook pro and run into 2 problems:
Package javax.cml.bind does not exist:
Solved by adding it to pom.xml. Tried version 2.3.0 and it worked.
Build fails with incompatible type
Solved by the following changes:
My environment:
The text was updated successfully, but these errors were encountered: