abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r441273 - in /incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera: util/AbstractXPath.java util/ServiceUtil.java xpath/XPath.java
Date Thu, 07 Sep 2006 22:31:44 GMT
Author: jmsnell
Date: Thu Sep  7 15:31:43 2006
New Revision: 441273

URL: http://svn.apache.org/viewvc?view=rev&rev=441273
Log:
Rollback a change that breaks some compilers

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java?view=diff&rev=441273&r1=441272&r2=441273
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java
Thu Sep  7 15:31:43 2006
@@ -56,11 +56,11 @@
     return selectNodes(path, base, getDefaultNamespaces());
   }
 
-  public <T>T selectSingleNode(String path, Base base) throws XPathException {
+  public Object selectSingleNode(String path, Base base) throws XPathException {
     return selectSingleNode(path, base, getDefaultNamespaces());
   }
 
-  public <T>T evaluate(String path, Base base) throws XPathException {
+  public Object evaluate(String path, Base base) throws XPathException {
     return evaluate(path, base, getDefaultNamespaces());
   }
 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java?view=diff&rev=441273&r1=441272&r2=441273
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java
Thu Sep  7 15:31:43 2006
@@ -50,7 +50,7 @@
    * no instance is configured, the default class name will be used.  Returns
    * null if no instance can be created.
    */
-  public static <T>T newInstance(String id, String _default, Abdera abdera) {
+  public static Object newInstance(String id, String _default, Abdera abdera) {
     return locate(id, _default, abdera);
   }
 
@@ -112,11 +112,11 @@
     return Thread.currentThread().getContextClassLoader();
   }
   
-  public static <T>T locate(
+  public static Object locate(
     String id, 
     String _default, 
     Abdera abdera) {
-      T object = locate(id, abdera);
+      Object object = locate(id, abdera);
       if (object == null && _default != null) {
         object = locateInstance(getClassLoader(), _default, abdera);
       }
@@ -127,24 +127,24 @@
    * Locate a class instance for the given id
    */
   @SuppressWarnings("unchecked")
-  public static <T>T locate(String id, Abdera abdera) {
-    T service = checkAbderaConfiguration(id, abdera);
-    return ((service != null) ? service : (T)checkMetaInfServices(id, abdera));
+  public static Object locate(String id, Abdera abdera) {
+    Object service = checkAbderaConfiguration(id, abdera);
+    return ((service != null) ? service : checkMetaInfServices(id, abdera));
   }
   
   @SuppressWarnings("unchecked")
-  private static <T>T _create(Class _class, Abdera abdera) {
+  private static Object _create(Class _class, Abdera abdera) {
     if (_class == null) return null;
     try {
       if (abdera != null) {
         Constructor c = _class.getConstructor(new Class[] {Abdera.class});
-        return (T) c.newInstance(new Object[] {abdera});
+        return c.newInstance(new Object[] {abdera});
       }
     } catch (Exception e) {
       // Nothing
     }
     try {
-      return (T) _class.newInstance();
+      return _class.newInstance();
     } catch (Exception e) {
       // Nothing
     }
@@ -152,16 +152,16 @@
   }
   
   @SuppressWarnings("unchecked")
-  public static <T>T locateInstance(ClassLoader loader, String id, Abdera abdera) {
+  public static Object locateInstance(ClassLoader loader, String id, Abdera abdera) {
     try {
       Class _class = loader.loadClass(id);
-      return (T)_create(_class, abdera);
+      return _create(_class, abdera);
     } catch (Exception e) {
       // Nothing
     }
     try {
       Class _class = ClassLoader.getSystemClassLoader().loadClass(id);
-      return (T)_create(_class, abdera);
+      return _create(_class, abdera);
     } catch (Exception e) {
       // Nothing
     }
@@ -188,13 +188,13 @@
   }
   
   @SuppressWarnings("unchecked")
-  private static <T>T checkAbderaConfiguration(String id, Abdera abdera) {
+  private static Object checkAbderaConfiguration(String id, Abdera abdera) {
     String s = abdera.getConfiguration().getConfigurationOption(id);
-    return (s != null) ? (T)locateInstance(getClassLoader(), id, abdera) : null;
+    return (s != null) ? locateInstance(getClassLoader(), id, abdera) : null;
   }
   
-  private static <T>T checkMetaInfServices(String id, Abdera abdera) {
-    T object = null;
+  private static Object checkMetaInfServices(String id, Abdera abdera) {
+    Object object = null;
     String sid = "META-INF/services/" + id;
     ClassLoader loader = getClassLoader();
     BufferedReader buf = null;

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java?view=diff&rev=441273&r1=441272&r2=441273
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java Thu
Sep  7 15:31:43 2006
@@ -33,11 +33,11 @@
     String path, 
     Base base) throws XPathException;
   
-  <T>T selectSingleNode(
+  Object selectSingleNode(
     String path, 
     Base base) throws XPathException;
   
-  <T>T evaluate(
+  Object evaluate(
     String path, 
     Base base) throws XPathException;
   



Mime
View raw message