Skip to content

Commit 9150911

Browse files
author
Niall Pemberton
committed
IO-140 annotate with @OverRide and @deprecated
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@659817 13f79535-47bb-0310-9956-ffa450edef68
1 parent 70fc2a9 commit 9150911

53 files changed

Lines changed: 185 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/java/org/apache/commons/io/CopyUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
* Null handling behaviour changed in IOUtils (null data does not
112112
* throw NullPointerException).
113113
*/
114+
@Deprecated
114115
public class CopyUtils {
115116

116117
/**

src/java/org/apache/commons/io/FileCleaner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
* @version $Id$
3838
* @deprecated Use {@link FileCleaningTracker}
3939
*/
40+
@Deprecated
4041
public class FileCleaner {
4142
/**
4243
* The instance to use for the deprecated, static methods.

src/java/org/apache/commons/io/FileDeleteStrategy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ protected boolean doDelete(File fileToDelete) throws IOException {
122122
*
123123
* @return a string describing the delete strategy
124124
*/
125+
@Override
125126
public String toString() {
126127
return "FileDeleteStrategy[" + name + "]";
127128
}

src/java/org/apache/commons/io/FileSystemUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ public FileSystemUtils() {
141141
* @deprecated Use freeSpaceKb(String)
142142
* Deprecated from 1.3, may be removed in 2.0
143143
*/
144+
@Deprecated
144145
public static long freeSpace(String path) throws IOException {
145146
return INSTANCE.freeSpaceOS(path, OS, false);
146147
}

src/java/org/apache/commons/io/IOCase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ String convertCase(String str) {
231231
*
232232
* @return a string describing the sensitivity
233233
*/
234+
@Override
234235
public String toString() {
235236
return name;
236237
}

src/java/org/apache/commons/io/IOUtils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ public static byte[] toByteArray(Reader input, String encoding)
292292
* @throws IOException if an I/O error occurs (never occurs)
293293
* @deprecated Use {@link String#getBytes()}
294294
*/
295+
@Deprecated
295296
public static byte[] toByteArray(String input) throws IOException {
296297
return input.getBytes();
297298
}
@@ -429,6 +430,7 @@ public static String toString(Reader input) throws IOException {
429430
* @throws IOException if an I/O error occurs (never occurs)
430431
* @deprecated Use {@link String#String(byte[])}
431432
*/
433+
@Deprecated
432434
public static String toString(byte[] input) throws IOException {
433435
return new String(input);
434436
}
@@ -447,6 +449,7 @@ public static String toString(byte[] input) throws IOException {
447449
* @throws IOException if an I/O error occurs (never occurs)
448450
* @deprecated Use {@link String#String(byte[],String)}
449451
*/
452+
@Deprecated
450453
public static String toString(byte[] input, String encoding)
451454
throws IOException {
452455
if (encoding == null) {
@@ -933,6 +936,7 @@ public static void write(String data, OutputStream output, String encoding)
933936
* @since Commons IO 1.1
934937
* @deprecated replaced by write(CharSequence, Writer)
935938
*/
939+
@Deprecated
936940
public static void write(StringBuffer data, Writer output)
937941
throws IOException {
938942
if (data != null) {
@@ -954,6 +958,7 @@ public static void write(StringBuffer data, Writer output)
954958
* @since Commons IO 1.1
955959
* @deprecated replaced by write(CharSequence, OutputStream)
956960
*/
961+
@Deprecated
957962
public static void write(StringBuffer data, OutputStream output)
958963
throws IOException {
959964
if (data != null) {
@@ -978,6 +983,7 @@ public static void write(StringBuffer data, OutputStream output)
978983
* @since Commons IO 1.1
979984
* @deprecated replaced by write(CharSequence, OutputStream, String)
980985
*/
986+
@Deprecated
981987
public static void write(StringBuffer data, OutputStream output,
982988
String encoding) throws IOException {
983989
if (data != null) {

src/java/org/apache/commons/io/filefilter/AbstractFileFilter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public boolean accept(File dir, String name) {
5858
*
5959
* @return a String representaion
6060
*/
61+
@Override
6162
public String toString() {
6263
String name = getClass().getName();
6364
int period = name.lastIndexOf('.');

src/java/org/apache/commons/io/filefilter/AgeFileFilter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public AgeFileFilter(File cutoffReference, boolean acceptOlder) {
133133
* @param file the File to check
134134
* @return true if the filename matches
135135
*/
136+
@Override
136137
public boolean accept(File file) {
137138
boolean newer = FileUtils.isFileNewer(file, cutoff);
138139
return acceptOlder ? !newer : newer;
@@ -143,6 +144,7 @@ public boolean accept(File file) {
143144
*
144145
* @return a String representaion
145146
*/
147+
@Override
146148
public String toString() {
147149
String condition = acceptOlder ? "<=" : ">";
148150
return super.toString() + "(" + condition + cutoff + ")";

src/java/org/apache/commons/io/filefilter/AndFileFilter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public boolean accept(final File file) {
127127
/**
128128
* {@inheritDoc}
129129
*/
130+
@Override
130131
public boolean accept(final File file, final String name) {
131132
if (this.fileFilters.size() == 0) {
132133
return false;
@@ -144,6 +145,7 @@ public boolean accept(final File file, final String name) {
144145
*
145146
* @return a String representaion
146147
*/
148+
@Override
147149
public String toString() {
148150
StringBuilder buffer = new StringBuilder();
149151
buffer.append(super.toString());

src/java/org/apache/commons/io/filefilter/CanReadFileFilter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ protected CanReadFileFilter() {
8585
* @return <code>true</code> if the file can be
8686
* read, otherwise <code>false</code>.
8787
*/
88+
@Override
8889
public boolean accept(File file) {
8990
return file.canRead();
9091
}

0 commit comments

Comments
 (0)