Hi Damjan, I just built the latest SVN for Windows and saw a warning:
--- javadoc: Generating Javadoc Javadoc execution Loading source files for package com.sun.star.comp.sdbc... Constructing Javadoc information... Creating destination directory: "C:\Source\aoo\main\connectivity\wntmsci12.pro\doc\sdbc_jdbc\javadoc\" Standard Doclet version 1.8.0_172 Building tree for all the packages and classes... C:\Source\aoo\main\connectivity\java\sdbc_jdbc\src\com\sun\star\comp\sdbc\JavaSQLConnection.java:542: warning: no @return public ConnectionLog getLogger() { ^ Building index for all the packages and classes... Building index for all classes... Generating C:\Source\aoo\main\connectivity\wntmsci12.pro\doc\sdbc_jdbc\javadoc\help-doc.html... 1 warning --- I don't know if this is really important... ;-) Regards, Matthias Am 05.05.2018 um 05:59 schrieb dam...@apache.org: > Author: damjan > Date: Sat May 5 03:59:10 2018 > New Revision: 1830949 > > URL: http://svn.apache.org/viewvc?rev=1830949&view=rev > Log: > Move the PropertyValue helper methods to the tools class for now. > > Some "@Override" and "final" cleanups as per NetBeans. > > Patch by: me > > > Modified: > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/BoundedInputStream.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ClassMap.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ContextClassLoaderScope.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JDBCDriver.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLArray.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLBlob.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLCallableStatement.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLClob.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLConnection.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLDatabaseMetaData.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLPreparedStatement.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLRef.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLResultSetMetaData.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatement.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatementBase.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ReaderInputStream.java > > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/Tools.java > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/BoundedInputStream.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/BoundedInputStream.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/BoundedInputStream.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/BoundedInputStream.java > Sat May 5 03:59:10 2018 > @@ -24,7 +24,7 @@ import java.io.IOException; > import java.io.InputStream; > > public class BoundedInputStream extends InputStream { > - private InputStream is; > + private final InputStream is; > private long remaining; > > public BoundedInputStream(InputStream is, long max) { > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ClassMap.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ClassMap.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ClassMap.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ClassMap.java > Sat May 5 03:59:10 2018 > @@ -59,8 +59,8 @@ import com.sun.star.util.XMacroExpander; > */ > public class ClassMap { > public static class ClassLoaderAndClass { > - private ClassLoader classLoader; > - private Class<?> classObject; > + private final ClassLoader classLoader; > + private final Class<?> classObject; > > public ClassLoaderAndClass(ClassLoader classLoader, Class<?> > classObject) { > this.classLoader = classLoader; > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ContextClassLoaderScope.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ContextClassLoaderScope.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ContextClassLoaderScope.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ContextClassLoaderScope.java > Sat May 5 03:59:10 2018 > @@ -21,8 +21,8 @@ > package com.sun.star.comp.sdbc; > > public class ContextClassLoaderScope implements AutoCloseable { > - private Thread currentThread; > - private ClassLoader oldClassLoader; > + private final Thread currentThread; > + private final ClassLoader oldClassLoader; > > public ContextClassLoaderScope(ClassLoader classLoader) { > currentThread = Thread.currentThread(); > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JDBCDriver.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JDBCDriver.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JDBCDriver.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JDBCDriver.java > Sat May 5 03:59:10 2018 > @@ -44,7 +44,7 @@ public class JDBCDriver extends Componen > "com.sun.star.sdbc.Driver" > }; > private XComponentContext context; > - private ResourceBasedEventLogger logger; > + private final ResourceBasedEventLogger logger; > > public static XSingleComponentFactory __getComponentFactory(String > implName) { > XSingleComponentFactory xSingleComponentFactory = null; > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLArray.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLArray.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLArray.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLArray.java > Sat May 5 03:59:10 2018 > @@ -34,8 +34,8 @@ import com.sun.star.sdbc.XResultSet; > import com.sun.star.uno.Any; > > public class JavaSQLArray extends ComponentBase implements XArray { > - private ResourceBasedEventLogger logger; > - private java.sql.Array jdbcArray; > + private final ResourceBasedEventLogger logger; > + private final java.sql.Array jdbcArray; > > public JavaSQLArray(ResourceBasedEventLogger logger, java.sql.Array > jdcbArray) { > this.logger = logger; > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLBlob.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLBlob.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLBlob.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLBlob.java > Sat May 5 03:59:10 2018 > @@ -36,8 +36,8 @@ import com.sun.star.sdbc.XBlob; > import com.sun.star.uno.Any; > > public class JavaSQLBlob extends ComponentBase implements XBlob { > - private ResourceBasedEventLogger logger; > - private java.sql.Blob jdbcBlob; > + private final ResourceBasedEventLogger logger; > + private final java.sql.Blob jdbcBlob; > > public JavaSQLBlob(ResourceBasedEventLogger logger, java.sql.Blob > jdbcBlob) { > this.logger = logger; > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLCallableStatement.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLCallableStatement.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLCallableStatement.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLCallableStatement.java > Sat May 5 03:59:10 2018 > @@ -62,7 +62,8 @@ public class JavaSQLCallableStatement ex > } > > // XRow > - > + > + @Override > public synchronized XInputStream getBinaryStream(int columnIndex) throws > SQLException { > createStatement(); > XBlob blob = getBlob(columnIndex); > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLClob.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLClob.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLClob.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLClob.java > Sat May 5 03:59:10 2018 > @@ -36,8 +36,8 @@ import com.sun.star.sdbc.XClob; > import com.sun.star.uno.Any; > > public class JavaSQLClob extends ComponentBase implements XClob { > - private ResourceBasedEventLogger logger; > - private java.sql.Clob jdbcClob; > + private final ResourceBasedEventLogger logger; > + private final java.sql.Clob jdbcClob; > > public JavaSQLClob(ResourceBasedEventLogger logger, java.sql.Clob > jdbcClob) { > this.logger = logger; > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLConnection.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLConnection.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLConnection.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLConnection.java > Sat May 5 03:59:10 2018 > @@ -22,7 +22,6 @@ package com.sun.star.comp.sdbc; > > import java.util.Iterator; > import java.util.Properties; > -import java.util.Set; > > import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper; > import org.apache.openoffice.comp.sdbc.dbtools.util.AutoRetrievingBase; > @@ -62,10 +61,10 @@ public class JavaSQLConnection extends C > }; > private static final ClassMap classMap = new ClassMap(); > > - private AutoRetrievingBase autoRetrievingBase = new AutoRetrievingBase(); > + private final AutoRetrievingBase autoRetrievingBase = new > AutoRetrievingBase(); > private String url; > - private JDBCDriver driver; > - private ConnectionLog logger; > + private final JDBCDriver driver; > + private final ConnectionLog logger; > private boolean useParameterSubstitution; > private boolean ignoreDriverPrivileges; > private boolean ignoreCurrency; > @@ -75,7 +74,7 @@ public class JavaSQLConnection extends C > private java.sql.Driver driverObject; > private java.sql.Connection connection; > private PropertyValue[] connectionInfo; > - private WeakMap statements = new WeakMap(); > + private final WeakMap statements = new WeakMap(); > > public JavaSQLConnection(JDBCDriver driver) { > this.driver = driver; > @@ -103,6 +102,7 @@ public class JavaSQLConnection extends C > > // XCloseable > > + @Override > public void close() throws SQLException { > dispose(); > } > @@ -347,54 +347,6 @@ public class JavaSQLConnection extends C > > // others: > > - private static String getOrDefault(PropertyValue[] properties, String > name, String defaultValue) throws IllegalArgumentException { > - String ret = defaultValue; > - for (PropertyValue property : properties) { > - if (property.Name.equals(name)) { > - ret = AnyConverter.toString(property.Value); > - break; > - } > - } > - return ret; > - } > - > - private static boolean getOrDefault(PropertyValue[] properties, String > name, boolean defaultValue) throws IllegalArgumentException { > - boolean ret = defaultValue; > - for (PropertyValue property : properties) { > - if (property.Name.equals(name)) { > - ret = AnyConverter.toBoolean(property.Value); > - break; > - } > - } > - return ret; > - } > - > - private static Object getOrDefault(PropertyValue[] properties, String > name, Object defaultValue) throws IllegalArgumentException { > - Object ret = defaultValue; > - for (PropertyValue property : properties) { > - if (property.Name.equals(name)) { > - ret = property.Value; > - break; > - } > - } > - return ret; > - } > - > - private static NamedValue[] getOrDefault(PropertyValue[] properties, > String name, NamedValue[] defaultValue) throws IllegalArgumentException { > - NamedValue[] ret = defaultValue; > - for (PropertyValue property : properties) { > - if (property.Name.equals(name)) { > - Object[] array = (Object[]) > AnyConverter.toArray(property.Value); > - ret = new NamedValue[array.length]; > - for (int i = 0; i < array.length; i++) { > - ret[i] = (NamedValue) array[i]; > - } > - break; > - } > - } > - return ret; > - } > - > public boolean construct(String url, PropertyValue[] info) throws > SQLException { > this.url = url; > String generatedValueStatement = ""; // contains the statement which > should be used when query for automatically generated values > @@ -404,19 +356,19 @@ public class JavaSQLConnection extends C > NamedValue[] systemProperties = new NamedValue[0]; > > try { > - driverClass = getOrDefault(info, "JavaDriverClass", driverClass); > - driverClassPath = getOrDefault(info, "JavaDriverClassPath", > driverClassPath); > + driverClass = Tools.getOrDefault(info, "JavaDriverClass", > driverClass); > + driverClassPath = Tools.getOrDefault(info, > "JavaDriverClassPath", driverClassPath); > if (driverClassPath.isEmpty()) { > driverClassPath = getJavaDriverClassPath(driverClass); > } > - autoRetrievingEnabled = getOrDefault(info, > "IsAutoRetrievingEnabled", autoRetrievingEnabled); > - generatedValueStatement = getOrDefault(info, > "AutoRetrievingStatement", generatedValueStatement); > - useParameterSubstitution = getOrDefault(info, > "ParameterNameSubstitution", useParameterSubstitution); > - ignoreDriverPrivileges = getOrDefault(info, > "IgnoreDriverPrivileges", ignoreDriverPrivileges); > - ignoreCurrency = getOrDefault(info, "IgnoreCurrency", > ignoreCurrency); > - systemProperties = getOrDefault(info, "SystemProperties", > systemProperties); > - catalogRestriction = getOrDefault(info, > "ImplicitCatalogRestriction", Any.VOID); > - schemaRestriction = getOrDefault(info, > "ImplicitSchemaRestriction", Any.VOID); > + autoRetrievingEnabled = Tools.getOrDefault(info, > "IsAutoRetrievingEnabled", autoRetrievingEnabled); > + generatedValueStatement = Tools.getOrDefault(info, > "AutoRetrievingStatement", generatedValueStatement); > + useParameterSubstitution = Tools.getOrDefault(info, > "ParameterNameSubstitution", useParameterSubstitution); > + ignoreDriverPrivileges = Tools.getOrDefault(info, > "IgnoreDriverPrivileges", ignoreDriverPrivileges); > + ignoreCurrency = Tools.getOrDefault(info, "IgnoreCurrency", > ignoreCurrency); > + systemProperties = Tools.getOrDefault(info, "SystemProperties", > systemProperties); > + catalogRestriction = Tools.getOrDefault(info, > "ImplicitCatalogRestriction", Any.VOID); > + schemaRestriction = Tools.getOrDefault(info, > "ImplicitSchemaRestriction", Any.VOID); > > loadDriverFromProperties(driverClass, driverClassPath, > systemProperties); > > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLDatabaseMetaData.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLDatabaseMetaData.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLDatabaseMetaData.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLDatabaseMetaData.java > Sat May 5 03:59:10 2018 > @@ -45,9 +45,9 @@ import com.sun.star.uno.AnyConverter; > import com.sun.star.uno.UnoRuntime; > > public class JavaSQLDatabaseMetaData extends WeakBase implements > XDatabaseMetaData2 { > - private java.sql.DatabaseMetaData jdbcDatabaseMetaData; > - private JavaSQLConnection connection; > - private ConnectionLog logger; > + private final java.sql.DatabaseMetaData jdbcDatabaseMetaData; > + private final JavaSQLConnection connection; > + private final ConnectionLog logger; > > public JavaSQLDatabaseMetaData(java.sql.DatabaseMetaData > jdbcDatabaseMetaData, JavaSQLConnection connection) { > this.jdbcDatabaseMetaData = jdbcDatabaseMetaData; > @@ -1559,6 +1559,7 @@ public class JavaSQLDatabaseMetaData ext > } > } > > + @Override > public boolean supportsMinimumSQLGrammar() { > try { > return jdbcDatabaseMetaData.supportsMinimumSQLGrammar(); > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLPreparedStatement.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLPreparedStatement.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLPreparedStatement.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLPreparedStatement.java > Sat May 5 03:59:10 2018 > @@ -360,6 +360,7 @@ public class JavaSQLPreparedStatement ex > throw new SQLException(error, this, > StandardSQLState.SQL_FEATURE_NOT_IMPLEMENTED.text(), 0, Any.VOID); > } > > + @Override > public synchronized void setShort(int index, short x) throws > SQLException { > createStatement(); > logger.log(LogLevel.FINE, Resources.STR_LOG_SHORT_PARAMETER, index, > x); > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLRef.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLRef.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLRef.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLRef.java > Sat May 5 03:59:10 2018 > @@ -25,7 +25,7 @@ import com.sun.star.sdbc.SQLException; > import com.sun.star.sdbc.XRef; > > public class JavaSQLRef extends WeakBase implements XRef { > - private java.sql.Ref jdbcRef; > + private final java.sql.Ref jdbcRef; > > public JavaSQLRef(java.sql.Ref jdbcRef) { > this.jdbcRef = jdbcRef; > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLResultSetMetaData.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLResultSetMetaData.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLResultSetMetaData.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLResultSetMetaData.java > Sat May 5 03:59:10 2018 > @@ -25,8 +25,8 @@ import com.sun.star.sdbc.SQLException; > import com.sun.star.sdbc.XResultSetMetaData; > > public class JavaSQLResultSetMetaData extends WeakBase implements > XResultSetMetaData { > - private JavaSQLConnection connection; > - private java.sql.ResultSetMetaData jdbcResultSetMetaData; > + private final JavaSQLConnection connection; > + private final java.sql.ResultSetMetaData jdbcResultSetMetaData; > private int columnCount; > > public JavaSQLResultSetMetaData(JavaSQLConnection connection, > java.sql.ResultSetMetaData jdbcResultSetMetaData) { > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatement.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatement.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatement.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatement.java > Sat May 5 03:59:10 2018 > @@ -65,6 +65,7 @@ public class JavaSQLStatement extends Ja > > // XBatchExecution > > + @Override > public synchronized void addBatch(String sql) throws SQLException { > createStatement(); > try { > @@ -96,6 +97,7 @@ public class JavaSQLStatement extends Ja > > // XStatement > > + @Override > public synchronized boolean execute(String sql) throws SQLException { > createStatement(); > sqlStatement = sql; > @@ -144,6 +146,7 @@ public class JavaSQLStatement extends Ja > > // others > > + @Override > protected synchronized void createStatement() throws SQLException { > checkDisposed(); > if (jdbcStatement == null) { > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatementBase.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatementBase.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatementBase.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/JavaSQLStatementBase.java > Sat May 5 03:59:10 2018 > @@ -448,6 +448,7 @@ public abstract class JavaSQLStatementBa > > // XGeneratedResultSet > > + @Override > public synchronized com.sun.star.sdbc.XResultSet getGeneratedValues() > throws SQLException { > logger.log(LogLevel.FINE, Resources.STR_LOG_GENERATED_VALUES); > createStatement(); > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ReaderInputStream.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ReaderInputStream.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ReaderInputStream.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/ReaderInputStream.java > Sat May 5 03:59:10 2018 > @@ -25,7 +25,7 @@ import java.io.InputStream; > import java.io.Reader; > > public class ReaderInputStream extends InputStream { > - private Reader reader; > + private final Reader reader; > private int nextByte = -1; > > public ReaderInputStream(Reader reader) { > > Modified: > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/Tools.java > URL: > http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/Tools.java?rev=1830949&r1=1830948&r2=1830949&view=diff > ============================================================================== > --- > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/Tools.java > (original) > +++ > openoffice/trunk/main/connectivity/java/sdbc_jdbc/src/com/sun/star/comp/sdbc/Tools.java > Sat May 5 03:59:10 2018 > @@ -23,9 +23,13 @@ package com.sun.star.comp.sdbc; > import > org.apache.openoffice.comp.sdbc.dbtools.comphelper.ResourceBasedEventLogger; > import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState; > > +import com.sun.star.beans.NamedValue; > +import com.sun.star.beans.PropertyValue; > +import com.sun.star.lang.IllegalArgumentException; > import com.sun.star.logging.LogLevel; > import com.sun.star.sdbc.SQLException; > import com.sun.star.uno.Any; > +import com.sun.star.uno.AnyConverter; > > public class Tools { > public static SQLException toUnoException(Object source, Throwable > throwable) { > @@ -69,4 +73,52 @@ public class Tools { > logger.log(LogLevel.SEVERE, exception); > return exception; > } > + > + public static String getOrDefault(PropertyValue[] properties, String > name, String defaultValue) throws IllegalArgumentException { > + String ret = defaultValue; > + for (PropertyValue property : properties) { > + if (property.Name.equals(name)) { > + ret = AnyConverter.toString(property.Value); > + break; > + } > + } > + return ret; > + } > + > + public static boolean getOrDefault(PropertyValue[] properties, String > name, boolean defaultValue) throws IllegalArgumentException { > + boolean ret = defaultValue; > + for (PropertyValue property : properties) { > + if (property.Name.equals(name)) { > + ret = AnyConverter.toBoolean(property.Value); > + break; > + } > + } > + return ret; > + } > + > + public static Object getOrDefault(PropertyValue[] properties, String > name, Object defaultValue) throws IllegalArgumentException { > + Object ret = defaultValue; > + for (PropertyValue property : properties) { > + if (property.Name.equals(name)) { > + ret = property.Value; > + break; > + } > + } > + return ret; > + } > + > + public static NamedValue[] getOrDefault(PropertyValue[] properties, > String name, NamedValue[] defaultValue) throws IllegalArgumentException { > + NamedValue[] ret = defaultValue; > + for (PropertyValue property : properties) { > + if (property.Name.equals(name)) { > + Object[] array = (Object[]) > AnyConverter.toArray(property.Value); > + ret = new NamedValue[array.length]; > + for (int i = 0; i < array.length; i++) { > + ret[i] = (NamedValue) array[i]; > + } > + break; > + } > + } > + return ret; > + } > } > > >
smime.p7s
Description: S/MIME Cryptographic Signature