@@ -122,7 +122,7 @@ public M getCacheItem(List<M> list, int position, SQLConfig<T, M, L> config) {
122122 }
123123
124124 M result = position >= list .size () ? null : list .get (position );
125- return result != null ? result : createJSONObject ();
125+ return result != null ? result : ( M ) JSON . createJSONObject ();
126126 }
127127
128128
@@ -212,7 +212,7 @@ public M execute(@NotNull SQLConfig<T, M, L> config, boolean unknownType) throws
212212 executedSQLDuration += System .currentTimeMillis () - executedSQLStartTime ;
213213 }
214214
215- result = createJSONObject ();
215+ result = ( M ) JSON . createJSONObject ();
216216 result .put (JSONResponse .KEY_COUNT , updateCount );
217217 result .put ("update" , updateCount >= 0 );
218218 //导致后面 rs.getMetaData() 报错 Operation not allowed after ResultSet closed result.put("moreResults", statement.getMoreResults());
@@ -408,7 +408,7 @@ public M execute(@NotNull SQLConfig<T, M, L> config, boolean unknownType) throws
408408 index ++;
409409 Log .d (TAG , "\n \n <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n execute while (rs.next()){ index = " + index + "\n \n " );
410410
411- M item = createJSONObject ();
411+ M item = ( M ) JSON . createJSONObject ();
412412 M viceItem = null ;
413413 M curItem = item ;
414414 boolean isMain = true ;
@@ -629,7 +629,7 @@ else if (curJoin.isOuterJoin() || curJoin.isAntiJoin()) {
629629 else {
630630 String viceName = viceConfig .getTableKey ();
631631 if (viceItem == null ) {
632- viceItem = createJSONObject ();
632+ viceItem = ( M ) JSON . createJSONObject ();
633633 }
634634 curItem = JSON .get (viceItem , viceName );
635635
@@ -638,7 +638,7 @@ else if (curJoin.isOuterJoin() || curJoin.isAntiJoin()) {
638638
639639 if (curItem == null || curItem .isEmpty ()) {
640640 // 导致前面判断重复 key 出错 curItem = curCache != null ? curCache : new M(true);
641- curItem = createJSONObject ();
641+ curItem = ( M ) JSON . createJSONObject ();
642642 viceItem .put (viceName , curItem );
643643 if (hasPK && curCache == null ) {
644644 childMap .put (viceSql , curItem );
@@ -688,7 +688,7 @@ else if (hasPK) {
688688 if (unknownType || isExplain ) {
689689 if (isExplain ) {
690690 if (result == null ) {
691- result = createJSONObject ();
691+ result = ( M ) JSON . createJSONObject ();
692692 }
693693 config .setExplain (false );
694694 result .put ("sql" , config .getSQL (false ));
@@ -723,13 +723,13 @@ else if (hasPK) {
723723
724724 // 数组主表对象额外一次返回全部,方便 Parser<T, M, L> 缓存来提高性能
725725
726- result = position >= resultList .size () ? createJSONObject () : resultList .get (position );
726+ result = position >= resultList .size () ? ( M ) JSON . createJSONObject () : resultList .get (position );
727727 if (position == 0 && resultList .size () > 1 && result != null && result .isEmpty () == false ) {
728728 // 不是 main 不会直接执行,count=1 返回的不会超过 1 && config.isMain() && config.getCount() != 1
729729 Log .i (TAG , ">>> execute position == 0 && resultList.size() > 1 && result != null && result.isEmpty() == false"
730730 + " >> result = new M(result); result.put(KEY_RAW_LIST, resultList);" );
731731
732- result = createJSONObject ();
732+ result = ( M ) JSON . createJSONObject (result );
733733 result .put (KEY_RAW_LIST , resultList );
734734 }
735735 }
@@ -909,7 +909,7 @@ protected void executeAppJoin(SQLConfig<T, M, L> config, List<M> resultList, Map
909909 index ++;
910910 Log .d (TAG , "\n \n <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n executeAppJoin while (rs.next()){ index = " + index + "\n \n " );
911911
912- M result = createJSONObject ();
912+ M result = ( M ) JSON . createJSONObject ();
913913
914914 for (int i = 1 ; i <= length ; i ++) {
915915 result = onPutColumn (jc , rs , rsmd , index , result , i , null , null , keyMap );
@@ -1135,7 +1135,7 @@ else if (value instanceof Clob) { //SQL Server TEXT 类型 居然走这个
11351135 }
11361136 if (castToJson ) {
11371137 try {
1138- value = parseJSON (( String ) value );
1138+ value = JSON . parseJSON (value );
11391139 } catch (Exception e ) {
11401140 Log .e (TAG , "getValue try { value = parseJSON((String) value); } catch (Exception e) { \n " + e .getMessage ());
11411141 }
0 commit comments