Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B7A9F697 for ; Fri, 31 May 2013 09:13:21 +0000 (UTC) Received: (qmail 7705 invoked by uid 500); 31 May 2013 09:13:21 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 7684 invoked by uid 500); 31 May 2013 09:13:21 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 7535 invoked by uid 99); 31 May 2013 09:13:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 May 2013 09:13:20 +0000 Date: Fri, 31 May 2013 09:13:20 +0000 (UTC) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6231) Remove unnecessary checks for UnsupportedEncodingException in the client MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13671277#comment-13671277 ] Dag H. Wanvik commented on DERBY-6231: -------------------------------------- Thanks! Looks like a good clean-up to me. I admit I didn't check all the changed lines in detail, but the approach gets my +1 :) > Remove unnecessary checks for UnsupportedEncodingException in the client > ------------------------------------------------------------------------ > > Key: DERBY-6231 > URL: https://issues.apache.org/jira/browse/DERBY-6231 > Project: Derby > Issue Type: Improvement > Components: Network Client > Affects Versions: 10.11.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Fix For: 10.11.0.0 > > Attachments: derby-6231-01-a.diff > > > Many methods in the client need handling of UnsupportedEncodingException, typically because they call String methods that take the name of the encoding as argument. Most of these methods have overloads that take a Charset instead of a String to describe the encoding, and those methods don't throw UnsupportedEncodingException as the encoding is known to be supported once we have a Charset instance for it. We should use the methods that take a Charset and simplify the exception handling. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira