Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7EB9A9883 for ; Tue, 21 May 2013 14:32:24 +0000 (UTC) Received: (qmail 19518 invoked by uid 500); 21 May 2013 14:32:24 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 19449 invoked by uid 500); 21 May 2013 14:32:24 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 19428 invoked by uid 99); 21 May 2013 14:32:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 14:32:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 14:32:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 77DEA2388847; Tue, 21 May 2013 14:31:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1484818 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/services/cache/ iapi/services/context/ iapi/services/info/ iapi/services/io/ iapi/services/loader/ iapi/sql/depend/ iapi/sql/dictionary/ iapi/store/access/ iapi/store/raw... Date: Tue, 21 May 2013 14:31:50 -0000 To: derby-commits@db.apache.org From: rhillegas@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130521143151.77DEA2388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhillegas Date: Tue May 21 14:31:49 2013 New Revision: 1484818 URL: http://svn.apache.org/r1484818 Log: DERBY-6213: Generify more classes. Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java Tue May 21 14:31:49 2013 @@ -29,6 +29,7 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Arrays; +@SuppressWarnings("unchecked") public class ClassSize { public static final int refSize; @@ -59,12 +60,12 @@ public class ClassSize * compile it. This may fail because ClassSizeCatalog.java is not created * until everything else has been compiled. Bury ClassSizeCatalog in a string. */ - private static java.util.Hashtable catalog; + private static java.util.Hashtable catalog; static { try { - catalog = (java.util.Hashtable) + catalog = (java.util.Hashtable) Class.forName( "org.apache.derby.iapi.services.cache.ClassSizeCatalog").newInstance(); } catch( Exception e){} @@ -210,7 +211,7 @@ public class ClassSize return estimateBaseFromCatalog( cls, false); } - private static int estimateBaseFromCatalog( Class cls, boolean addToCatalog) + private static int estimateBaseFromCatalog( Class cls, boolean addToCatalog) { if( dummyCatalog) return 0; @@ -351,9 +352,9 @@ public class ClassSize */ private static final String getSystemProperty(final String propName) { try { - return (String)AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + public String run() { return System.getProperty(propName, null); } }); Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java Tue May 21 14:31:49 2013 @@ -71,9 +71,9 @@ public class ContextManager */ private static final class CtxStack { /** Internal list with all the elements of the stack. */ - private final ArrayList stack_ = new ArrayList(); + private final ArrayList stack_ = new ArrayList(); /** Read-only view of the internal list. */ - private final List view_ = Collections.unmodifiableList(stack_); + private final List view_ = Collections.unmodifiableList(stack_); // Keeping a reference to the top element on the stack // optimizes the frequent accesses to this element. The @@ -116,12 +116,12 @@ public class ContextManager * with a String key. * @see ContextManager#pushContext(Context) */ - private final HashMap ctxTable = new HashMap(); + private final HashMap ctxTable = new HashMap(); /** * List of all Contexts */ - private final ArrayList holder = new ArrayList(); + private final ArrayList holder = new ArrayList(); /** * Add a Context object to the ContextManager. The object is added @@ -133,7 +133,7 @@ public class ContextManager { checkInterrupt(); final String contextId = newContext.getIdName(); - CtxStack idStack = (CtxStack) ctxTable.get(contextId); + CtxStack idStack = ctxTable.get(contextId); // if the stack is null, create a new one. if (idStack == null) { @@ -157,7 +157,7 @@ public class ContextManager public Context getContext(String contextId) { checkInterrupt(); - final CtxStack idStack = (CtxStack) ctxTable.get(contextId); + final CtxStack idStack = ctxTable.get(contextId); if (SanityManager.DEBUG) SanityManager.ASSERT( idStack == null || idStack.isEmpty() || @@ -178,11 +178,11 @@ public class ContextManager } // remove the top context from the global stack - Context theContext = (Context) holder.remove(holder.size()-1); + Context theContext = holder.remove(holder.size()-1); // now find its id and remove it from there, too final String contextId = theContext.getIdName(); - final CtxStack idStack = (CtxStack) ctxTable.get(contextId); + final CtxStack idStack = ctxTable.get(contextId); if (SanityManager.DEBUG) { SanityManager.ASSERT( idStack != null && @@ -207,7 +207,7 @@ public class ContextManager holder.remove(holder.lastIndexOf(theContext)); final String contextId = theContext.getIdName(); - final CtxStack idStack = (CtxStack) ctxTable.get(contextId); + final CtxStack idStack = ctxTable.get(contextId); // now remove it from its id's stack. idStack.remove(theContext); @@ -234,7 +234,7 @@ public class ContextManager * @see org.apache.derby.iapi.sql.conn.StatementContext#resetSavePoint() */ public final List getContextStack(String contextId) { - final CtxStack cs = (CtxStack) ctxTable.get(contextId); + final CtxStack cs = ctxTable.get(contextId); return (cs==null?Collections.EMPTY_LIST:cs.getUnmodifiableList()); } @@ -337,7 +337,7 @@ cleanup: for (int index = holder.size() break; } - Context ctx = ((Context) holder.get(index)); + Context ctx = (holder.get(index)); lastHandler = ctx.isLastHandler(errorSeverity); ctx.cleanupOnError(error); Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java Tue May 21 14:31:49 2013 @@ -157,7 +157,7 @@ public final class ContextService //OLD cm3.activeCount = -1; // nesting in stack */ - private ThreadLocal threadContextList = new ThreadLocal(); + private ThreadLocal threadContextList = new ThreadLocal(); /** * Collection of all ContextManagers that are open @@ -168,7 +168,7 @@ public final class ContextService //OLD * @see #newContextManager() * @see SystemContext#cleanupOnError(Throwable) */ - private HashSet allContexts; + private HashSet allContexts; /** * Create a new ContextService for a Derby system. @@ -182,7 +182,7 @@ public final class ContextService //OLD ContextService.factory = this; - allContexts = new HashSet(); + allContexts = new HashSet(); } @@ -262,7 +262,7 @@ public final class ContextService //OLD */ public ContextManager getCurrentContextManager() { - ThreadLocal tcl = threadContextList; + ThreadLocal tcl = threadContextList; if (tcl == null) { // The context service is already stopped. return null; @@ -294,7 +294,7 @@ public final class ContextService //OLD * see that method for details. */ public void resetCurrentContextManager(ContextManager cm) { - ThreadLocal tcl = threadContextList; + ThreadLocal tcl = threadContextList; if (tcl == null) { // The context service is already stopped. @@ -389,9 +389,10 @@ public final class ContextService //OLD * @see ContextManager#activeCount * @see ContextManager#activeThread */ + @SuppressWarnings("unchecked") private boolean addToThreadList(Thread me, ContextManager associateCM) { - ThreadLocal tcl = threadContextList; + ThreadLocal tcl = threadContextList; if (tcl == null) { // The context service is already stopped. @@ -411,7 +412,7 @@ public final class ContextService //OLD return true; } - java.util.Stack stack; + java.util.Stack stack; if (list instanceof ContextManager) { // Could be two situations: @@ -431,7 +432,7 @@ public final class ContextService //OLD // Nested, need to create a Stack of ContextManagers, // the top of the stack will be the active one. - stack = new java.util.Stack(); + stack = new java.util.Stack(); tcl.set(stack); // The stack represents the true nesting @@ -448,7 +449,7 @@ public final class ContextService //OLD { // existing stack, nesting represented // by stack entries, not activeCount. - stack = (java.util.Stack) list; + stack = (java.util.Stack) list; } stack.push(associateCM); @@ -544,9 +545,9 @@ public final class ContextService //OLD Thread me = Thread.currentThread(); synchronized (this) { - for (Iterator i = allContexts.iterator(); i.hasNext(); ) { + for (Iterator i = allContexts.iterator(); i.hasNext(); ) { - ContextManager cm = (ContextManager) i.next(); + ContextManager cm = i.next(); Thread active = cm.activeThread; @@ -560,7 +561,7 @@ public final class ContextService //OLD if (cm.setInterrupted(c)) { AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction() { public Object run() { fActive.interrupt(); return null; Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java Tue May 21 14:31:49 2013 @@ -109,7 +109,7 @@ import java.util.Properties; */ -public final class ProductVersionHolder implements java.security.PrivilegedAction +public final class ProductVersionHolder implements java.security.PrivilegedAction { // @@ -523,7 +523,7 @@ public final class ProductVersionHolder ** Security related methods */ private String productGenus; - public final Object run() { + public final Properties run() { // SECURITY PERMISSION - IP4 return loadProperties(this.productGenus); Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java Tue May 21 14:31:49 2013 @@ -600,21 +600,21 @@ nextFile: for (int i = 0; i < list.lengt private static Method setExec = null; // Reflection helper objects for calling into Java >= 7 - private static Class fileClz = File.class; - private static Class filesClz; - private static Class pathClz; - private static Class pathsClz; - private static Class aclEntryClz; - private static Class aclFileAttributeViewClz; - private static Class posixFileAttributeViewClz; - private static Class userPrincipalClz; - private static Class linkOptionArrayClz; - private static Class linkOptionClz; - private static Class stringArrayClz; - private static Class aclEntryBuilderClz; - private static Class aclEntryTypeClz; - private static Class fileStoreClz; - private static Class aclEntryPermissionClz; + private static Class fileClz = File.class; + private static Class filesClz; + private static Class pathClz; + private static Class pathsClz; + private static Class aclEntryClz; + private static Class aclFileAttributeViewClz; + private static Class posixFileAttributeViewClz; + private static Class userPrincipalClz; + private static Class linkOptionArrayClz; + private static Class linkOptionClz; + private static Class stringArrayClz; + private static Class aclEntryBuilderClz; + private static Class aclEntryTypeClz; + private static Class fileStoreClz; + private static Class aclEntryPermissionClz; private static Method get; private static Method getFileAttributeView; @@ -948,7 +948,7 @@ nextFile: for (int i = 0; i < list.lengt // aceb.setPermissions(new HashSet(Arrays.asList(perms); // newAcl.add(aceb); - List newAcl = new ArrayList(); + List newAcl = new ArrayList(); Object[] perms = (Object[]) values.invoke(null, (Object[]) null); Object aceb = newBuilder.invoke(null, (Object[]) null); Object allowValue = allow.get(aclEntryTypeClz); @@ -956,7 +956,7 @@ nextFile: for (int i = 0; i < list.lengt aceb = setType.invoke(aceb, new Object[]{allowValue}); aceb = setPermissions.invoke( aceb, - new Object[] {new HashSet(Arrays.asList(perms))}); + new Object[] {new HashSet(Arrays.asList(perms))}); newAcl.add(build.invoke(aceb, (Object[]) null)); // view.setAcl(newAcl); Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java Tue May 21 14:31:49 2013 @@ -34,7 +34,7 @@ import java.io.IOException; * A formatable holder for a java.util.Hashtable. * Used to avoid serializing Properties. */ -public class FormatableHashtable extends Hashtable implements Formatable +public class FormatableHashtable extends Hashtable implements Formatable { /******************************************************** ** Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java Tue May 21 14:31:49 2013 @@ -29,11 +29,11 @@ public class ClassInfo implements Instan private static final Class[] noParameters = new Class[0]; private static final Object[] noArguments = new Object[0]; - private final Class clazz; + private final Class clazz; private boolean useConstructor = true; private Constructor noArgConstructor; - public ClassInfo(Class clazz) { + public ClassInfo(Class clazz) { this.clazz = clazz; } Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java Tue May 21 14:31:49 2013 @@ -94,13 +94,13 @@ public class ClassInspector { try { - Class toClass = getClass(toClassName); + Class toClass = getClass(toClassName); // is toClass an untyped null if (toClass == null) { return false; } - Class fromClass = getClass(fromClassName); + Class fromClass = getClass(fromClassName); // is fromClass an untyped null if (fromClass == null) @@ -228,7 +228,7 @@ public class ClassInspector ) throws ClassNotFoundException, StandardException { - Class receiverClass = getClass(receiverType); + Class receiverClass = getClass(receiverType); if (receiverClass == null) return null; @@ -444,7 +444,7 @@ public class ClassInspector boolean[] isParam) throws ClassNotFoundException, StandardException { - Class receiverClass = getClass(receiverType); + Class receiverClass = getClass(receiverType); if (receiverClass == null) return null; Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java Tue May 21 14:31:49 2013 @@ -23,12 +23,14 @@ package org.apache.derby.iapi.sql.depend import java.util.Hashtable; +import org.apache.derby.catalog.UUID; + /** * ProviderList is a list of Providers that is being * tracked for some object other than the current dependent. */ -public class ProviderList extends Hashtable +public class ProviderList extends Hashtable { /** * Add a Provider to the list. Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java Tue May 21 14:31:49 2013 @@ -48,6 +48,7 @@ import org.apache.derby.iapi.sql.execute import org.apache.derby.iapi.store.access.TransactionController; import org.apache.derby.iapi.types.DataTypeDescriptor; import org.apache.derby.iapi.types.DataTypeUtilities; +import org.apache.derby.iapi.types.DataValueDescriptor; /** * A SPSDescriptor describes a Stored Prepared Statement. @@ -589,7 +590,7 @@ public class SPSDescriptor extends Uniqu throws StandardException { if (params == null && !lookedUpParams) { - List tmpDefaults = new ArrayList(); + List tmpDefaults = new ArrayList(); params = getDataDictionary().getSPSParams(this, tmpDefaults); paramDefaults = tmpDefaults.toArray(); lookedUpParams = true; Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java Tue May 21 14:31:49 2013 @@ -107,7 +107,7 @@ public class BackingStoreHashtable ************************************************************************** */ private TransactionController tc; - private HashMap hash_table; + private HashMap hash_table; private int[] key_column_numbers; private boolean remove_duplicates; private boolean skipNullKeyColumns; @@ -217,8 +217,8 @@ public class BackingStoreHashtable { hash_table = ((loadFactor == -1) ? - new HashMap(initialCapacity) : - new HashMap(initialCapacity, loadFactor)); + new HashMap(initialCapacity) : + new HashMap(initialCapacity, loadFactor)); } else { @@ -249,9 +249,9 @@ public class BackingStoreHashtable */ hash_table = (((estimated_rowcnt <= 0) || (row_source == null)) ? - new HashMap() : + new HashMap() : (estimated_rowcnt < max_inmemory_size) ? - new HashMap((int) estimated_rowcnt) : + new HashMap((int) estimated_rowcnt) : null); } @@ -277,7 +277,7 @@ public class BackingStoreHashtable // capacity of the hash table. double rowUsage = getEstimatedMemUsage(row); hash_table = - new HashMap((int)(max_inmemory_size / rowUsage)); + new HashMap((int)(max_inmemory_size / rowUsage)); } add_row_to_hash_table(row, needsToClone); @@ -292,7 +292,7 @@ public class BackingStoreHashtable // BackingStoreHashtable (ex. "size()") will have a working hash_table // on which to operate. if (hash_table == null) - hash_table = new HashMap(); + hash_table = new HashMap(); } /************************************************************************** @@ -394,6 +394,7 @@ public class BackingStoreHashtable * * @exception StandardException Standard exception policy. **/ + @SuppressWarnings("unchecked") private void add_row_to_hash_table(DataValueDescriptor[] row, boolean needsToClone) throws StandardException { @@ -413,18 +414,18 @@ public class BackingStoreHashtable { if (!remove_duplicates) { - List row_vec; + List row_vec; // inserted a duplicate if (duplicate_value instanceof List) { doSpaceAccounting( row, false); - row_vec = (List) duplicate_value; + row_vec = (List) duplicate_value; } else { // allocate list to hold duplicates - row_vec = new ArrayList(2); + row_vec = new ArrayList(2); // insert original row into vector row_vec.add(duplicate_value); @@ -572,7 +573,7 @@ public class BackingStoreHashtable * * @exception StandardException Standard exception policy. **/ - public Enumeration elements() + public Enumeration elements() throws StandardException { if( diskHashtable == null) @@ -746,10 +747,10 @@ public class BackingStoreHashtable return hash_table.size() + diskHashtable.size(); } - private class BackingStoreHashtableEnumeration implements Enumeration + private class BackingStoreHashtableEnumeration implements Enumeration { - private Iterator memoryIterator; - private Enumeration diskEnumeration; + private Iterator memoryIterator; + private Enumeration diskEnumeration; BackingStoreHashtableEnumeration() { Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java Tue May 21 14:31:49 2013 @@ -251,6 +251,7 @@ public class DiskHashtable return getRemove(key, false, false); } + @SuppressWarnings("unchecked") private Object getRemove(Object key, boolean remove, boolean existenceOnly) throws StandardException { @@ -296,19 +297,19 @@ public class DiskHashtable // if there is more than one row, return a vector of // the rows. // - Vector v; + Vector v; if( rowCount == 2) { // convert the "single" row retrieved from the // first trip in the loop, to a vector with the // first two rows. - v = new Vector( 2); + v = new Vector( 2); v.add( retValue); retValue = v; } else { - v = (Vector) retValue; + v = (Vector) retValue; } v.add( BackingStoreHashtable.shallowCloneRow( row)); } @@ -380,13 +381,13 @@ public class DiskHashtable * * @exception StandardException Standard exception policy. **/ - public Enumeration elements() + public Enumeration elements() throws StandardException { return new ElementEnum(); } - private class ElementEnum implements Enumeration + private class ElementEnum implements Enumeration { private ScanController scan; private boolean hasMore; Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java Tue May 21 14:31:49 2013 @@ -165,7 +165,7 @@ public final class ContainerKey implemen /** This lockable wants to participate in the Virtual Lock table. */ - public boolean lockAttributes(int flag, Hashtable attributes) + public boolean lockAttributes(int flag, Hashtable attributes) { if (SanityManager.DEBUG) { Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java Tue May 21 14:31:49 2013 @@ -418,12 +418,13 @@ public abstract class NumberDataType ext setValue for integral exact numerics. Converts the BigDecimal to a long to preserve precision */ + @SuppressWarnings("unchecked") public void setBigDecimal(Number bigDecimal) throws StandardException { if (objectNull(bigDecimal)) return; - Comparable bdc = (Comparable) bigDecimal; + Comparable bdc = (Comparable) bigDecimal; // See comment in SQLDecimal.getLong() Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java Tue May 21 14:31:49 2013 @@ -349,6 +349,7 @@ public class UserType extends DataType * * @exception StandardException thrown on failure */ + @SuppressWarnings("unchecked") public int compare(DataValueDescriptor other) throws StandardException { @@ -388,7 +389,7 @@ public class UserType extends DataType try { - comparison = ((java.lang.Comparable) value).compareTo(other.getObject()); + comparison = ((java.lang.Comparable) value).compareTo(other.getObject()); } catch (ClassCastException cce) { Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java Tue May 21 14:31:49 2013 @@ -1033,14 +1033,14 @@ public class XML */ private static Object checkJAXPRequirement() { try { - Class factoryClass = + Class factoryClass = Class.forName("javax.xml.parsers.DocumentBuilderFactory"); Method newFactory = factoryClass.getMethod( "newInstance", new Class[0]); Method newBuilder = factoryClass.getMethod( "newDocumentBuilder", new Class[0]); - Class builderClass = + Class builderClass = Class.forName("javax.xml.parsers.DocumentBuilder"); Method getImpl = builderClass.getMethod( "getDOMImplementation", new Class[0]); @@ -1068,7 +1068,7 @@ public class XML */ private static boolean checkXPathRequirement(Object domImpl) { try { - Class domImplClass = Class.forName("org.w3c.dom.DOMImplementation"); + Class domImplClass = Class.forName("org.w3c.dom.DOMImplementation"); Method getFeature = domImplClass.getMethod( "getFeature", new Class[] {String.class, String.class}); Object impl = Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml Tue May 21 14:31:49 2013 @@ -57,6 +57,7 @@ + v = new Vector(); while (true) { String thisId = parseId(r,true); @@ -411,7 +411,7 @@ public abstract class IdUtil if (input.length() == 0) return new String[0][]; - Vector v = new Vector(); + Vector v = new Vector(); java.io.StringReader r = new java.io.StringReader(input); // while (true) @@ -486,7 +486,7 @@ public abstract class IdUtil private static String[] parseIdList(StringReader r, boolean normalize) throws StandardException { - Vector v = new Vector(); + Vector v = new Vector(); while (true) { int delim; @@ -529,9 +529,9 @@ public abstract class IdUtil public static String intersect(String[] l1, String[] l2) { if (l1 == null || l2 == null) return null; - HashSet h = new HashSet(); + HashSet h = new HashSet(); for(int ix=0;ix v = new Vector(); for(int ix=0;ix v,boolean normal) { if (v.size() == 0) return null; String[] a = new String[v.size()]; @@ -596,8 +596,8 @@ public abstract class IdUtil public static String dups(String[] l) { if (l == null) return null; - HashSet h = new HashSet(); - Vector v = new Vector(); + HashSet h = new HashSet(); + Vector v = new Vector(); for(int ix=0;ix h = new HashSet(); + Vector v = new Vector(); for(int ix=0;ix v = new Vector(); StringReader r = new StringReader(list); String[] enteredList_a = parseIdList(r,false); Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java Tue May 21 14:31:49 2013 @@ -67,7 +67,7 @@ public class InterruptStatus { * Use thread local variable to store interrupt status flag *only* if we * don't have lcc, e.g. during database creation, shutdown etc. */ - private static final ThreadLocal exception = new ThreadLocal (); + private static final ThreadLocal exception = new ThreadLocal(); /** * Make a note that this thread saw an interrupt. Thread's intr Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java Tue May 21 14:31:49 2013 @@ -102,7 +102,7 @@ abstract class BaseMonitor /** Hash table of objects that implement PersistentService keyed by their getType() method. */ - private HashMap serviceProviders = new HashMap(); + private HashMap serviceProviders = new HashMap(); private static final String LINE = "----------------------------------------------------------------"; @@ -111,7 +111,7 @@ abstract class BaseMonitor Vector[] implementationSets; - private Vector services; // Vector of TopServices + private Vector services; // Vector of TopServices Properties bootProperties; // specifc properties provided by the boot method, override everything else Properties applicationProperties; @@ -140,7 +140,7 @@ abstract class BaseMonitor BaseMonitor() { super(); - services = new Vector(0, 1); + services = new Vector(0, 1); services.add(new TopService(this)); // first element is always the free-floating service } @@ -182,7 +182,7 @@ abstract class BaseMonitor if (position == 0) break; - ts = (TopService) services.get(position); + ts = services.get(position); } // push a new context manager @@ -203,7 +203,7 @@ abstract class BaseMonitor } Monitor.getStream().println(LINE); - ((TopService) services.get(0)).shutdown(); + (services.get(0)).shutdown(); ContextService.stop(); Monitor.clearMonitor(); @@ -279,10 +279,10 @@ abstract class BaseMonitor } } - Vector bootImplementations = getImplementations(bootProperties, false); + Vector> bootImplementations = getImplementations(bootProperties, false); - Vector systemImplementations = null; - Vector applicationImplementations = null; + Vector> systemImplementations = null; + Vector> applicationImplementations = null; // TEMP - making this sanity only breaks the unit test code // I will fix soon, djd. @@ -417,7 +417,7 @@ abstract class BaseMonitor TopService myts = null; synchronized (this) { for (int i = 1; i < services.size(); i++) { - TopService ts = (TopService) services.get(i); + TopService ts = services.get(i); if (ts.isPotentialService(key)) { myts = ts; break; @@ -548,10 +548,10 @@ abstract class BaseMonitor private synchronized TopService findTopService(Object serviceModule) { if (serviceModule == null) - return (TopService) services.get(0); + return services.get(0); for (int i = 1; i < services.size(); i++) { - TopService ts = (TopService) services.get(i); + TopService ts = services.get(i); if (ts.inService(serviceModule)) return ts; } @@ -708,18 +708,18 @@ abstract class BaseMonitor The module's start or create method is not called. */ - - protected Object loadInstance(Class factoryInterface, Properties properties) { + @SuppressWarnings("unchecked") + protected Object loadInstance(Class factoryInterface, Properties properties) { Object instance = null; - Vector localImplementations = getImplementations(properties, false); + Vector> localImplementations = getImplementations(properties, false); if (localImplementations != null) { instance = loadInstance(localImplementations, factoryInterface, properties); } for (int i = 0; i < implementationSets.length; i++) { - instance = loadInstance(implementationSets[i], factoryInterface, properties); + instance = loadInstance( (Vector>) implementationSets[i], factoryInterface, properties); if (instance != null) break; } @@ -728,7 +728,7 @@ abstract class BaseMonitor } - private Object loadInstance(Vector implementations, Class factoryInterface, Properties properties) { + private Object loadInstance(Vector> implementations, Class factoryInterface, Properties properties) { for (int index = 0; true; index++) { @@ -751,12 +751,12 @@ abstract class BaseMonitor into the implementations vecotr of that class. Returns -1 if no class could be found. */ - private static int findImplementation(Vector implementations, int startIndex, Class factoryInterface) { + private static int findImplementation(Vector> implementations, int startIndex, Class factoryInterface) { for (int i = startIndex; i < implementations.size(); i++) { //try { - Class factoryClass = (Class) implementations.get(i); + Class factoryClass = implementations.get(i); if (!factoryInterface.isAssignableFrom(factoryClass)) { continue; } @@ -840,7 +840,7 @@ abstract class BaseMonitor // count the number of services that implement the required protocol for (int i = 1; i < services.size(); i++) { - ts = (TopService) services.get(i); + ts = services.get(i); if (ts.isActiveService()) { if (ts.getKey().getFactoryInterface().getName().equals(protocol)) count++; @@ -852,7 +852,7 @@ abstract class BaseMonitor if (count != 0) { int j = 0; for (int i = 1; i < services.size(); i++) { - ts = (TopService) services.get(i); + ts = services.get(i); if (ts.isActiveService()) { if (ts.getKey().getFactoryInterface().getName().equals(protocol)) { list[j++] = ts.getServiceType().getUserServiceName(ts.getKey().getIdentifier()); @@ -1047,12 +1047,12 @@ abstract class BaseMonitor If no implementations are listed in the properties object then null is returned. */ - private Vector getImplementations(Properties moduleList, boolean actualModuleList) { + private Vector> getImplementations(Properties moduleList, boolean actualModuleList) { if (moduleList == null) return null; - Vector implementations = actualModuleList ? new Vector(moduleList.size()) : new Vector(0,1); + Vector> implementations = actualModuleList ? new Vector>(moduleList.size()) : new Vector>(0,1); // Get my current JDK environment int theJDKId = JVMInfo.JDK_ID; @@ -1126,7 +1126,7 @@ nextModule: } try { - Class possibleModule = Class.forName(className); + Class possibleModule = Class.forName(className); // Look for the monitors special modules, PersistentService ones. if (getPersistentServiceImplementation(possibleModule)) @@ -1218,7 +1218,7 @@ nextModule: return implementations; } - private boolean getPersistentServiceImplementation( Class possibleModule) + private boolean getPersistentServiceImplementation( Class possibleModule) { if( ! PersistentService.class.isAssignableFrom(possibleModule)) return false; @@ -1232,7 +1232,7 @@ nextModule: return true; } // end of getPersistentServiceImplementation - private Vector getDefaultImplementations() { + private Vector> getDefaultImplementations() { Properties moduleList = getDefaultModuleProperties(); @@ -1408,9 +1408,9 @@ nextModule: */ private void determineSupportedServiceProviders() { - for (Iterator i = serviceProviders.values().iterator(); i.hasNext(); ) { + for (Iterator i = serviceProviders.values().iterator(); i.hasNext(); ) { - Object provider = i.next(); + PersistentService provider = i.next(); // see if this provider can live in this environment if (!BaseMonitor.canSupport(provider, (Properties) null)) { @@ -1651,10 +1651,10 @@ nextModule: String className = PropertyUtil.getSystemProperty( propertyName); if( className != null) return className; - return (String) storageFactories.get( subSubProtocol); + return storageFactories.get( subSubProtocol); } // end of getStorageFactoryClassName - private static final HashMap storageFactories = new HashMap(); + private static final HashMap storageFactories = new HashMap(); static { String dirStorageFactoryClass; if (!JVMInfo.J2ME) @@ -1724,7 +1724,7 @@ nextModule: } for (int i = 1; i < services.size(); i++) { - TopService ts2 = (TopService) services.get(i); + TopService ts2 = services.get(i); if (ts2.isPotentialService(serviceKey)) { // if the service already exists then just return null return null; @@ -2101,9 +2101,9 @@ nextModule: */ abstract boolean initialize(boolean lite); - class ProviderEnumeration implements Enumeration + class ProviderEnumeration implements Enumeration { - private Enumeration serviceProvidersKeys = (serviceProviders == null) ? null : + private Enumeration serviceProvidersKeys = (serviceProviders == null) ? null : Collections.enumeration(serviceProviders.keySet()); private Properties startParams; private Enumeration paramEnumeration; @@ -2117,12 +2117,12 @@ nextModule: paramEnumeration = startParams.keys(); } - public Object nextElement() throws NoSuchElementException + public PersistentService nextElement() throws NoSuchElementException { if( serviceProvidersKeys != null && serviceProvidersKeys.hasMoreElements()) return serviceProviders.get( serviceProvidersKeys.nextElement()); getNextStorageFactory(); - Object ret = storageFactoryPersistentService; + PersistentService ret = storageFactoryPersistentService; storageFactoryPersistentService = null; return ret; } Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java Tue May 21 14:31:49 2013 @@ -194,8 +194,8 @@ public final class FileMonitor extends B final boolean initialize(final boolean lite) { // SECURITY PERMISSION - OP2, OP2a, OP2b - return ((Boolean) AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + return (AccessController.doPrivileged(new PrivilegedAction() { + public Boolean run() { return Boolean.valueOf(PBinitialize(lite)); } })).booleanValue(); @@ -203,9 +203,9 @@ public final class FileMonitor extends B final Properties getDefaultModuleProperties() { // SECURITY PERMISSION - IP1 - return (Properties) AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + public Properties run() { return FileMonitor.super.getDefaultModuleProperties(); } }); @@ -216,8 +216,8 @@ public final class FileMonitor extends B return PBgetJVMProperty(key); // SECURITY PERMISSION - OP1 - return (String) AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + return AccessController.doPrivileged(new PrivilegedAction() { + public String run() { return PBgetJVMProperty(key); } }); @@ -227,8 +227,8 @@ public final class FileMonitor extends B final Runnable task, final String name, final boolean setMinPriority) { - return (Thread) AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + return AccessController.doPrivileged(new PrivilegedAction() { + public Thread run() { try { return FileMonitor.super.getDaemonThread( task, name, setMinPriority); @@ -250,7 +250,7 @@ public final class FileMonitor extends B } public final void setThreadPriority(final int priority) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction() { public Object run() { FileMonitor.super.setThreadPriority(priority); return null; @@ -262,9 +262,9 @@ public final class FileMonitor extends B throws IOException { try { // SECURITY PERMISSION - OP3 - return (InputStream) AccessController.doPrivileged( - new PrivilegedExceptionAction() { - public Object run() throws IOException { + return AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public InputStream run() throws IOException { return PBapplicationPropertiesStream(); } }); Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java Tue May 21 14:31:49 2013 @@ -39,7 +39,7 @@ class ProtocolKey { /** The class of the factory */ - protected Class factoryInterface; + protected Class factoryInterface; /** name of module, can be null @@ -50,7 +50,7 @@ class ProtocolKey { ** Constructor */ - protected ProtocolKey(Class factoryInterface, String identifier) + protected ProtocolKey(Class factoryInterface, String identifier) { super(); this.factoryInterface = factoryInterface; @@ -78,7 +78,7 @@ class ProtocolKey { ** Methods required to use this key */ - protected Class getFactoryInterface() { + protected Class getFactoryInterface() { return factoryInterface; } Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java Tue May 21 14:31:49 2013 @@ -94,7 +94,7 @@ final class StorageFactoryService implem try { AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() + new java.security.PrivilegedExceptionAction() { public Object run() throws IOException, StandardException { @@ -130,7 +130,7 @@ final class StorageFactoryService implem catch( IOException ioe){ throw Monitor.exceptionStartingModule(/*serviceName, */ ioe); } } AccessController.doPrivileged( - new java.security.PrivilegedAction() + new java.security.PrivilegedAction() { public Object run() { @@ -181,10 +181,10 @@ final class StorageFactoryService implem { try { - return (StorageFactory) AccessController.doPrivileged( - new PrivilegedExceptionAction() + return AccessController.doPrivileged( + new PrivilegedExceptionAction() { - public Object run() throws InstantiationException, IllegalAccessException, IOException + public StorageFactory run() throws InstantiationException, IllegalAccessException, IOException { return privGetStorageFactoryInstance( useHome, databaseName, tempDirName, uniqueName); } @@ -265,7 +265,7 @@ final class StorageFactoryService implem try { AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction() { public Object run() throws IOException, StandardException, @@ -337,7 +337,7 @@ final class StorageFactoryService implem try { AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction() { public Object run() throws StandardException { @@ -434,7 +434,7 @@ final class StorageFactoryService implem try { AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction() { public Object run() throws StandardException { @@ -488,7 +488,7 @@ final class StorageFactoryService implem try { AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction() { public Object run() throws StandardException { @@ -679,7 +679,7 @@ final class StorageFactoryService implem try { if( AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction() { public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException @@ -726,7 +726,7 @@ final class StorageFactoryService implem try { AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction() { public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException @@ -783,7 +783,7 @@ final class StorageFactoryService implem try { return getProtocolLeadIn() + (String) AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction() { public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException @@ -888,7 +888,7 @@ final class StorageFactoryService implem try { return AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction() { public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException @@ -949,10 +949,10 @@ final class StorageFactoryService implem try { - return getProtocolLeadIn() + (String) AccessController.doPrivileged( - new PrivilegedExceptionAction() + return getProtocolLeadIn() + AccessController.doPrivileged( + new PrivilegedExceptionAction() { - public Object run() + public String run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, nm, null, null); @@ -1010,9 +1010,9 @@ final class StorageFactoryService implem * @throws SecurityException if the required privileges are missing */ private final boolean fileExists(final File file) { - return ((Boolean)AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { + return (AccessController.doPrivileged( + new PrivilegedAction() { + public Boolean run() { return new Boolean(file.exists()); } })).booleanValue(); @@ -1046,7 +1046,7 @@ final class StorageFactoryService implem } } - final class DirectoryList implements Enumeration, PrivilegedAction + final class DirectoryList implements Enumeration, PrivilegedAction { private String[] contents; private StorageFile systemDirectory; @@ -1086,7 +1086,7 @@ final class StorageFactoryService implem } // end of nextElement // PrivilegedAction method - public final Object run() + public final DirectoryList run() { switch( actionCode) { Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java Tue May 21 14:31:49 2013 @@ -61,11 +61,11 @@ final class TopService { /** List of protocols. */ - Hashtable protocolTable; + Hashtable protocolTable; /** */ - Vector moduleInstances; + Vector moduleInstances; /** */ @@ -88,8 +88,8 @@ final class TopService { TopService(BaseMonitor monitor) { super(); this.monitor = monitor; - protocolTable = new Hashtable(); - moduleInstances = new Vector(0, 5); + protocolTable = new Hashtable(); + moduleInstances = new Vector(0, 5); } TopService(BaseMonitor monitor, ProtocolKey key, PersistentService serviceType, Locale serviceLocale) @@ -208,7 +208,7 @@ final class TopService { */ synchronized Object findModule(ProtocolKey key, boolean findOnly, Properties properties) { - ModuleInstance module = (ModuleInstance) protocolTable.get(key); + ModuleInstance module = protocolTable.get(key); if (module == null) return null; @@ -235,7 +235,7 @@ final class TopService { // ArrayIndexOutOfBoundsException. synchronized (moduleInstances) { for (int i = 0; i < moduleInstances.size(); i++) { - ModuleInstance module = (ModuleInstance) moduleInstances.get(i); + ModuleInstance module = moduleInstances.get(i); if (module.getInstance() == instance) { return module; } @@ -281,7 +281,7 @@ final class TopService { // and result in an ArrayIndexOutOfBoundsException. synchronized (moduleInstances) { if (i < moduleInstances.size()) { - module = (ModuleInstance) moduleInstances.get(i); + module = moduleInstances.get(i); } else { // No more instances to look at, break out of the loop. break; @@ -386,7 +386,7 @@ final class TopService { if (moduleInstances.isEmpty()) return true; - module = (ModuleInstance) moduleInstances.get(0); + module = moduleInstances.get(0); } Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java?rev=1484818&r1=1484817&r2=1484818&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java Tue May 21 14:31:49 2013 @@ -366,7 +366,7 @@ class PropertyConglomerate { if (saveServiceProperty(key,value)) return; - Dictionary defaults = (Dictionary) + Hashtable defaults = (Hashtable) readProperty(tc,AccessFactoryGlobals.DEFAULT_PROPERTY_NAME); if (defaults == null) defaults = new FormatableHashtable(); if (value==null)