donaldp 02/02/08 18:51:50
Modified: proposal/myrmidon/src/java/org/apache/aut/vfs/provider/ftp
FtpFileObject.java FtpFileSystem.java
proposal/myrmidon/src/java/org/apache/aut/vfs/provider/local
LocalFile.java LocalFileNameParser.java
proposal/myrmidon/src/java/org/apache/aut/vfs/provider/smb
SmbFileNameParser.java SmbFileObject.java
proposal/myrmidon/src/java/org/apache/aut/vfs/provider/zip
ZipFileSystem.java
Log:
Zap some audit warnings
Revision Changes Path
1.3 +23 -14
jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/ftp/FtpFileObject.java
Index: FtpFileObject.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/ftp/FtpFileObject.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FtpFileObject.java 6 Feb 2002 13:33:42 -0000 1.2
+++ FtpFileObject.java 9 Feb 2002 02:51:49 -0000 1.3
@@ -22,10 +22,13 @@
*
* @author Adam Murdoch
*/
-class FtpFileObject extends AbstractFileObject
+class FtpFileObject
+ extends AbstractFileObject
{
- private static final Resources REZ
- = ResourceManager.getPackageResources( FtpFileObject.class );
+ private final static Resources REZ =
+ ResourceManager.getPackageResources( FtpFileObject.class );
+
+ private final static FTPFile[] EMPTY_FTP_FILE_ARRAY = {};
private FtpFileSystem m_ftpFs;
@@ -33,12 +36,11 @@
private FTPFile m_fileInfo;
private FTPFile[] m_children;
- private static final FTPFile[] EMPTY_FTP_FILE_ARRAY = {};
- public FtpFileObject( FileName name, FtpFileSystem fs )
+ public FtpFileObject( final FileName name, final FtpFileSystem
fileSystem )
{
- super( name, fs );
- m_ftpFs = fs;
+ super( name, fileSystem );
+ m_ftpFs = fileSystem;
}
/**
@@ -74,7 +76,8 @@
/**
* Attaches this file object to its file resource.
*/
- protected void doAttach() throws Exception
+ protected void doAttach()
+ throws Exception
{
// Get the parent folder to find the info for this file
FtpFileObject parent = (FtpFileObject)getParent();
@@ -106,7 +109,8 @@
* Determines the type of the file, returns null if the file does not
* exist.
*/
- protected FileType doGetType() throws Exception
+ protected FileType doGetType()
+ throws Exception
{
if( m_fileInfo == null )
{
@@ -129,7 +133,8 @@
/**
* Lists the children of the file.
*/
- protected String[] doListChildren() throws Exception
+ protected String[] doListChildren()
+ throws Exception
{
if( m_children == null )
{
@@ -166,7 +171,8 @@
/**
* Creates this file as a folder.
*/
- protected void doCreateFolder() throws Exception
+ protected void doCreateFolder()
+ throws Exception
{
if( !m_ftpFs.getClient().makeDirectory( getName().getPath() ) )
{
@@ -194,7 +200,8 @@
/**
* Notification of the input stream being closed.
*/
- protected void doEndInput() throws Exception
+ protected void doEndInput()
+ throws Exception
{
if( !m_ftpFs.getClient().completePendingCommand() )
{
@@ -206,7 +213,8 @@
/**
* Creates an output stream to write the file content to.
*/
- protected OutputStream doGetOutputStream() throws Exception
+ protected OutputStream doGetOutputStream()
+ throws Exception
{
return m_ftpFs.getClient().storeFileStream( getName().getPath() );
}
@@ -214,7 +222,8 @@
/**
* Notification of the output stream being closed.
*/
- protected void doEndOutput() throws Exception
+ protected void doEndOutput()
+ throws Exception
{
if( !m_ftpFs.getClient().completePendingCommand() )
{
1.3 +11 -8
jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/ftp/FtpFileSystem.java
Index: FtpFileSystem.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/ftp/FtpFileSystem.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FtpFileSystem.java 6 Feb 2002 13:33:42 -0000 1.2
+++ FtpFileSystem.java 9 Feb 2002 02:51:49 -0000 1.3
@@ -23,17 +23,19 @@
*
* @author Adam Murdoch
*/
-class FtpFileSystem extends AbstractFileSystem
+class FtpFileSystem
+ extends AbstractFileSystem
{
- private static final Resources REZ
- = ResourceManager.getPackageResources( FtpFileSystem.class );
+ private final static Resources REZ =
+ ResourceManager.getPackageResources( FtpFileSystem.class );
private FTPClient m_client;
- public FtpFileSystem( FileName rootName,
- String hostname,
- String username,
- String password ) throws FileSystemException
+ public FtpFileSystem( final FileName rootName,
+ final String hostname,
+ final String username,
+ final String password )
+ throws FileSystemException
{
super( rootName );
try
@@ -95,7 +97,8 @@
/**
* Creates a file object.
*/
- protected FileObject createFile( FileName name ) throws
FileSystemException
+ protected FileObject createFile( FileName name )
+ throws FileSystemException
{
return new FtpFileObject( name, this );
}
1.3 +25 -13
jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/local/LocalFile.java
Index: LocalFile.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/local/LocalFile.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LocalFile.java 6 Feb 2002 13:33:42 -0000 1.2
+++ LocalFile.java 9 Feb 2002 02:51:50 -0000 1.3
@@ -25,10 +25,12 @@
*
* @author Adam Murdoch
*/
-final class LocalFile extends AbstractFileObject implements FileObject
+final class LocalFile
+ extends AbstractFileObject
+ implements FileObject
{
- private static final Resources REZ
- = ResourceManager.getPackageResources( LocalFile.class );
+ private final static Resources REZ =
+ ResourceManager.getPackageResources( LocalFile.class );
private File m_file;
private String m_fileName;
@@ -36,16 +38,19 @@
/**
* Creates a non-root file.
*/
- public LocalFile( LocalFileSystem fs, String fileName, FileName name )
+ public LocalFile( final LocalFileSystem fileSystem,
+ final String fileName,
+ final FileName name )
{
- super( name, fs );
+ super( name, fileSystem );
m_fileName = fileName;
}
/**
* Attaches this file object to its file resource.
*/
- protected void doAttach() throws Exception
+ protected void doAttach()
+ throws Exception
{
if( m_file == null )
{
@@ -56,7 +61,8 @@
/**
* Returns the file's type.
*/
- protected FileType doGetType() throws Exception
+ protected FileType doGetType()
+ throws Exception
{
if( !m_file.exists() )
{
@@ -78,7 +84,8 @@
/**
* Returns the children of the file.
*/
- protected String[] doListChildren() throws Exception
+ protected String[] doListChildren()
+ throws Exception
{
return m_file.list();
}
@@ -86,7 +93,8 @@
/**
* Deletes this file, and all children.
*/
- public void doDelete() throws Exception
+ public void doDelete()
+ throws Exception
{
if( !m_file.delete() )
{
@@ -98,7 +106,8 @@
/**
* Creates this folder.
*/
- protected void doCreateFolder() throws Exception
+ protected void doCreateFolder()
+ throws Exception
{
if( !m_file.mkdir() )
{
@@ -110,7 +119,8 @@
/**
* Creates an input stream to read the content from.
*/
- protected InputStream doGetInputStream() throws Exception
+ protected InputStream doGetInputStream()
+ throws Exception
{
return new FileInputStream( m_file );
}
@@ -118,7 +128,8 @@
/**
* Creates an output stream to write the file content to.
*/
- protected OutputStream doGetOutputStream() throws Exception
+ protected OutputStream doGetOutputStream()
+ throws Exception
{
return new FileOutputStream( m_file );
}
@@ -126,7 +137,8 @@
/**
* Returns the size of the file content (in bytes).
*/
- protected long doGetContentSize() throws Exception
+ protected long doGetContentSize()
+ throws Exception
{
return m_file.length();
}
1.3 +17 -14
jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/local/LocalFileNameParser.java
Index: LocalFileNameParser.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/local/LocalFileNameParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LocalFileNameParser.java 6 Feb 2002 13:33:42 -0000 1.2
+++ LocalFileNameParser.java 9 Feb 2002 02:51:50 -0000 1.3
@@ -19,10 +19,11 @@
*
* @author Adam Murdoch
*/
-class LocalFileNameParser extends UriParser
+class LocalFileNameParser
+ extends UriParser
{
- private static final Resources REZ
- = ResourceManager.getPackageResources( LocalFileNameParser.class );
+ private final static Resources REZ =
+ ResourceManager.getPackageResources( LocalFileNameParser.class );
private boolean m_windowsNames;
@@ -35,7 +36,7 @@
/**
* Determines if a name is an absolute file name.
*/
- public boolean isAbsoluteName( String name )
+ public boolean isAbsoluteName( final String name )
{
// TODO - this is yucky
StringBuffer b = new StringBuffer( name );
@@ -54,10 +55,10 @@
/**
* Parses an absolute URI, splitting it into its components.
*
- * @param name
- * The URI.
+ * @param uriStr The URI.
*/
- public ParsedUri parseUri( String uriStr ) throws FileSystemException
+ public ParsedUri parseUri( final String uriStr )
+ throws FileSystemException
{
StringBuffer name = new StringBuffer();
ParsedFileUri uri = new ParsedFileUri();
@@ -90,8 +91,8 @@
/**
* Pops the root prefix off a URI, which has had the scheme removed.
*/
- private String extractRootPrefix( String uri,
- StringBuffer name )
+ private String extractRootPrefix( final String uri,
+ final StringBuffer name )
throws FileSystemException
{
// TODO - split this into sub-classes
@@ -116,8 +117,8 @@
/**
* Extracts a Windows root prefix from a name.
*/
- private String extractWindowsRootPrefix( String uri,
- StringBuffer name )
+ private String extractWindowsRootPrefix( final String uri,
+ final StringBuffer name )
throws FileSystemException
{
// Looking for:
@@ -158,7 +159,8 @@
/**
* Extracts a drive prefix from a path. Leading '/' chars have been
removed.
*/
- private String extractDrivePrefix( StringBuffer name ) throws
FileSystemException
+ private String extractDrivePrefix( final StringBuffer name )
+ throws FileSystemException
{
// Looking for <letter> ':' '/'
if( name.length() < 3 )
@@ -191,8 +193,9 @@
/**
* Extracts a UNC name from a path. Leading '/' chars have been removed.
*/
- private String extractUNCPrefix( String uri,
- StringBuffer name ) throws
FileSystemException
+ private String extractUNCPrefix( final String uri,
+ final StringBuffer name )
+ throws FileSystemException
{
// Looking for <name> '/' <name> ( '/' | <end> )
1.3 +4 -3
jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/smb/SmbFileNameParser.java
Index: SmbFileNameParser.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/smb/SmbFileNameParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SmbFileNameParser.java 6 Feb 2002 13:33:42 -0000 1.2
+++ SmbFileNameParser.java 9 Feb 2002 02:51:50 -0000 1.3
@@ -18,10 +18,11 @@
*
* @author Adam Murdoch
*/
-public class SmbFileNameParser extends UriParser
+public class SmbFileNameParser
+ extends UriParser
{
- private static final Resources REZ
- = ResourceManager.getPackageResources( SmbFileNameParser.class );
+ private final static Resources REZ =
+ ResourceManager.getPackageResources( SmbFileNameParser.class );
/**
* Parses an absolute URI, splitting it into its components.
1.2 +9 -5
jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/smb/SmbFileObject.java
Index: SmbFileObject.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/smb/SmbFileObject.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SmbFileObject.java 2 Feb 2002 03:29:08 -0000 1.1
+++ SmbFileObject.java 9 Feb 2002 02:51:50 -0000 1.2
@@ -25,17 +25,21 @@
*
* @author Adam Murdoch
*/
-public class SmbFileObject extends AbstractFileObject implements FileObject
+public class SmbFileObject
+ extends AbstractFileObject
+ implements FileObject
{
- private static final Resources REZ
- = ResourceManager.getPackageResources( SmbFileObject.class );
+ private final static Resources REZ =
+ ResourceManager.getPackageResources( SmbFileObject.class );
private String m_fileName;
private SmbFile m_file;
- protected SmbFileObject( String fileName, FileName name, SmbFileSystem
fs )
+ protected SmbFileObject( final String fileName,
+ final FileName name,
+ final SmbFileSystem fileSystem )
{
- super( name, fs );
+ super( name, fileSystem );
m_fileName = fileName;
}
1.3 +2 -2
jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/zip/ZipFileSystem.java
Index: ZipFileSystem.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/zip/ZipFileSystem.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ZipFileSystem.java 6 Feb 2002 13:33:42 -0000 1.2
+++ ZipFileSystem.java 9 Feb 2002 02:51:50 -0000 1.3
@@ -28,8 +28,8 @@
*/
public class ZipFileSystem extends AbstractFileSystem implements FileSystem
{
- private static final Resources REZ
- = ResourceManager.getPackageResources( ZipFileSystem.class );
+ private final static Resources REZ =
+ ResourceManager.getPackageResources( ZipFileSystem.class );
private File m_file;
private ZipFile m_zipFile;
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>