| To: | "users@xxxxxxxxxx" <users@xxxxxxxxxx> |
|---|---|
| Subject: | IDE Warning - Parameter value should not be assigned |
| From: | "Edward Sumerfield" <esumerfd@xxxxxxxxx> |
| Date: | Wed, 2 Aug 2006 10:50:40 -0400 |
| Delivered-to: | mailing list users@cinjug.org |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=JuqPK1budxLh1jA7cZvqWJsNgRrG94yOiU0p4oafBmI4I/jBc6NfU5hwzYaoP8eK7EmQowTIPCC300Rpj0RF0YqSMSh+BsOU4MbZOHDTfvCp6FpN/DSWwlS4WYZrqV0zQryGgMsQc0WHOqT25gABwKzkSF/taLHDHY8/WT8H7/A= |
| Mailing-list: | contact users-help@cinjug.org; run by ezmlm |
| Reply-to: | esumerfd@xxxxxxxxxxxxxx |
|
Is the warning "The parameter value should not be assigned" still valid in Java? public void getFoo(int a_value, Object a_object) { a_value += 1; // WARNING a_object = new Object(); // WARNING } It has always been good programming practice to avoid assigning parameters because in C/C++ you might be setting a pointer that the caller would not know had changed. In java it is not possible set the object references that are passed in and the primitive types are passed by value so what is the danger? I propose that the old bad practive rule be revoked in the light of better languages? -- Ed |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | :SPAM: Quick Business Leasing Solutions Financing & Lending made Simple, Mrs Barcia |
|---|---|
| Next by Date: | Re: [cinjug-users] IDE Warning - Parameter value should not be assigned, Rob Biedenharn |
| Previous by Thread: | :SPAM: Quick Business Leasing Solutions Financing & Lending made Simple, Mrs Barcia |
| Next by Thread: | Re: [cinjug-users] IDE Warning - Parameter value should not be assigned, Rob Biedenharn |
| Indexes: | [Date] [Thread] [Top] [All Lists] |