Changeset 30397

Show
Ignore:
Timestamp:
02/21/08 13:06:43 (9 months ago)
Author:
ogrisel
Message:

NXP-2052: Nuxeo branch 5.1 does not compile with jdk 1.6: added empty implementations for the missing unused method of the Wrapper interface that are not used in Nuxeo (according to eclipse call hierarchy)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-directory-sql/src/main/java/org/nuxeo/ecm/directory/sql/SimpleDataSource.java

    r19199 r30397  
    2727import javax.sql.DataSource; 
    2828 
    29  
    3029/** 
     30 * TODO: OG: please someone explain here the goal of this empty implementation 
     31 * of the DataSource interface. According to the Call hierarchy it is only 
     32 * needed for the getConnection() method. 
     33 * 
     34 * TODO: OG: maybe methods with empty implementation should raise SQLException 
     35 * wrapping UnexpectedOperationException instead. 
     36 * 
    3137 * @author <a href="mailto:glefter@nuxeo.com">George Lefter</a> 
    3238 * 
     
    3541 
    3642    private final String url; 
     43 
    3744    private final String user; 
     45 
    3846    private final String password; 
    3947 
    40     public SimpleDataSource(String url, String driver, String user, String password) { 
     48    public SimpleDataSource(String url, String driver, String user, 
     49            String password) { 
    4150        try { 
    4251            Class.forName(driver); 
     
    5766    public Connection getConnection(String username, String password) 
    5867            throws SQLException { 
    59         // TODO Auto-generated method stub 
    6068        return getConnection(); 
    6169    } 
    6270 
    6371    public PrintWriter getLogWriter() throws SQLException { 
    64         // TODO Auto-generated method stub 
     72        // not used by Nuxeo SQLDirectory API 
    6573        return null; 
    6674    } 
    6775 
    6876    public int getLoginTimeout() throws SQLException { 
    69         // TODO Auto-generated method stub 
     77        // not used by Nuxeo SQLDirectory API 
    7078        return 0; 
    7179    } 
    7280 
    7381    public void setLogWriter(PrintWriter out) throws SQLException { 
    74         // TODO Auto-generated method stub 
     82        // not used by Nuxeo SQLDirectory API 
    7583    } 
    7684 
    7785    public void setLoginTimeout(int seconds) throws SQLException { 
    78         // TODO Auto-generated method stub 
     86        // not used by Nuxeo SQLDirectory API 
     87    } 
     88 
     89    public boolean isWrapperFor(Class<?> iface) throws SQLException { 
     90        // not used by Nuxeo SQLDirectory API 
     91        return false; 
     92    } 
     93 
     94    public <T> T unwrap(Class<T> iface) throws SQLException { 
     95        // not used by Nuxeo SQLDirectory API 
     96        return null; 
    7997    } 
    8098