@@ -193,8 +193,8 @@ public void setReadOnly( boolean readOnly ) throws SQLException {
193
193
*/
194
194
@ Override
195
195
public boolean isReadOnly () throws SQLException {
196
- ExcelDriver . throwExceptionAboutUnsupportedOperation ();
197
- return false ;
196
+ throwIfAlreadyClosed ();
197
+ return true ;
198
198
}
199
199
200
200
/**
@@ -226,16 +226,16 @@ public void setTransactionIsolation( int level ) throws SQLException {
226
226
*/
227
227
@ Override
228
228
public int getTransactionIsolation () throws SQLException {
229
- ExcelDriver . throwExceptionAboutUnsupportedOperation ();
230
- return 0 ;
229
+ throwIfAlreadyClosed ();
230
+ return Connection . TRANSACTION_NONE ;
231
231
}
232
232
233
233
/**
234
234
* {@inheritDoc}
235
235
*/
236
236
@ Override
237
237
public SQLWarning getWarnings () throws SQLException {
238
- ExcelDriver . throwExceptionAboutUnsupportedOperation ();
238
+ throwIfAlreadyClosed ();
239
239
return null ;
240
240
}
241
241
@@ -244,7 +244,8 @@ public SQLWarning getWarnings() throws SQLException {
244
244
*/
245
245
@ Override
246
246
public void clearWarnings () throws SQLException {
247
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
247
+ throwIfAlreadyClosed ();
248
+ // nothing to do
248
249
}
249
250
250
251
/**
@@ -437,8 +438,7 @@ public SQLXML createSQLXML() throws SQLException {
437
438
*/
438
439
@ Override
439
440
public boolean isValid ( int timeout ) throws SQLException {
440
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
441
- return false ;
441
+ return !isClosed ();
442
442
}
443
443
444
444
/**
@@ -506,6 +506,7 @@ public void setSchema( String schema ) throws SQLException {
506
506
*/
507
507
@ Override
508
508
public String getSchema () throws SQLException {
509
+ throwIfAlreadyClosed ();
509
510
return null ;
510
511
}
511
512
@@ -530,7 +531,7 @@ public void setNetworkTimeout( Executor executor, int milliseconds ) throws SQLE
530
531
*/
531
532
@ Override
532
533
public int getNetworkTimeout () throws SQLException {
533
- ExcelDriver . throwExceptionAboutUnsupportedOperation ();
534
+ throwIfAlreadyClosed ();
534
535
return 0 ;
535
536
}
536
537
0 commit comments