Mantis Bug Tracker

View Issue DetailsJump to Notes ] Wiki ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000056jquantlib[All Projects] toolspublic2008-12-20 12:222009-03-09 00:10
ReporterRichard Gomes 
Assigned ToRichard Gomes 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version0.1.2Fixed in Version0.1.2 
Summary0000056: PMD should list non final method parameters
DescriptionIn Java, it's very rare or even a bad practice to return values on parameters.
In spite Java does not have parameter passing by reference, it's still possible to change the value of an external object encapsulated inside a reference passed by value.

Also...
Received parameter values should not be changed inside the method, otherwise the received passed parameter is lost and/or cannot be used safely inside the method.

For these reasons, *all* method parameters should be final unless for a very good reason.


This verification helps developers to find methods which need code review.
TagsNo tags attached.
Attached Files

- Relationships
related to 0000183feedback PMD :: analise design rules and controversial rules 
child of 0000030closedRichard Gomes Remove Macker 

-  Notes
(0000101)
Richard Gomes (manager)
2009-02-02 02:34

* I've created colt.xml and fastutil.xml under directory src/main/pmd as example.

* I've integrated these 2 rulesets in pom.xml near line 900:
              <ruleset>${basedir}/src/main/pmd/colt.xml</ruleset>
              <ruleset>${basedir}/src/main/pmd/fastutil.xml</ruleset>

* The following articles explain how PMD rulesets can be created:
  http://pmd.sourceforge.net/howtowritearule.html [^]
  http://www.onjava.com/pub/a/onjava/2003/04/09/pmd_rules.html [^]
(0000109)
Ueli Hofstetter (developer)
2009-02-03 12:37

review/confirm
(0000141)
Richard Gomes (manager)
2009-02-08 18:10

done
(0000235)
Richard Gomes (manager)
2009-03-09 00:10

Rule moved to architectural.xml

- Issue History
Date Modified Username Field Change
2008-12-20 12:22 Richard Gomes New Issue
2008-12-20 12:22 Richard Gomes Status new => assigned
2008-12-20 12:22 Richard Gomes Assigned To => Dominik Holenstein
2009-01-25 06:40 Dominik Holenstein Assigned To Dominik Holenstein =>
2009-01-25 21:22 Richard Gomes Target Version => 0.1.2
2009-01-25 21:22 Richard Gomes Description Updated
2009-01-25 23:24 Richard Gomes Relationship added child of 0000030
2009-01-27 01:11 Administrator Status assigned => new
2009-02-02 02:34 Richard Gomes Note Added: 0000101
2009-02-02 19:25 Ueli Hofstetter Status new => assigned
2009-02-02 19:25 Ueli Hofstetter Assigned To => Ueli Hofstetter
2009-02-03 12:37 Ueli Hofstetter Note Added: 0000109
2009-02-03 12:37 Ueli Hofstetter Assigned To Ueli Hofstetter => Richard Gomes
2009-02-08 18:07 Richard Gomes Description Updated
2009-02-08 18:09 Richard Gomes Issue Monitored: Dominik Holenstein
2009-02-08 18:09 Richard Gomes Issue Monitored: Srinivas Hasti
2009-02-08 18:09 Richard Gomes Issue Monitored: Ueli Hofstetter
2009-02-08 18:10 Richard Gomes Issue Monitored: Richard Gomes
2009-02-08 18:10 Richard Gomes Relationship added parent of 0000183
2009-02-08 18:10 Richard Gomes Relationship deleted parent of 0000183
2009-02-08 18:10 Richard Gomes Relationship added related to 0000183
2009-02-08 18:10 Richard Gomes Note Added: 0000141
2009-02-08 18:10 Richard Gomes Status assigned => resolved
2009-02-08 18:10 Richard Gomes Fixed in Version => 0.1.2
2009-02-08 18:10 Richard Gomes Resolution open => fixed
2009-03-09 00:10 Richard Gomes Note Added: 0000235
2009-03-09 00:10 Richard Gomes Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker