You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stefan Bodewig <bo...@apache.org> on 2005/01/26 16:38:41 UTC

[DISCOVERY] Make it compile on JDK 1.5

subject says it all.  Some trivial "enum" replacements.

Stefan

Index: src/java/org/apache/commons/discovery/resource/DiscoverResources.java
===================================================================
RCS file: /home/cvspublic/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/DiscoverResources.java,v
retrieving revision 1.4
diff -u -r1.4 DiscoverResources.java
--- src/java/org/apache/commons/discovery/resource/DiscoverResources.java	27 Feb 2004 23:36:55 -0000	1.4
+++ src/java/org/apache/commons/discovery/resource/DiscoverResources.java	26 Jan 2005 15:38:07 -0000
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation
+ * Copyright 1999-2005 The Apache Software Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -108,9 +108,9 @@
                     if (log.isDebugEnabled())
                         log.debug("getNextResources: search using ClassLoader '" + loader + "'");
                     try {
-                        Enumeration enum = JDKHooks.getJDKHooks().getResources(loader, resourceName);
-                        if (enum != null && enum.hasMoreElements()) {
-                            return enum;
+                        Enumeration e = JDKHooks.getJDKHooks().getResources(loader, resourceName);
+                        if (e != null && e.hasMoreElements()) {
+                            return e;
                         }
                     } catch( IOException ex ) {
                         log.warn("getNextResources: Ignoring Exception", ex);

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


Re: [DISCOVERY] Make it compile on JDK 1.5

Posted by Davanum Srinivas <da...@gmail.com>.
fixed.

-- dims


On Wed, 26 Jan 2005 16:38:41 +0100, Stefan Bodewig <bo...@apache.org> wrote:
> subject says it all.  Some trivial "enum" replacements.
> 
> Stefan
> 
> Index: src/java/org/apache/commons/discovery/resource/DiscoverResources.java
> ===================================================================
> RCS file: /home/cvspublic/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/DiscoverResources.java,v
> retrieving revision 1.4
> diff -u -r1.4 DiscoverResources.java
> --- src/java/org/apache/commons/discovery/resource/DiscoverResources.java       27 Feb 2004 23:36:55 -0000      1.4
> +++ src/java/org/apache/commons/discovery/resource/DiscoverResources.java       26 Jan 2005 15:38:07 -0000
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright 1999-2004 The Apache Software Foundation
> + * Copyright 1999-2005 The Apache Software Foundation
>   *
>   * Licensed under the Apache License, Version 2.0 (the "License");
>   * you may not use this file except in compliance with the License.
> @@ -108,9 +108,9 @@
>                      if (log.isDebugEnabled())
>                          log.debug("getNextResources: search using ClassLoader '" + loader + "'");
>                      try {
> -                        Enumeration enum = JDKHooks.getJDKHooks().getResources(loader, resourceName);
> -                        if (enum != null && enum.hasMoreElements()) {
> -                            return enum;
> +                        Enumeration e = JDKHooks.getJDKHooks().getResources(loader, resourceName);
> +                        if (e != null && e.hasMoreElements()) {
> +                            return e;
>                          }
>                      } catch( IOException ex ) {
>                          log.warn("getNextResources: Ignoring Exception", ex);
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

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