db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1195307 - /db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationSaxHandler.java
Date Mon, 31 Oct 2011 02:04:30 GMT
Author: tfischer
Date: Mon Oct 31 02:04:30 2011
New Revision: 1195307

URL: http://svn.apache.org/viewvc?rev=1195307&view=rev
Log:
removed unnecessary instanceof check and cast

Modified:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationSaxHandler.java

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationSaxHandler.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationSaxHandler.java?rev=1195307&r1=1195306&r2=1195307&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationSaxHandler.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationSaxHandler.java
Mon Oct 31 02:04:30 2011
@@ -288,19 +288,7 @@ public class OutletConfigurationSaxHandl
         for (UntypedOutletSaxHandlerFactory candidate
                 : outletTypes.getUntypedOutletHandlerFactories())
         {
-            if (! (candidate instanceof 
-                    UntypedOutletSaxHandlerFactory))
-            {
-                throw new SAXException(
-                        "OutletSaxHandlerFactory of type " 
-                            + candidate.getClass()
-                                .getName()
-                            + " has returned null as type but is not"
-                            + " of type UntypedOutletSaxHandlerFactory;"
-                            + " this is an error.");
-            }
-            if (((UntypedOutletSaxHandlerFactory) candidate).canHandle(
-                    outletType))
+            if (candidate.canHandle(outletType))
             {
                 untypedHandlerFactory = candidate;
                 break;



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message