Re: [JSch-users] Could ChannelSftp.LsEntry be declared static
Status: Alpha
Brought to you by:
ymnk
From: <ym...@jc...> - 2014-05-22 05:41:59
|
Hi, +-From: laogao <gao...@gm...> ---- |_Date: Tue, 20 May 2014 01:09:33 +0800 __ | |It seems (as of version 0.1.51) the inner class LsEntry is declared as |"public class LsEntry" inside ChannelSftp. I believe there is a subtle |difference between inner (non-static) classes and nested (static) classes, |which is causing me some headaches using JSch e.g. from Scala (could be |circumvented but the code looks weird). What kind of headaches do you have? Usually, we are writing its tests by using scala, and we have not had such problems yet. It is helpful to share your problem. As for handing LsEntry class, for example, we have been doing as follows, import collection.JavaConverters._ val c = session.openChannel("sftp").asInstanceOf[ChannelSftp] c.connect(); c.ls("/tmp/").asScala map { case f: ChannelSftp#LsEntry => err.println(f.getFilename); } | I'm wondering if this LsEntry could |be declared static, i.e. as nested (static) class, since it doesn't seem to |require (or depend on) concrete instances of the enclosing class |(ChannelSftp). Or is there something I blindly overlooked? I agree that, but the changes for the modifier of public methods will cause binary incompatibility, and there is no plan to change it. Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 Skype callto://jcraft/ Twitter: http://twitter.com/ymnk Facebook: http://facebook.com/aymnk |