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/