java-avalon-logkit-default-datasource.patch
1 | This patch is taken from gentoo (https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-java/avalon-logkit/files/avalon-logkit-2.1-java7.patch). |
2 | |
3 | It adds missing implementations of abstract methods. |
4 | |
5 | diff -Nur avalon-logkit-2.1/src/java/org/apache/log/output/db/DefaultDataSource.java avalon-logkit-2.1_patched//src/java/org/apache/log/output/db/DefaultDataSource.java |
6 | --- avalon-logkit-2.1/src/java/org/apache/log/output/db/DefaultDataSource.java 2005-08-30 05:03:49.000000000 +0300 |
7 | +++ avalon-logkit-2.1_patched//src/java/org/apache/log/output/db/DefaultDataSource.java 2011-09-27 08:27:49.313005212 +0300 |
8 | @@ -20,7 +20,9 @@ |
9 | import java.sql.Connection; |
10 | import java.sql.DriverManager; |
11 | import java.sql.SQLException; |
12 | +import java.sql.SQLFeatureNotSupportedException; |
13 | import javax.sql.DataSource; |
14 | +import java.util.logging.Logger; |
15 | |
16 | /** |
17 | * A basic datasource that doesn't do any pooling but just wraps |
18 | @@ -111,4 +113,16 @@ |
19 | { |
20 | m_logWriter = logWriter; |
21 | } |
22 | + |
23 | + public boolean isWrapperFor(Class cls) { |
24 | + return false; |
25 | + } |
26 | + |
27 | + public Object unwrap(Class cls) throws SQLException { |
28 | + throw new SQLException("Not a wrapper for " + cls); |
29 | + } |
30 | + |
31 | + public Logger getParentLogger() throws SQLFeatureNotSupportedException { |
32 | + throw new SQLFeatureNotSupportedException("Not a supported feature"); |
33 | + } |
34 | } |
35 | |
36 |