jkf 2005/05/22 09:10:53 Modified: src/main/org/apache/tools/ant/types Resource.java src/main/org/apache/tools/bzip2 CBZip2InputStream.java Log: Avoiding use of Error for clauses that indicat programming errors, using runtime exceptions instead. Revision Changes Path 1.12 +3 -2 ant/src/main/org/apache/tools/ant/types/Resource.java Index: Resource.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Resource.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Resource.java 21 Jan 2005 22:15:46 -0000 1.11 +++ Resource.java 22 May 2005 16:10:53 -0000 1.12 @@ -201,8 +201,9 @@ try { return super.clone(); } catch (CloneNotSupportedException e) { - throw new Error("CloneNotSupportedException for a " - + "Clonable Resource caught?"); + throw new UnsupportedOperationException( + "CloneNotSupportedException for a Resource caught. "+ + "Derived classes must support cloning."); } } 1.23 +4 -4 ant/src/main/org/apache/tools/bzip2/CBZip2InputStream.java Index: CBZip2InputStream.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/bzip2/CBZip2InputStream.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- CBZip2InputStream.java 26 Apr 2005 11:54:15 -0000 1.22 +++ CBZip2InputStream.java 22 May 2005 16:10:53 -0000 1.23 @@ -190,10 +190,10 @@ return -1; case START_BLOCK_STATE: - throw new Error(); + throw new IllegalStateException(); case RAND_PART_A_STATE: - throw new Error(); + throw new IllegalStateException(); case RAND_PART_B_STATE: setupRandPartB(); @@ -204,7 +204,7 @@ break; case NO_RAND_PART_A_STATE: - throw new Error(); + throw new IllegalStateException(); case NO_RAND_PART_B_STATE: setupNoRandPartB(); @@ -215,7 +215,7 @@ break; default: - throw new Error(); + throw new IllegalStateException(); } return retChar;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]