[JBoss JIRA] (DROOLS-506) Example project: massive number of code quality / correctness warnings
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-506?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-506.
--------------------------------
Fix Version/s: 6.2.0.CR1
Resolution: Done
> Example project: massive number of code quality / correctness warnings
> ----------------------------------------------------------------------
>
> Key: DROOLS-506
> URL: https://issues.jboss.org/browse/DROOLS-506
> Project: Drools
> Issue Type: Bug
> Reporter: Peter Horvath
> Assignee: Mario Fusco
> Priority: Trivial
> Fix For: 6.2.0.CR1
>
> Attachments: eclipse_warnings.png
>
>
> The Drools example project contains code snippets that yield warnings: *while I absolutely understand that resources are limited and examples might not be the priority and the core code of the engine is of good quality*, I do think it is important to display dedication to high quality products.
> Having an example project full of code quality issues just gives a very bad first impression of the whole Drools project...
> Examples:
> {code:title=org.drools.examples.cashflow.CashFlowMain|borderStyle=solid}
> public class CashFlowMain {
> public static void main(String[] args) throws Exception {
> SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
> {code}
> yields {color:red}WARNING: The value of the local variable sdf is not used {color}
> {code:title=org.drools.examples.sudoku.Sudoku.dumpGrid()|borderStyle=solid}
> /**
> * Nice printout of the grid.
> */
> public void dumpGrid() {
> Formatter fmt = new Formatter(System.out);
> {code}
> yields {color:red}WARNING: Resource leak: 'fmt' is never closed {color}
> {code:title=org.drools.games.pong.PongUI|borderStyle=solid}
> import java.awt.*;
> import java.awt.event.KeyEvent;
> import java.awt.event.KeyListener;
> import java.awt.event.MouseEvent;
> import java.awt.event.MouseListener;
> import java.awt.font.FontRenderContext;
> import java.awt.font.TextLayout;
> import java.awt.image.BufferedImage;
> import javax.swing.*;
> import org.drools.games.GameConfiguration;
> import org.drools.games.GameUI;
> import org.kie.api.runtime.KieSession;
> import org.kie.internal.runtime.StatefulKnowledgeSession;
> import org.kie.api.runtime.rule.FactHandle;
> import org.kie.api.runtime.rule.EntryPoint;
> public class PongUI extends GameUI {
> {code}
> yields {color:red}WARNING: The import java.awt.event.KeyEvent is never used {color} \\
> {color:red}WARNING: The import java.awt.event.KeyListener is never used {color} \\
> {color:red}WARNING: The import java.awt.event.MouseEvent is never used {color} \\
> {color:red}WARNING: The import java.awt.event.MouseListener is never used {color} \\
> {color:red}WARNING: The import java.awt.image.BufferedImage is never used {color} \\
> {color:red}WARNING: The import javax.swing.* is never used {color} \\
> {color:red}WARNING: The import org.kie.internal.runtime.StatefulKnowledgeSession is never used {color} \\
> {color:red}WARNING: The import org.kie.api.runtime.rule.FactHandle is never used {color} \\
> {color:red}WARNING: The import org.kie.api.runtime.rule.EntryPoint is never used {color} \\
> etc
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (WFLY-3886) add org.jboss.remote-naming dep to org.hornetq.ra module
by Jeff Mesnil (JIRA)
Jeff Mesnil created WFLY-3886:
---------------------------------
Summary: add org.jboss.remote-naming dep to org.hornetq.ra module
Key: WFLY-3886
URL: https://issues.jboss.org/browse/WFLY-3886
Project: WildFly
Issue Type: Bug
Components: JMS
Affects Versions: 9.0.0.Alpha1
Reporter: Jeff Mesnil
Assignee: Jeff Mesnil
Fix For: 9.0.0.CR1
Add an optional dependency to org.jboss.remote-naming to the org.hornetq.ra to be able to create a RA that connects to a remote hornetq-server.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (DROOLS-506) Example project: massive number of code quality / correctness warnings
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-506?page=com.atlassian.jira.plugin... ]
Mario Fusco updated DROOLS-506:
-------------------------------
Priority: Trivial (was: Major)
> Example project: massive number of code quality / correctness warnings
> ----------------------------------------------------------------------
>
> Key: DROOLS-506
> URL: https://issues.jboss.org/browse/DROOLS-506
> Project: Drools
> Issue Type: Bug
> Reporter: Peter Horvath
> Assignee: Mario Fusco
> Priority: Trivial
> Attachments: eclipse_warnings.png
>
>
> The Drools example project contains code snippets that yield warnings: *while I absolutely understand that resources are limited and examples might not be the priority and the core code of the engine is of good quality*, I do think it is important to display dedication to high quality products.
> Having an example project full of code quality issues just gives a very bad first impression of the whole Drools project...
> Examples:
> {code:title=org.drools.examples.cashflow.CashFlowMain|borderStyle=solid}
> public class CashFlowMain {
> public static void main(String[] args) throws Exception {
> SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
> {code}
> yields {color:red}WARNING: The value of the local variable sdf is not used {color}
> {code:title=org.drools.examples.sudoku.Sudoku.dumpGrid()|borderStyle=solid}
> /**
> * Nice printout of the grid.
> */
> public void dumpGrid() {
> Formatter fmt = new Formatter(System.out);
> {code}
> yields {color:red}WARNING: Resource leak: 'fmt' is never closed {color}
> {code:title=org.drools.games.pong.PongUI|borderStyle=solid}
> import java.awt.*;
> import java.awt.event.KeyEvent;
> import java.awt.event.KeyListener;
> import java.awt.event.MouseEvent;
> import java.awt.event.MouseListener;
> import java.awt.font.FontRenderContext;
> import java.awt.font.TextLayout;
> import java.awt.image.BufferedImage;
> import javax.swing.*;
> import org.drools.games.GameConfiguration;
> import org.drools.games.GameUI;
> import org.kie.api.runtime.KieSession;
> import org.kie.internal.runtime.StatefulKnowledgeSession;
> import org.kie.api.runtime.rule.FactHandle;
> import org.kie.api.runtime.rule.EntryPoint;
> public class PongUI extends GameUI {
> {code}
> yields {color:red}WARNING: The import java.awt.event.KeyEvent is never used {color} \\
> {color:red}WARNING: The import java.awt.event.KeyListener is never used {color} \\
> {color:red}WARNING: The import java.awt.event.MouseEvent is never used {color} \\
> {color:red}WARNING: The import java.awt.event.MouseListener is never used {color} \\
> {color:red}WARNING: The import java.awt.image.BufferedImage is never used {color} \\
> {color:red}WARNING: The import javax.swing.* is never used {color} \\
> {color:red}WARNING: The import org.kie.internal.runtime.StatefulKnowledgeSession is never used {color} \\
> {color:red}WARNING: The import org.kie.api.runtime.rule.FactHandle is never used {color} \\
> {color:red}WARNING: The import org.kie.api.runtime.rule.EntryPoint is never used {color} \\
> etc
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (JGRP-1876) MERGE3 : Strange number and content of subgroups
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1876?page=com.atlassian.jira.plugin.... ]
Bela Ban resolved JGRP-1876.
----------------------------
Resolution: Done
Backported to 3.5.1
> MERGE3 : Strange number and content of subgroups
> ------------------------------------------------
>
> Key: JGRP-1876
> URL: https://issues.jboss.org/browse/JGRP-1876
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.4.2
> Reporter: Karim AMMOUS
> Assignee: Bela Ban
> Fix For: 3.5.1, 3.6
>
> Attachments: 4Subgroups.zip, DkeJgrpAddress.java, MergeTest4.java, MergeViewWith210Subgroups.log
>
>
> Using JGroups 3.4.2, a split occurred and a merge was processed successfully but number of subgroups is wrong (210 instead of 2).
> The final mergeView is correct and contains 210 members.
> Here is an extract of subviews:
> {code}
> INFO | Incoming-18,cluster,term-ETJ101697729-31726:host:192.168.56.6:1:CL(GROUP01)[F] | [MyMembershipListener.java:126] | (middleware) | MergeView view ID = [serv-ZM2BU35940-58033:vt-14:192.168.55.55:1:CL(GROUP01)[F]|172]
> 210 subgroups
> [....
> [term-ETJ100691812-36873:host:192.168.56.16:1:CL(GROUP01)[F]|170] (1) [term-ETJ104215245-11092:host:192.168.56.72:1:CL(GROUP01)[F]]
> [term-ETJ100691812-36873:host:192.168.56.16:1:CL(GROUP01)[F]|170] (1) [serv-ZM2BU38960-6907:asb:192.168.55.52:1:CL(GROUP01)[F]]
> [term-ETJ101697729-31726:host:192.168.56.6:1:CL(GROUP01)[F]|171] (1) [term-ETJ101697729-31726:host:192.168.56.6:1:CL(GROUP01)[F]]
> [term-ETJ100691812-36873:host:192.168.56.16:1:CL(GROUP01)[F]|170] (1) [serv-ZM2BU47533-55240:vt-14:192.168.55.57:1:CL(GROUP01)[F]]
> [term-ETJ100691812-36873:host:192.168.56.16:1:CL(GROUP01)[F]|170] (1) [serv-ZM2BU35943-49435:asb:192.168.55.51:1:CL(GROUP01)[F]]
> ....]
> {code}
> II wasn't able to reproduce that with a simple program. But I observed that merge was preceded by an ifdown/ifup on host 192.168.56.6. That member lost all others members, but it still present in their view.
> Example:
> {code}
> {A, B, C} => {A, B, C} and {C} => {A, B, C}
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (DROOLS-506) Example project: massive number of code quality / correctness warnings
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-506?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-506:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Example project: massive number of code quality / correctness warnings
> ----------------------------------------------------------------------
>
> Key: DROOLS-506
> URL: https://issues.jboss.org/browse/DROOLS-506
> Project: Drools
> Issue Type: Bug
> Reporter: Peter Horvath
> Assignee: Mario Fusco
> Attachments: eclipse_warnings.png
>
>
> The Drools example project contains code snippets that yield warnings: *while I absolutely understand that resources are limited and examples might not be the priority and the core code of the engine is of good quality*, I do think it is important to display dedication to high quality products.
> Having an example project full of code quality issues just gives a very bad first impression of the whole Drools project...
> Examples:
> {code:title=org.drools.examples.cashflow.CashFlowMain|borderStyle=solid}
> public class CashFlowMain {
> public static void main(String[] args) throws Exception {
> SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
> {code}
> yields {color:red}WARNING: The value of the local variable sdf is not used {color}
> {code:title=org.drools.examples.sudoku.Sudoku.dumpGrid()|borderStyle=solid}
> /**
> * Nice printout of the grid.
> */
> public void dumpGrid() {
> Formatter fmt = new Formatter(System.out);
> {code}
> yields {color:red}WARNING: Resource leak: 'fmt' is never closed {color}
> {code:title=org.drools.games.pong.PongUI|borderStyle=solid}
> import java.awt.*;
> import java.awt.event.KeyEvent;
> import java.awt.event.KeyListener;
> import java.awt.event.MouseEvent;
> import java.awt.event.MouseListener;
> import java.awt.font.FontRenderContext;
> import java.awt.font.TextLayout;
> import java.awt.image.BufferedImage;
> import javax.swing.*;
> import org.drools.games.GameConfiguration;
> import org.drools.games.GameUI;
> import org.kie.api.runtime.KieSession;
> import org.kie.internal.runtime.StatefulKnowledgeSession;
> import org.kie.api.runtime.rule.FactHandle;
> import org.kie.api.runtime.rule.EntryPoint;
> public class PongUI extends GameUI {
> {code}
> yields {color:red}WARNING: The import java.awt.event.KeyEvent is never used {color} \\
> {color:red}WARNING: The import java.awt.event.KeyListener is never used {color} \\
> {color:red}WARNING: The import java.awt.event.MouseEvent is never used {color} \\
> {color:red}WARNING: The import java.awt.event.MouseListener is never used {color} \\
> {color:red}WARNING: The import java.awt.image.BufferedImage is never used {color} \\
> {color:red}WARNING: The import javax.swing.* is never used {color} \\
> {color:red}WARNING: The import org.kie.internal.runtime.StatefulKnowledgeSession is never used {color} \\
> {color:red}WARNING: The import org.kie.api.runtime.rule.FactHandle is never used {color} \\
> {color:red}WARNING: The import org.kie.api.runtime.rule.EntryPoint is never used {color} \\
> etc
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (WFLY-3883) use a LIST for the JMS connection-factory's connector attribute
by Jeff Mesnil (JIRA)
[ https://issues.jboss.org/browse/WFLY-3883?page=com.atlassian.jira.plugin.... ]
Jeff Mesnil updated WFLY-3883:
------------------------------
Description:
The messaging's resources connection-factory and pooled-connection-factory use a MODEL type to represent their connectors.
This is for legacy version, as the first version of HornetQ that was integrated was required to specify a backup connector for each live connector. This was then discarded but the type of the attribute was not changed.
Currently, the connector attribute is represented as a DMR Object but only its keys are meaningful:
"connector" => {
"in-vm" => undefined,
"foo" => undefined
}
This complicates adding resources from the command line.
Now that we support resource transformations, the connector attribute should be represented as a list of STRING (and converted to its old representation for legacy version) so that the users can simply specify:
"connector" => ["in-vm", "foo"]
Since the CLI does not validate attribute type (it only check their names), the current code already accept a LIST of STRING such as above. However this is only documented in the attribute description field (its type remains an OBJECT)
was:
The messaging's resources connection-factory and pooled-connection-factory use a MODEL type to represent their connectors.
This is for legacy version, as the first version of HornetQ that was integrated was required to specify a backup connector for each live connector. This was then discarded but the type of the attribute was not changed.
Currently, the connector attribute is represented as a DMR Object but only its keys are meaningful:
"connector" => {
"in-vm" => undefined,
"foo" => undefined
}
This complicates adding resources from the command line.
Now that we support resource transformations, the connector attribute should be represented as a list of STRING (and converted to its old representation for legacy version) so that the users can simply specify:
"connector" => ["in-vm", "foo"]
> use a LIST for the JMS connection-factory's connector attribute
> ---------------------------------------------------------------
>
> Key: WFLY-3883
> URL: https://issues.jboss.org/browse/WFLY-3883
> Project: WildFly
> Issue Type: Enhancement
> Components: JMS
> Affects Versions: 9.0.0.Alpha1
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
> Fix For: 9.0.0.Beta1
>
>
> The messaging's resources connection-factory and pooled-connection-factory use a MODEL type to represent their connectors.
> This is for legacy version, as the first version of HornetQ that was integrated was required to specify a backup connector for each live connector. This was then discarded but the type of the attribute was not changed.
> Currently, the connector attribute is represented as a DMR Object but only its keys are meaningful:
> "connector" => {
> "in-vm" => undefined,
> "foo" => undefined
> }
> This complicates adding resources from the command line.
> Now that we support resource transformations, the connector attribute should be represented as a list of STRING (and converted to its old representation for legacy version) so that the users can simply specify:
> "connector" => ["in-vm", "foo"]
> Since the CLI does not validate attribute type (it only check their names), the current code already accept a LIST of STRING such as above. However this is only documented in the attribute description field (its type remains an OBJECT)
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (DROOLS-511) KieContainerImpl.updateResourcesIncrementally throws NullPointerException when a package doesn't exist
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-511?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-511:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> KieContainerImpl.updateResourcesIncrementally throws NullPointerException when a package doesn't exist
> ------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-511
> URL: https://issues.jboss.org/browse/DROOLS-511
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.0.0.Final
> Reporter: Mike Wilson
> Assignee: Mario Fusco
>
> When calling KieContainerImpl.updateToVersion(ReleaseId), we sometimes experience a NullPointerException during a chained set of method calls that try to obtain a package, and then a rule within it.
> If the package is null, a NullPointerException is thrown, because there is no check in place before that call to get the rule from the package.
> To prevent this, a null check should be added to the package before trying to get the rule from it.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (DROOLS-354) Can't load pom.properties when jar not on default drive on Windows
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-354?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-354:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Can't load pom.properties when jar not on default drive on Windows
> ------------------------------------------------------------------
>
> Key: DROOLS-354
> URL: https://issues.jboss.org/browse/DROOLS-354
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.0.0.Final
> Environment: Windows
> Reporter: Peter Cooper
> Assignee: Mario Fusco
>
> I'm using Apache Tomcat to run my web application, which includes Drools 6.0.0.Final and getting rules files out of the classpath. However, the webapps directory (the appBase in Tomcat's server.xml) is on a different drive than the main Tomcat installation. When Drools is trying to get its pom properties (ClasspathKieProject's getPomProperties method, starting on line 167) it looks like it first strips off the Windows drive letter. It then tries to find the path, but on the drive of the Windows current directory (in this case, the drive where Tomcat is installed) instead of the drive where the file actually is. This means that it can't find the jar file, so I get the "Unable to load pom.properties" "as jarPath cannot be found" error. I'm not sure why it's trying to strip off the drive letter, since I think it would be able to find the file correctly if that weren't the case.
> Thank you.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (DROOLS-540) KieModule fails to load on Windows
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-540?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-540:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> KieModule fails to load on Windows
> ----------------------------------
>
> Key: DROOLS-540
> URL: https://issues.jboss.org/browse/DROOLS-540
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.0.1.Final
> Environment: Windows 2007, Weblogic 12c
> Reporter: Christian Sterzl
> Assignee: Mario Fusco
>
> When loading a KModule in Weblogic on Windows it fails.
> The error is in this class:
> {code:java|title=org.drools.compiler.kie.builder.impl.ClasspathKieProject|linenumbers=true|firstline=300}
> // remove any remaining protocols, normally only if it was a jar
> int firstSlash = urlPath.indexOf( '/' );
> colonIndex = firstSlash > 0 ? urlPath.lastIndexOf( ":", firstSlash ) : urlPath.lastIndexOf( ":" );
> if ( colonIndex >= 0 ) {
> urlPath = urlPath.substring( colonIndex + 1 );
> }
> {code}
> Following input:
> /C:/DEV_DATA/Workspaces/BDD/taskboard.rules/target/classes
> Produces following output:
> /DEV_DATA/Workspaces/BDD/taskboard.rules/target/classes
> Which makes it impossible to load in a windows environment.
> When I add the pom.properties on the same drive as Weblogic runs it works.
> I have to add pom.properties on D:/DEV_DATA/Workspaces/BDD/taskboard.rules/target/classes/META-INF/maven/classes/pom.properties.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month