You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by js...@apache.org on 2014/02/28 09:51:40 UTC
svn commit: r1572882 -
/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java
Author: jsy
Date: Fri Feb 28 08:51:39 2014
New Revision: 1572882
URL: http://svn.apache.org/r1572882
Log:
Fix to ensure oom error gets to system error handler
Modified:
xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java
Modified: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java?rev=1572882&r1=1572881&r2=1572882&view=diff
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java (original)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java Fri Feb 28 08:51:39 2014
@@ -2823,9 +2823,9 @@ public final class Locale
if (--_numTempFramesLeft <= 0)
{
- Cur[] newTempFrames = new Cur[(_numTempFramesLeft =
- _tempFrames.length) *
- 2];
+ Cur[] newTempFrames = new Cur[_tempFrames.length * 2];
+ //move this assignment down so if array allocation fails, error is not masked
+ _numTempFramesLeft = _tempFrames.length;
System.arraycopy(_tempFrames, 0, newTempFrames, 0,
_tempFrames.length);
_tempFrames = newTempFrames;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org