
| Key: |
NET-75
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Andrew Paterson
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Operating System: other
Platform: Other
Operating System: other
Platform: Other
|
|
|
When NetComponents became commons-net, a new variable __restartOffset was added in FTPClient.java. Although there is a new "setter" method, there is no explicit initialisation of this variable in the constructor. It may be that Java automatically initialises instance variables to zero (I am more familiar with C++ in this regard) but I feel that it would be better to do this explicitly, especially as all of the other variables are explicitly initialised.
|
|
Description
|
When NetComponents became commons-net, a new variable __restartOffset was added in FTPClient.java. Although there is a new "setter" method, there is no explicit initialisation of this variable in the constructor. It may be that Java automatically initialises instance variables to zero (I am more familiar with C++ in this regard) but I feel that it would be better to do this explicitly, especially as all of the other variables are explicitly initialised. |
Show » |
|
value of zero in __initDefaults(). It's actually more than just a generally
good thing to do. Without initializing the variable in __initDefaults(),
__restsartOffset is not reset the various times __initDefaults() is called
(e.g., reinitialize(), connect()), so values will persist between
connections and in other situations where it should be reset.