You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-dev@incubator.apache.org by KwangYul Seo <kw...@gmail.com> on 2005/11/21 23:03:55 UTC
Inner classes
Hi,
I guess the following classes should be static inner classes.
- FtpletEntry (in FtpletContainer)
- TableEntry (in FtpDirectoryTableModel)
- TableEntry (in FtpFileTableModel)
- Entry (in IPRestrictorTable)
These classes do not use its embedded reference to the object which created
it.
This reference makes the instances of the class larger, and may keep the
reference to the creator object alive longer than necessary.
Thanks,
Kwang Yul Seo
Re: Inner classes
Posted by Rana Bhattacharyya <ra...@yahoo.com>.
Modified and commited the sources.
FtpFileTableModel and FtpDirectoryTableModel cells are
editable bevause if the file/directory path is long,
the whole path will not be displayed in the table. So
the user may want to view the full path by selecting
the cell and moving the cursor. The entries will not
be saved anywhere. It is just for viewing the path
easily.
Thanks,
Rana Bhattacharyya
--- Sergey Vladimirov <vl...@gmail.com> wrote:
> Hi, all!
> - FtpletEntry (in FtpletContainer)
> More over, name and ftplet variables should be
> final.
> private static class FtpletEntry {
> public FtpletEntry(String name, Ftplet ftplet) {
> this.name <http://this.name> = name;
> this.ftplet = ftplet;
> }
> final String name;
> final Ftplet ftplet;
> }
>
> - TableEntry (in FtpDirectoryTableModel)
> 1. Yes, it should be static.
> 2. Also, values should be final and be setted in
> constructor
> 3. Bug?:
> /**
> * Is cell editable - currently false.
> */
> public boolean isCellEditable(int row, int col) {
> return true;
> }
>
> - TableEntry (in FtpFileTableModel)
> Same points, including possible bug.
>
> - Entry (in IPRestrictorTable)
> Yes, should be static
>
> Rana? Paul?
>
> --
> Sergey Vladimirov
>
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
Re: Inner classes
Posted by Sergey Vladimirov <vl...@gmail.com>.
Hi, all!
- FtpletEntry (in FtpletContainer)
More over, name and ftplet variables should be final.
private static class FtpletEntry {
public FtpletEntry(String name, Ftplet ftplet) {
this.name <http://this.name> = name;
this.ftplet = ftplet;
}
final String name;
final Ftplet ftplet;
}
- TableEntry (in FtpDirectoryTableModel)
1. Yes, it should be static.
2. Also, values should be final and be setted in constructor
3. Bug?:
/**
* Is cell editable - currently false.
*/
public boolean isCellEditable(int row, int col) {
return true;
}
- TableEntry (in FtpFileTableModel)
Same points, including possible bug.
- Entry (in IPRestrictorTable)
Yes, should be static
Rana? Paul?
--
Sergey Vladimirov