xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1572882 - /xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java
Date Fri, 28 Feb 2014 08:51:40 GMT
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


Mime
View raw message