77
88// Google closure compiler cannot handle Clazz.new or Clazz.super
99
10+ // BH 2019.12.29 3.2.6 fixes Float.parseFloat$S("NaN") [and Double]
1011// BH 2019.12.23 3.2.6 update of System
1112// BH 2019.12.19 3.2.6 revision of $clinit$
1213// BH 2019.12.16 3.2.5.v4 adds ClassLoader static methods for system resources (just j2s/...)
@@ -66,7 +67,7 @@ Clazz.ClassFilesLoaded = [];
6667Clazz . popup = Clazz . log = Clazz . error = window . alert ;
6768
6869/* can be set by page JavaScript */
69- Clazz . defaultAssertionStatus = true ;
70+ Clazz . defaultAssertionStatus = false ;
7071
7172/* can be set by page JavaScript */
7273Clazz . _assertFunction = null ;
@@ -3459,6 +3460,8 @@ if (typeof arguments[0] != "object")this.c$(arguments[0]);
34593460var primTypes = { } ;
34603461
34613462var FALSE = function ( ) { return false } ;
3463+ var EMPTY_CLASSES = function ( ) { return Clazz . array ( Class , [ 0 ] ) } ;
3464+ var NULL_FUNC = function ( ) { return null } ;
34623465
34633466var setJ2STypeclass = function ( cl , type , paramCode ) {
34643467// TODO -- should be a proper Java.lang.Class
@@ -3473,6 +3476,8 @@ var setJ2STypeclass = function(cl, type, paramCode) {
34733476 cl . TYPE . toString = cl . TYPE . getName$ = cl . TYPE . getTypeName$
34743477 = cl . TYPE . getCanonicalName$ = cl . TYPE . getSimpleName$ = function ( ) { return type } ;
34753478 cl . TYPE . isAssignableFrom$Class = ( function ( t ) { return function ( c ) { return c == t } } ) ( cl . TYPE ) ;
3479+ cl . TYPE . getSuperclass$ = NULL_FUNC ;
3480+ cl . TYPE . getInterfaces$ = EMPTY_CLASSES ;
34763481}
34773482
34783483var decorateAsNumber = function ( clazz , qClazzName , type , PARAMCODE ) {
@@ -3906,6 +3911,8 @@ if(s==null){
39063911throw Clazz . new_ ( NumberFormatException . c$$S , [ "null" ] ) ;
39073912}
39083913if ( typeof s == "number" ) return s ; // important -- typeof NaN is "number" and is OK here
3914+ if ( s == "NaN" )
3915+ return NaN ;
39093916var floatVal = Number ( s ) ;
39103917if ( isNaN ( floatVal ) ) {
39113918throw Clazz . new_ ( NumberFormatException . c$$S , [ "Not a Number : " + s ] ) ;
@@ -3978,6 +3985,8 @@ if(s==null){
39783985 throw Clazz . new_ ( NumberFormatException . c$$S , [ "null" ] ) ;
39793986}
39803987if ( typeof s == "number" ) return s ; // important -- typeof NaN is "number" and is OK here
3988+ if ( s == "NaN" )
3989+ return NaN ;
39813990var doubleVal = Number ( s ) ;
39823991if ( isNaN ( doubleVal ) ) {
39833992throw Clazz . new_ ( NumberFormatException . c$$S , [ "Not a Number : " + s ] ) ;
0 commit comments