Re: [xwiki-devs] [xwiki-notifications] r31066 - platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal
On 09/13/2010 01:34 PM, tmortagne (SVN) wrote:
Author: tmortagne Date: 2010-09-13 13:34:11 +0200 (Mon, 13 Sep 2010) New Revision: 31066
Modified: platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java Log: XWIKI-5482: URIClassLoader#findResources can return infinite Enumeration
Modified: platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java =================================================================== --- platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java 2010-09-13 09:06:31 UTC (rev 31065) +++ platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java 2010-09-13 11:34:11 UTC (rev 31066) @@ -803,7 +803,11 @@ fetchNext(); if (next == null)
Codestyle, there should be {} around the next line.
throw new NoSuchElementException(); - return next; + + Object nextElement = next; + next = null; + + return nextElement; }
private void fetchNext()
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Mon, Sep 13, 2010 at 14:58, Sergiu Dumitriu <[email protected]> wrote:
On 09/13/2010 01:34 PM, tmortagne (SVN) wrote:
Author: tmortagne Date: 2010-09-13 13:34:11 +0200 (Mon, 13 Sep 2010) New Revision: 31066
Modified: platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java Log: XWIKI-5482: URIClassLoader#findResources can return infinite Enumeration
Modified: platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java =================================================================== --- platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java 2010-09-13 09:06:31 UTC (rev 31065) +++ platform/core/trunk/xwiki-classloader/src/main/java/org/xwiki/classloader/internal/ResourceLoader.java 2010-09-13 11:34:11 UTC (rev 31066) @@ -803,7 +803,11 @@ fetchNext(); if (next == null)
Codestyle, there should be {} around the next line.
Sure but this is not part of my commit.
throw new NoSuchElementException(); - return next; + + Object nextElement = next; + next = null; + + return nextElement; }
private void fetchNext()
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (2)
-
Sergiu Dumitriu -
Thomas Mortagne