You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2003/12/31 07:09:23 UTC

Re: [NET] VMSFTPEntryParser bug?

In message <20...@javactivity.org>, steve cohen writes
:
>failing but on a different line.  I'm not sure what platform Jeff is on when 
>he did the build, but I think I should rewrite this test in a way that 
>doesn't assume any particular order since this seems to be JDK-implementation 
>dependent.  The JavaDoc for HashMap specifies no order that should be 
>expected for HashMap.values(), nor for HashMap.keySet() for that matter.  We 
>could probably achieve a dependable order by using a TreeMap.keySet() 
>instead.

+1

>However, this brings up the larger question, of what the target platform for 
>commons-net is.  I dimly remember that it being java 1.1.  This is why I went 
>through the annoying exercise of creating the FTPFileList and FTPFileIterator 
>classes based on java-1.1-compatible containers like Vector.  If we are now 
>using HashMaps, though, we will have violated this contract, if, in fact, 
>such a contract exists.  Can someone clarify this question?

This is a good question.  At first I was going to say it doesn't
impact the tests; but if your tests are dependent on a specific JDK,
then you never run them on other JDKs.  I'm of the mind that we ought
to agree on a plan to migrate to J2SE 1.4 features.  Still, there's the issue
of Ant, which has a dependency on commons net.  I know they abandoned
JDK 1.1 support in the latest release, but is their new baseline J2SE 1.2
or 1.4?  Anyone who needs JDK 1.1 support can live with the 1.1 release
and we can support it in a separate branch applying bug fixes if there is
sufficient demand.  Another alternative is to start an experimental branch
intended to become Commons Net 2.0 and continue releasing 1.x releases that
meet Ant's compatibility requirements.  Commons Net 2.0 could be a fundamental
redesign and reimplementation based on the new IO features present in
J2SE 1.4.  The guts of the code would change, but not all of the protocol
logic built around it, so it's not like it would be a complete rewrite.  A
lot of the kluginess in Commons Net stems from the lack of java.nio at
its genesis.  At any rate, until we hash some of this out in more detail,
my vote is to support whatever Ant requires for compatibility.  If it's
J2SE 1.2, then HashMaps are okay in the unit tests.

daniel



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [NET] VMSFTPEntryParser bug?

Posted by steve cohen <sc...@javactivity.org>.
Ant's new baseline (as of Ant 1.6) is J2SE 1.2.  I'm in basic agreement with 
Daniel's suggestions, although I myself have no experience whatever with nio.  
I guess I should bone up on it.

On Wednesday 31 December 2003 12:09 am, Daniel F. Savarese wrote:
> In message <20...@javactivity.org>, steve cohen
> writes
>
> >failing but on a different line.  I'm not sure what platform Jeff is on
> > when he did the build, but I think I should rewrite this test in a way
> > that doesn't assume any particular order since this seems to be
> > JDK-implementation dependent.  The JavaDoc for HashMap specifies no order
> > that should be expected for HashMap.values(), nor for HashMap.keySet()
> > for that matter.  We could probably achieve a dependable order by using a
> > TreeMap.keySet() instead.
>
> +1
>
> >However, this brings up the larger question, of what the target platform
> > for commons-net is.  I dimly remember that it being java 1.1.  This is
> > why I went through the annoying exercise of creating the FTPFileList and
> > FTPFileIterator classes based on java-1.1-compatible containers like
> > Vector.  If we are now using HashMaps, though, we will have violated this
> > contract, if, in fact, such a contract exists.  Can someone clarify this
> > question?
>
> This is a good question.  At first I was going to say it doesn't
> impact the tests; but if your tests are dependent on a specific JDK,
> then you never run them on other JDKs.  I'm of the mind that we ought
> to agree on a plan to migrate to J2SE 1.4 features.  Still, there's the
> issue of Ant, which has a dependency on commons net.  I know they abandoned
> JDK 1.1 support in the latest release, but is their new baseline J2SE 1.2
> or 1.4?  Anyone who needs JDK 1.1 support can live with the 1.1 release and
> we can support it in a separate branch applying bug fixes if there is
> sufficient demand.  Another alternative is to start an experimental branch
> intended to become Commons Net 2.0 and continue releasing 1.x releases that
> meet Ant's compatibility requirements.  Commons Net 2.0 could be a
> fundamental redesign and reimplementation based on the new IO features
> present in J2SE 1.4.  The guts of the code would change, but not all of the
> protocol logic built around it, so it's not like it would be a complete
> rewrite.  A lot of the kluginess in Commons Net stems from the lack of
> java.nio at its genesis.  At any rate, until we hash some of this out in
> more detail, my vote is to support whatever Ant requires for compatibility.
>  If it's J2SE 1.2, then HashMaps are okay in the unit tests.
>
> daniel
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [NET] VMSFTPEntryParser bug?

Posted by steve cohen <sc...@javactivity.org>.
On Wednesday 31 December 2003 12:09 am, Daniel F. Savarese wrote:
> In message <20...@javactivity.org>, steve cohen
> writes
>
> >failing but on a different line.  I'm not sure what platform Jeff is on
> > when he did the build, but I think I should rewrite this test in a way
> > that doesn't assume any particular order since this seems to be
> > JDK-implementation dependent.  The JavaDoc for HashMap specifies no order
> > that should be expected for HashMap.values(), nor for HashMap.keySet()
> > for that matter.  We could probably achieve a dependable order by using a
> > TreeMap.keySet() instead.
>
> +1
>
> >However, this brings up the larger question, of what the target platform
> > for commons-net is.  I dimly remember that it being java 1.1.  This is
> > why I went through the annoying exercise of creating the FTPFileList and
> > FTPFileIterator classes based on java-1.1-compatible containers like
> > Vector.  If we are now using HashMaps, though, we will have violated this
> > contract, if, in fact, such a contract exists.  Can someone clarify this
> > question?
>
> This is a good question.  At first I was going to say it doesn't
> impact the tests; but if your tests are dependent on a specific JDK,
> then you never run them on other JDKs.  I'm of the mind that we ought
> to agree on a plan to migrate to J2SE 1.4 features.  Still, there's the
> issue of Ant, which has a dependency on commons net.  I know they abandoned
> JDK 1.1 support in the latest release, but is their new baseline J2SE 1.2
> or 1.4?  Anyone who needs JDK 1.1 support can live with the 1.1 release and
> we can support it in a separate branch applying bug fixes if there is
> sufficient demand.  Another alternative is to start an experimental branch
> intended to become Commons Net 2.0 and continue releasing 1.x releases that
> meet Ant's compatibility requirements.  Commons Net 2.0 could be a
> fundamental redesign and reimplementation based on the new IO features
> present in J2SE 1.4.  The guts of the code would change, but not all of the
> protocol logic built around it, so it's not like it would be a complete
> rewrite.  A lot of the kluginess in Commons Net stems from the lack of
> java.nio at its genesis.  At any rate, until we hash some of this out in
> more detail, my vote is to support whatever Ant requires for compatibility.
>  If it's J2SE 1.2, then HashMaps are okay in the unit tests.
>
> daniel
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org