Browse Source

Got rid of some audit violations.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271170 13f79535-47bb-0310-9956-ffa450edef68
master
adammurdoch 23 years ago
parent
commit
2b0c8d45ef
4 changed files with 4 additions and 13 deletions
  1. +0
    -3
      proposal/myrmidon/src/java/org/apache/aut/vfs/FileContent.java
  2. +0
    -2
      proposal/myrmidon/src/java/org/apache/aut/vfs/FileSystemException.java
  3. +1
    -0
      proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileObject.java
  4. +3
    -8
      proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileContent.java

+ 0
- 3
proposal/myrmidon/src/java/org/apache/aut/vfs/FileContent.java View File

@@ -9,9 +9,6 @@ package org.apache.aut.vfs;

import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.sql.Date;

/**
* This interface is used to access the data content of a file.


+ 0
- 2
proposal/myrmidon/src/java/org/apache/aut/vfs/FileSystemException.java View File

@@ -16,8 +16,6 @@ import org.apache.avalon.framework.CascadingException;
*/
public class FileSystemException extends CascadingException
{
private Throwable m_cause;

/**
* Constructs exception with the specified detail message.
*


+ 1
- 0
proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileObject.java View File

@@ -534,6 +534,7 @@ public abstract class AbstractFileObject implements FileObject
if( m_type == FileType.FOLDER )
{
final String message = REZ.getString( "write-folder.error", m_name );
throw new FileSystemException( message );
}

if( m_type == null )


+ 3
- 8
proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileContent.java View File

@@ -11,17 +11,12 @@ import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.sql.Date;
import org.apache.aut.vfs.FileContent;
import org.apache.aut.vfs.FileObject;
import org.apache.aut.vfs.FileSystemException;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;

/**
* The content of a file.
@@ -275,7 +270,7 @@ public class DefaultFileContent implements FileContent
/**
* Reads bytes from this input stream.error occurs.
*/
public int read( byte b[], int off, int len )
public int read( byte[] buffer, int offset, int length )
throws IOException
{
if( _finished )
@@ -283,7 +278,7 @@ public class DefaultFileContent implements FileContent
return -1;
}

int nread = super.read( b, off, len );
int nread = super.read( buffer, offset, length );
if( nread != -1 )
{
return nread;


Loading…
Cancel
Save