ICUNotifier.java
2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.agl.impl;
import java.util.EventListener;
import java.util.LinkedList;
import java.util.List;
public abstract class ICUNotifier {
private final Object notifyLock = new Object();
private NotifyThread notifyThread;
private List listeners;
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public void notifyChanged() {
if (this.listeners != null) {
Object object = this.notifyLock;
synchronized (object) {
if (this.listeners != null) {
if (this.notifyThread == null) {
this.notifyThread = new NotifyThread(this);
this.notifyThread.setDaemon(true);
this.notifyThread.start();
}
this.notifyThread.queue(this.listeners.toArray());
}
}
}
}
protected abstract void notifyListener(EventListener var1);
private static class NotifyThread
extends Thread {
private final ICUNotifier notifier;
private final List queue = new LinkedList();
NotifyThread(ICUNotifier notifier) {
this.notifier = notifier;
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public void queue(Object[] list) {
NotifyThread notifyThread = this;
synchronized (notifyThread) {
this.queue.add(list);
this.notify();
}
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public void run() {
do {
try {
block6 : do {
Object[] list;
NotifyThread notifyThread = this;
synchronized (notifyThread) {
while (this.queue.isEmpty()) {
this.wait();
}
list = (Object[])this.queue.remove(0);
}
int i = 0;
do {
if (i >= list.length) continue block6;
this.notifier.notifyListener((EventListener)list[i]);
++i;
} while (true);
break;
} while (true);
}
catch (InterruptedException e) {
continue;
}
break;
} while (true);
}
}
}