Bug #24595 Assignment with no effect
Submitted: 26 Nov 2006 15:30 Modified: 10 Oct 2012 23:13
Reporter: Nils Hammar Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:5.0.4 OS:Any (Any)
Assigned to: CPU Architecture:Any

[26 Nov 2006 15:30] Nils Hammar
Description:
On line 814 in the file com.mysql.jdbc.DatabaseMetaData.java there is a strannge variable assignment that essentially may not have the expected effect:

	String cascadeOptions = cascadeOptions = line.substring(lastParenIndex + 1);

This was alerted as a warning in Eclipse.

How to repeat:
Source code warning.

Suggested fix:

	String cascadeOptions = line.substring(lastParenIndex + 1);
[27 Nov 2006 12:40] Tonci Grgin
Hi Nils and thanks for your problem report. Verified as described on latest 5.0 sources.
[10 Oct 2012 23:13] John Russell
Added to changelog for 5.1.6: 

Compiling in Eclipse could produce a compilation warning for line 814
in the filecom.mysql.jdbc.DatabaseMetaData.java.