From 8aff097ca3750f2b84e2ca793a84846730022e33 Mon Sep 17 00:00:00 2001 From: wenshao Date: Sat, 2 Aug 2014 02:36:16 +0800 Subject: [PATCH] change log.error to log.debug --- .../com/alibaba/druid/util/JdbcUtils.java | 53 ++++++++++--------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/alibaba/druid/util/JdbcUtils.java b/src/main/java/com/alibaba/druid/util/JdbcUtils.java index 71afa830f3..7304547ddd 100644 --- a/src/main/java/com/alibaba/druid/util/JdbcUtils.java +++ b/src/main/java/com/alibaba/druid/util/JdbcUtils.java @@ -77,42 +77,47 @@ public final class JdbcUtils implements JdbcConstants { } public final static void close(Connection x) { - if (x != null) { - try { - x.close(); - } catch (Exception e) { - LOG.error("close connection error", e); - } + if (x == null) { + return; + } + try { + x.close(); + } catch (Exception e) { + LOG.debug("close connection error", e); } } public final static void close(Statement x) { - if (x != null) { - try { - x.close(); - } catch (Exception e) { - LOG.error("close statement error", e); - } + if (x == null) { + return; + } + try { + x.close(); + } catch (Exception e) { + LOG.debug("close statement error", e); } } public final static void close(ResultSet x) { - if (x != null) { - try { - x.close(); - } catch (Exception e) { - LOG.error("close resultset error", e); - } + if (x == null) { + return; + } + try { + x.close(); + } catch (Exception e) { + LOG.debug("close resultset error", e); } } public final static void close(Closeable x) { - if (x != null) { - try { - x.close(); - } catch (Exception e) { - LOG.error("close error", e); - } + if (x == null) { + return; + } + + try { + x.close(); + } catch (Exception e) { + LOG.debug("close error", e); } }