APK反编译jd-gui代码分析(草稿记录)

1. 连续for循环

反编译代码:

 1 private void removeHideLines()
 2   {
 3     int i = 0;
 4     if (i >= this.lines.size()) {}
 5     for (int j = 0;; j++)
 6     {
 7       if (j >= this.recordLines.size())
 8       {
 9         return;
10         if (((MusicTrackLine)this.lines.get(i)).getX() + ((MusicTrackLine)this.lines.get(i)).getLength() <= 0) {
11           this.lines.remove(i);
12         }
13         i++;
14         break;
15       }
16       if (((MusicTrackLine)this.recordLines.get(j)).getX() + ((MusicTrackLine)this.recordLines.get(j)).getLength() <= 0) {
17         this.recordLines.remove(j);
18       }
19     }
20   }
View Code

实际代码:

 1 private void removeHideLines() {
 2         for (int i = 0; i < lines.size(); i++) {
 3             if (((MusicTrackLine) this.lines.get(i)).getX() + ((MusicTrackLine) this.lines.get(i)).getLength() <= 0) {
 4                 this.lines.remove(i);
 5             }
 6         }
 7         for (int j = 0; j < recordLines.size(); j++) {
 8             if (((MusicTrackLine) this.recordLines.get(j)).getX()
 9                     + ((MusicTrackLine) this.recordLines.get(j)).getLength() <= 0) {
10                 this.recordLines.remove(j);
11             }
12         }
13     }
View Code

 

posted @ 2014-08-04 15:54  清苑月明  阅读(658)  评论(0编辑  收藏  举报