cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmen...@apache.org
Subject svn commit: r584617 - in /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne: access/ access/jdbc/ access/types/ conf/ query/ reflect/ xml/
Date Sun, 14 Oct 2007 21:40:37 GMT
Author: kmenard
Date: Sun Oct 14 14:40:36 2007
New Revision: 584617

URL: http://svn.apache.org/viewvc?rev=584617&view=rev
Log:
Removed redundant casts.

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLSelectColumnsTranslator.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/types/CalendarType.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/ServletUtil.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackEventHandler.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLDecoder.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLMappingDescriptor.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
Sun Oct 14 14:40:36 2007
@@ -311,8 +311,7 @@
 
         DataContext child = factory != null ? factory
                 .createDataContext(this, objectStore) : new DataContext(
-                (DataChannel) this,
-                objectStore);
+                this, objectStore);
 
         child.setValidatingObjectsOnCommit(isValidatingObjectsOnCommit());
         child.usingSharedSnaphsotCache = isUsingSharedSnapshotCache();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
Sun Oct 14 14:40:36 2007
@@ -600,7 +600,7 @@
 
         DataContext context;
         if (null == dataContextFactory) {
-            context = new DataContext((DataChannel) this, new ObjectStore(snapshotCache));
+            context = new DataContext(this, new ObjectStore(snapshotCache));
         }
         else {
             context = dataContextFactory.createDataContext(this, new ObjectStore(

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLSelectColumnsTranslator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLSelectColumnsTranslator.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLSelectColumnsTranslator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLSelectColumnsTranslator.java
Sun Oct 14 14:40:36 2007
@@ -67,7 +67,7 @@
                 String alias = this.lastAlias != null ? lastAlias : context
                         .getTableAlias(idPath, table.getFullyQualifiedName());
 
-                DbAttribute dbAttribute = (DbAttribute) attribute.getDbAttribute();
+                DbAttribute dbAttribute = attribute.getDbAttribute();
 
                 if (context.isAppendingResultColumns()) {
                     context.append(" #result('");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java
Sun Oct 14 14:40:36 2007
@@ -153,7 +153,7 @@
      * contents of the marker are cleared.
      */
     void switchToMarker(String marker, boolean reset) {
-        this.currentBuffer = (StringBuffer) findOrCreateMarkedBuffer(marker);
+        this.currentBuffer = findOrCreateMarkedBuffer(marker);
         if (reset) {
             this.currentBuffer.delete(0, this.currentBuffer.length());
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/types/CalendarType.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/types/CalendarType.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/types/CalendarType.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/types/CalendarType.java
Sun Oct 14 14:40:36 2007
@@ -160,7 +160,7 @@
     }
 
     protected Object convertToJdbcObject(Calendar value, int type) throws Exception {
-        Calendar calendar = (Calendar) value;
+        Calendar calendar = value;
 
         if (type == Types.DATE)
             return new java.sql.Date(calendar.getTimeInMillis());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/ServletUtil.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/ServletUtil.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/ServletUtil.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/ServletUtil.java
Sun Oct 14 14:40:36 2007
@@ -69,8 +69,7 @@
         Configuration oldConfig = Configuration.sharedConfiguration;
         if (oldConfig instanceof DefaultConfiguration) {
 
-            ResourceLocator locator = ((DefaultConfiguration) oldConfig)
-                    .getResourceLocator();
+            ResourceLocator locator = oldConfig.getResourceLocator();
 
             if (locator instanceof WebApplicationResourceLocator) {
                 if (((WebApplicationResourceLocator) locator).getServletContext() == context)
{

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
Sun Oct 14 14:40:36 2007
@@ -125,7 +125,7 @@
                     this.dataMap = (DataMap) root;
                 }
                 else if (root instanceof Persistent) {
-                    entity = resolver.lookupObjEntity((Persistent) root);
+                    entity = resolver.lookupObjEntity(root);
                     if (entity != null) {
                         this.dbEntity = entity.getDbEntity();
                         this.dataMap = entity.getDataMap();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackEventHandler.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackEventHandler.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackEventHandler.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackEventHandler.java
Sun Oct 14 14:40:36 2007
@@ -126,7 +126,7 @@
         // default listeners are invoked first
         if (!defaultListeners.isEmpty()
                 && !excludingDefaultListeners(object.getObjectId().getEntityName()))
{
-            Iterator it = (Iterator) defaultListeners.iterator();
+            Iterator it = defaultListeners.iterator();
             while (it.hasNext()) {
                 ((AbstractCallback) it.next()).performCallback(object);
             }
@@ -167,7 +167,7 @@
         Collection entityListeners = (Collection) listeners.get(key);
 
         if (entityListeners != null) {
-            Iterator it = (Iterator) entityListeners.iterator();
+            Iterator it = entityListeners.iterator();
             while (it.hasNext()) {
                 ((AbstractCallback) it.next()).performCallback(object);
             }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLDecoder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLDecoder.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLDecoder.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLDecoder.java
Sun Oct 14 14:40:36 2007
@@ -356,7 +356,7 @@
         }
 
         if ((null != dataContext) && (object instanceof Persistent)) {
-            dataContext.registerNewObject((Persistent) object);
+            dataContext.registerNewObject(object);
         }
 
         root = oldRoot;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLMappingDescriptor.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLMappingDescriptor.java?rev=584617&r1=584616&r2=584617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLMappingDescriptor.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/xml/XMLMappingDescriptor.java
Sun Oct 14 14:40:36 2007
@@ -245,7 +245,7 @@
         
         // If a data context has been supplied by the user, then register the data object
with the context.
         if ((null != dataContext) && (object instanceof Persistent)) {
-            dataContext.registerNewObject((Persistent) object);
+            dataContext.registerNewObject(object);
         }
 
         NamedNodeMap attributes = objectData.getAttributes();



Mime
View raw message