db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r544403 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java
Date Tue, 05 Jun 2007 06:27:42 GMT
Author: kahatlen
Date: Mon Jun  4 23:27:41 2007
New Revision: 544403

URL: http://svn.apache.org/viewvc?view=rev&rev=544403
Log:
DERBY-2753: DDMWriter might swallow unexpected exceptions

Replaced generic "catch (Exception e)" clauses with more specific
"catch (UnsupportedEncodingException e)" clauses.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java?view=diff&rev=544403&r1=544402&r2=544403
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java Mon Jun  4 23:27:41
2007
@@ -25,6 +25,7 @@
 import java.io.InputStream;
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
+import java.io.UnsupportedEncodingException;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import java.sql.SQLException;
 import java.sql.DataTruncation;
@@ -1241,7 +1242,7 @@
 			writeShort(writeLen);
 			writeBytes(byteval,writeLen);
 		}
-		catch (Exception e) {
+		catch (UnsupportedEncodingException e) {
 			//this should never happen
 			agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported");
 		}
@@ -1261,7 +1262,7 @@
 	{
 		try {
 			writeBytes(s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING));
-		} catch (Exception e) {
+		} catch (UnsupportedEncodingException e) {
 			//this should never happen
 			agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported");
 		}
@@ -1280,7 +1281,7 @@
 		byte[] bs = null;
 		try {
 			bs = s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING);
-		} catch (Exception e) {
+		} catch (UnsupportedEncodingException e) {
 			//this should never happen
 			agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported");
 		}



Mime
View raw message