ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Tulley" <JTUL...@novell.com>
Subject [PATCH] os detection code in JavaDoc.java needs documentation of NetWare assumption
Date Thu, 11 Oct 2001 17:47:54 GMT
You can take or leave this patch.  In my review of all OS detecting code, I found the code
in Javadoc.java,


         String os = System.getProperty("os.name").toLowerCase();
         boolean dosBased = 
             os.indexOf("windows") >= 0 || os.indexOf("os/2") >= 0;
         String extension =  dosBased? ".exe" : "";
 
          // Look for javadoc in the java.home/../bin directory.  Unfortunately

In this case, NetWare should be considered not "dosBased", so no code change was required.
 The problem I saw is that if this variable is ever used in any other logic elsewhere in javadoc.java,
the assumption might break down, since NetWare is often more similar to Windows than UNIX
on some path matters.  So, I thought it would be good to put in the following comments:

         String os = System.getProperty("os.name").toLowerCase();
         boolean dosBased = 
                 os.indexOf("windows") >= 0 || os.indexOf("os/2") >= 0;
        // for NetWare, we do not want an extension either, so we will be
        // "non dosBased".  If this variable is ever used for other logic
        // besides the extension, we may need to revisit this code.
        String extension =  dosBased? ".exe" : "";
 
        // Look for javadoc in the java.home/../bin directory.  Unfortunately



Jeff Tulley  (jtulley@novell.com)
(801)861-5322
Novell, Inc., the leading provider of Net services software.


Mime
View raw message