mirror of
https://github.com/apache/openjpa.git
synced 2025-02-22 18:32:06 +00:00
OPENJPA-1695 OutOfMemoryError from CacheMarshallerImpl.setInputUrlFromResourceLocation
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@954979 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
152e5d2d4f
commit
efa71484df
@ -223,7 +223,7 @@ public class CacheMarshallerImpl
|
|||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
for (Enumeration e = cl.getResources(_inputResourceLocation);
|
for (Enumeration e = cl.getResources(_inputResourceLocation);
|
||||||
e.hasMoreElements(); )
|
e.hasMoreElements(); )
|
||||||
list.add(e);
|
list.add(e.nextElement());
|
||||||
|
|
||||||
if (list.size() > 1) {
|
if (list.size() > 1) {
|
||||||
if (_consumeErrors) {
|
if (_consumeErrors) {
|
||||||
|
@ -31,8 +31,9 @@ public class TestCacheMarshaller
|
|||||||
"default(Id=" + getClass().getName() + ", ValidationPolicy="
|
"default(Id=" + getClass().getName() + ", ValidationPolicy="
|
||||||
+ OpenJPAVersionAndConfigurationTypeValidationPolicy.class
|
+ OpenJPAVersionAndConfigurationTypeValidationPolicy.class
|
||||||
.getName()
|
.getName()
|
||||||
+ ", InputURL=file:target/" + getClass().getName() + ".ser"
|
+ ", InputURL=file:target/test-classes/"
|
||||||
+ ", OutputFile=target/"
|
+ getClass().getName() + ".ser"
|
||||||
|
+ ", OutputFile=target/test-classes/"
|
||||||
+ getClass().getName() + ".ser)"
|
+ getClass().getName() + ".ser)"
|
||||||
});
|
});
|
||||||
emf.createEntityManager().close();
|
emf.createEntityManager().close();
|
||||||
@ -67,4 +68,11 @@ public class TestCacheMarshaller
|
|||||||
cm.store(o);
|
cm.store(o);
|
||||||
assertEquals(o, cm.load());
|
assertEquals(o, cm.load());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testendConfiguration() {
|
||||||
|
((CacheMarshallerImpl)cm).setInputURL(null);
|
||||||
|
((CacheMarshallerImpl)cm)
|
||||||
|
.setInputResource(getClass().getName() + ".ser");
|
||||||
|
((CacheMarshallerImpl)cm).endConfiguration();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user