[JBoss JIRA] (DROOLS-506) Example project: massive number of code quality / correctness warnings
by Peter Horvath (JIRA)
[ https://issues.jboss.org/browse/DROOLS-506?page=com.atlassian.jira.plugin... ]
Peter Horvath updated DROOLS-506:
---------------------------------
Description:
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
was:
The Drools example project contains code snippets that yield warnings:
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 XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
> 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
> Security Level: Public(Everyone can see)
> Reporter: Peter Horvath
> Assignee: Mark Proctor
>
> 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.2.3#6260)
10 years, 7 months
[JBoss JIRA] (WFLY-2789) Remote client transaction timeout values are overwrote by hardcoded values
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-2789?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-2789:
-----------------------------------------------
Ivo Studensky <istudens(a)redhat.com> changed the Status of [bug 1093752|https://bugzilla.redhat.com/show_bug.cgi?id=1093752] from NEW to ASSIGNED
> Remote client transaction timeout values are overwrote by hardcoded values
> --------------------------------------------------------------------------
>
> Key: WFLY-2789
> URL: https://issues.jboss.org/browse/WFLY-2789
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: EJB
> Reporter: Johnathon Lee
> Assignee: David Lloyd
> Fix For: 8.1.0.Final, 9.0.0.Alpha1
>
>
> The EJB3 interceptor is not using client values for timeouts, this is a problem for users trying to use EJB for transaction propagation.
> Refer to the code in https://github.com/wildfly/wildfly/blob/master/ejb3/src/main/java/org/jbo...:
> private void createOrResumeXidTransaction(final XidTransactionID xidTransactionID) throws Exception {
> final TransactionManager transactionManager = this.ejbRemoteTransactionsRepository.getTransactionManager();
> final Transaction alreadyCreatedTx = this.ejbRemoteTransactionsRepository.getImportedTransaction(xidTransactionID);
> if (alreadyCreatedTx != null) {
> // resume the already created tx
> transactionManager.resume(alreadyCreatedTx);
> } else {
> // begin a new tx and add it to the tx repository
> // TODO: Fix the tx timeout (which currently is passed as 300 seconds)
> final Transaction newSubOrdinateTx = this.ejbRemoteTransactionsRepository.importTransaction(xidTransactionID, 300);
> // associate this tx with the thread
> transactionManager.resume(newSubOrdinateTx);
> }
> }
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (DROOLS-506) Example project: massive number of code quality / correctness warnings
by Peter Horvath (JIRA)
Peter Horvath created DROOLS-506:
------------------------------------
Summary: 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
Security Level: Public (Everyone can see)
Reporter: Peter Horvath
Assignee: Mark Proctor
The Drools example project contains code snippets that yield warnings:
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 XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
{color:red}WARNING: The import XXXXXXXXX is never used {color} \\
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (DROOLS-504) Example project Maven configuration incomplete: plugin repository not configured
by Peter Horvath (JIRA)
Peter Horvath created DROOLS-504:
------------------------------------
Summary: Example project Maven configuration incomplete: plugin repository not configured
Key: DROOLS-504
URL: https://issues.jboss.org/browse/DROOLS-504
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 6.0.1.Final
Reporter: Peter Horvath
Assignee: Mark Proctor
Drools Example project uses JBoss dependencies both for libraries and Maven plugins. The JBoss repository is configured within the pom.xml _so the examples sources in the distribution zip build out-of-the-box with maven_. The same has not been done for the *pluginRepository*, as a result, Maven build fails as it cannot download JBoss plugins.
Please add the necessary configuration to the example projects so that it really can be built out-of-the-box.
{code:xml}
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
{code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (JGRP-1844) Remove shared transport
by Bela Ban (JIRA)
Bela Ban created JGRP-1844:
------------------------------
Summary: Remove shared transport
Key: JGRP-1844
URL: https://issues.jboss.org/browse/JGRP-1844
Project: JGroups
Issue Type: Task
Reporter: Bela Ban
Assignee: Bela Ban
I'm thinking of deprecating the shared transport [1] and remove it in 4.0. The replacement would be fork channels [2].
Here's my reasoning:
* Shared transports are quite a complex beast: initialization (ref counting), cluster-name and local-addr are not used in TP when shared, duplicate logic. Removing this will make the code base smaller
* All protocols *above* shared transports are not shared, e.g. FD_SOCK, NAKACK, UNICAST etc all maintain their own threads, retransmission tables, sockets etc. With fork channels, everything up to the FORK protocol *is* shared
* TUNNEL doesn't work with shared transports (throws an exception)
* Hidden insertion of TP$ProtocolAdapter into the stack when shared transports are used
* Unneeded cost of sending N-1 messages (e.g. with TCP). Currently we send a message with dest null and no IP multicast capable transport to all physical addresses in the transport, which is a waste
Thoughts ? My +100 for removing shared transports in 4.0...
[1] http://www.jgroups.org/manual/html/user-advanced.html#SharedTransport
[2] http://www.jgroups.org/manual/html/user-advanced.html#ForkChannel
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (JGRP-1844) Remove shared transport
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1844?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-1844:
---------------------------
Fix Version/s: 4.0
Affects Version/s: 3.5
> Remove shared transport
> -----------------------
>
> Key: JGRP-1844
> URL: https://issues.jboss.org/browse/JGRP-1844
> Project: JGroups
> Issue Type: Task
> Affects Versions: 3.5
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.0
>
>
> I'm thinking of deprecating the shared transport [1] and remove it in 4.0. The replacement would be fork channels [2].
> Here's my reasoning:
> * Shared transports are quite a complex beast: initialization (ref counting), cluster-name and local-addr are not used in TP when shared, duplicate logic. Removing this will make the code base smaller
> * All protocols *above* shared transports are not shared, e.g. FD_SOCK, NAKACK, UNICAST etc all maintain their own threads, retransmission tables, sockets etc. With fork channels, everything up to the FORK protocol *is* shared
> * TUNNEL doesn't work with shared transports (throws an exception)
> * Hidden insertion of TP$ProtocolAdapter into the stack when shared transports are used
> * Unneeded cost of sending N-1 messages (e.g. with TCP). Currently we send a message with dest null and no IP multicast capable transport to all physical addresses in the transport, which is a waste
> Thoughts ? My +100 for removing shared transports in 4.0...
> [1] http://www.jgroups.org/manual/html/user-advanced.html#SharedTransport
> [2] http://www.jgroups.org/manual/html/user-advanced.html#ForkChannel
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (WFLY-3393) JSP 2 different tags called with same tag instance
by roy mizrachi (JIRA)
[ https://issues.jboss.org/browse/WFLY-3393?page=com.atlassian.jira.plugin.... ]
roy mizrachi commented on WFLY-3393:
------------------------------------
Hi Stuart,
I do not have a reproducer but managed to find this issue by putting break points in the doStartTag(),release() methods of the javax.servlet.jsp.tagext.Tag implementation put some tags in a JSP page and run this.
Thanks for the effort,
Roi
> JSP 2 different tags called with same tag instance
> --------------------------------------------------
>
> Key: WFLY-3393
> URL: https://issues.jboss.org/browse/WFLY-3393
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Web (Undertow)
> Affects Versions: 8.1.0.CR2
> Reporter: roy mizrachi
> Assignee: Stuart Douglas
>
> When working with JSP tags on struts i can see that sometimes 2 diffrent tags with same type is called with the same instance.
> Example:
> JSP
> <jcv:text id="email" maxlength="255" property="valueObject.Email"/>
> <br>
> <jcv:text id="phone" maxlength="255" property="valueObject.Phone"/>
> TLD
> <tag>
> <name>text</name>
> <tagclass>tti.jcore.views.form.tag.JViewsTextTag</tagclass>
> ...
> </tag>
> I can see that the public int doStartTag() called for both with the same instance.
>
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months