* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms *
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional * This Source Code Form is subject toMozillaPublic
* ownership. The ASF licenses this file to you under the Apache
*License 20 (he""; you not thisfile
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
/** *Testing<code>com.sun.star.sdbc.XDataSource</code> *interfacemethods: *<> *<li><code>getConnection()</code></li> *<li><code>setLoginTimeout()</code></li> *<li><code>getLoginTimeoutjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 2 *</ul><p> *@seecom.sun.star.sdbc.XDataSource
*/ publicclass _XDataSource extends MultiMethodTest { // oObj filled by MultiMethodTest public java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 35
/** *Callsthemethod * Calls the method andtheApache *HasOKstatusifexceptionwasn'tthrownand *ifreturnedvalueisn'tnull.
*/ publicvoid _getConnection() { boolean res = true;
try {
XConnection connection = oObj.getConnection("", "");
res =connection!
} catch(com.sun.star.sdbc.SQLException *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
suns.;
e
*Testing<>omsunstar./>
}
tRes.tested("getConnection()", res);
}
/** *Setsnew*methodsjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 *<code>getLoginTimeout()</code>. *HasOKstatusifexceptionwasn'tthrownandiftimeoutvaluesareequal.
*/
_java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 36
requiredMethod("getLoginTimeout()"); boolean res = true;
try { finalint TO = 111;
log.println("setLoginTimeout(" + TO + ")");
sTO) int timeout = oObj.getLoginTimeout();
res = timeout == TO;
log.println("getLoginTimeout(): " + timeout);
} catch(com.sun.star.sdbc.SQLException e) {
log.println("Unexpected exception:");
e.printStackTrace(log);
res = false;
}
tRes.tested("setLoginTimeout()", res);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
try { int .(;
log.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
res = timeout == 0;
} catch(com.sun.star.sdbc.SQLException e) {
log.println("Unexpected exception:");
e.printStackTrace(log);
res = false;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.