• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jiangxincode / ApkToolBoxGUI / #1207

13 Sep 2025 11:58PM UTC coverage: 2.895% (-0.006%) from 2.901%
#1207

push

jiangxincode
fix #569: 可能在完全初始化子类之前逃逸了 'this'

0 of 32 new or added lines in 22 files covered. (0.0%)

9 existing lines in 8 files now uncovered.

248 of 8567 relevant lines covered (2.89%)

0.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/edu/jiangxin/apktoolbox/swing/extend/plugin/runnable/AbstractRunnable.java
1
package edu.jiangxin.apktoolbox.swing.extend.plugin.runnable;
2

3
import edu.jiangxin.apktoolbox.swing.extend.plugin.IPreparePluginCallback;
4
import edu.jiangxin.apktoolbox.swing.extend.plugin.ProgressBarDialog;
5

6
import javax.swing.*;
7

8
public abstract class AbstractRunnable implements Runnable {
9
    protected final IPreparePluginCallback callback;
10
    protected final ProgressBarDialog progressBarDialog;
11
    protected int progress = 0;
×
12
    protected boolean isCancelled = false;
×
13
    protected boolean isFinished = false;
×
14

15
    protected AbstractRunnable(String dialogTitle, IPreparePluginCallback callback) {
×
16
        this.callback = callback;
×
NEW
17
        this.progressBarDialog = new ProgressBarDialog();
×
NEW
18
        this.progressBarDialog.initialize(dialogTitle);
×
UNCOV
19
        progressBarDialog.addWindowListener(new java.awt.event.WindowAdapter() {
×
20
            @Override
21
            public void windowClosing(java.awt.event.WindowEvent windowEvent) {
22
                cancel();
×
23
            }
×
24
        });
25

26
        Timer timer = new Timer(1000, e -> {
×
27
            if (isFinished || isCancelled) {
×
28
                ((Timer) e.getSource()).stop();
×
29
                progressBarDialog.dispose();
×
30
            } else {
31
                progressBarDialog.setValue(progress);
×
32
            }
33
        });
×
34
        timer.start();
×
35
    }
×
36

37
    protected void cancel() {
38
        isCancelled = true;
×
39
    }
×
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc