Commits

Anonymous committed 21ba403

Cleanup, hardening, and performance increases

  • Participants
  • Parent commits cf54643

Comments (0)

Files changed (3)

src/java/com/mpbsoftware/Web/services/Expenses.java

                 JsonConfig jc = new JsonConfig();
                 jc.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT);
                 jc.setIgnoreJPATransient(true);              
-
+                 String[] sa = new String[]{"password","assignedTasks","completedTasks","createdTasks","created_expenses","authCode"};
+                jc.setExcludes(sa);
                 //send out the expenses
                 response.getWriter().println(JSONSerializer.toJSON(expenses,jc));
                 

src/java/com/mpbsoftware/Web/services/GetRoom.java

                 JsonConfig jConfig = new JsonConfig();
                 jConfig.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT);
                 jConfig.setIgnoreJPATransient(true);
-
+                 String[] sa = new String[]{"password","assignedTasks","completedTasks","createdTasks","created_expenses","authCode"};
+                jConfig.setExcludes(sa);
                 //send out the room
                 printWriter.println(JSONSerializer.toJSON(room, jConfig));
             } catch (Exception e) {
               for(var j=0;td2[i].sums.length > j; j++){
                   data2.setValue(j, 0, " " + td2[i].sums[j].month);
                   for(var k =0;td2.length > k;k++){
-                      data2.setValue(j, k+1,  td2[k].sums[j].sum);
+                      if(td2[k].sums.length> j)
+                        data2.setValue(j, k+1,  td2[k].sums[j].sum);
                   }
                   
               }