[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [dtp-dev] bug#149611 - Database Version is not flexible ...
|
Bugged .. See 150590. <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150590>
Regards
Anthos
rcernich@xxxxxxxxxx wrote:
Hey Anthos,
Could you create a bugzilla entry for this. One of the things we will be
focusing on for the next release of connectivity is its public API.
Thanks for the feedback,
Rob
I like to comment on the current impl of JDBCConnection class.
The JDBCConnection class's constructor is as below
public JDBCConnection(IConnectionProfile profile, Class
factoryClass) {
super(profile, factoryClass);
open();
}
If I have a subclass as below
class OracleJDBCConnection extends JDBCConnection{
String providerName = null;
public OracleJDBCConnection(){
super();
providerName = "Oracle Database";
}
@Override
public String getProviderName(){
return providerName;
}
}
The super() flows into open() in superclass which calls
getProviderName() along the line; but the subclass havenot populated
providerName value yet, which results a NPE. This results the label
provider to fail in the contentNavigator context.
The call stack copied from Eclipse is as below
OracleJDBCConnection.getProviderName() line: 50
OracleJDBCConnection(VersionProviderConnection).
updateServerVersion(Properties)
line: 174
OracleJDBCConnection(VersionProviderConnection).updateVersionCache()
line: 86
OracleJDBCConnection(DriverConnectionBase).internalCreateConnection()
line: 112
OracleJDBCConnection(DriverConnectionBase).open() line: 53
OracleJDBCConnection(JDBCConnection).<init>(IConnectionProfile, Class)
line: 48
OracleJDBCConnection.<init>(IConnectionProfile, Class) line: 20
OracleJDBCConnectionFactory.createConnection(IConnectionProfile) line:
15
ConnectionFactoryProvider.createConnection(IConnectionProfile, String,
String) line: 85
ConnectionFactoryProvider.createConnection(IConnectionProfile) line: 69
ConnectionProfile.createConnection(String) line: 304
ConnectionInfoImpl.<init>(IConnectionProfile, Class) line: 622
SQMConnectionFactory(ConnectionFactory).createConnection(IConnectionProfile)
line: 36
SQMConnectionFactory.createConnection(IConnectionProfile) line: 45
ConnectionFactoryAdapterProvider.createConnection(IConnectionProfile)
line: 79
CreateConnectionJob.run(IProgressMonitor) line: 55
Worker.run() line: 58
So my suggestion is to move out the open() from JDBCConnection(..).
Regards
Anthos
_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev