31
31
import javafx .beans .value .WritableBooleanValue ;
32
32
import com .sun .javafx .binding .Logging ;
33
33
34
- import java .security .AccessControlContext ;
35
- import java .security .AccessController ;
36
- import java .security .PrivilegedAction ;
37
-
38
34
/**
39
35
* This class provides a full implementation of a {@link Property} wrapping a
40
36
* {@code boolean} value.
@@ -141,7 +137,6 @@ public static BooleanProperty booleanProperty(final Property<Boolean> property)
141
137
throw new NullPointerException ("Property cannot be null" );
142
138
}
143
139
return property instanceof BooleanProperty ? (BooleanProperty )property : new BooleanPropertyBase () {
144
- private final AccessControlContext acc = AccessController .getContext ();
145
140
{
146
141
BidirectionalBinding .bind (this , property );
147
142
}
@@ -155,18 +150,6 @@ public Object getBean() {
155
150
public String getName () {
156
151
return property .getName ();
157
152
}
158
-
159
- @ Override
160
- protected void finalize () throws Throwable {
161
- try {
162
- AccessController .doPrivileged ((PrivilegedAction <Void >) () -> {
163
- BidirectionalBinding .unbind (property , this );
164
- return null ;
165
- }, acc );
166
- } finally {
167
- super .finalize ();
168
- }
169
- }
170
153
};
171
154
}
172
155
@@ -182,7 +165,6 @@ protected void finalize() throws Throwable {
182
165
@ Override
183
166
public ObjectProperty <Boolean > asObject () {
184
167
return new ObjectPropertyBase <Boolean > () {
185
- private final AccessControlContext acc = AccessController .getContext ();
186
168
{
187
169
BidirectionalBinding .bind (this , BooleanProperty .this );
188
170
}
@@ -196,19 +178,6 @@ public Object getBean() {
196
178
public String getName () {
197
179
return BooleanProperty .this .getName ();
198
180
}
199
-
200
- @ Override
201
- protected void finalize () throws Throwable {
202
- try {
203
- AccessController .doPrivileged ((PrivilegedAction <Void >) () -> {
204
- BidirectionalBinding .unbind (this , BooleanProperty .this );
205
- return null ;
206
- }, acc );
207
- } finally {
208
- super .finalize ();
209
- }
210
- }
211
-
212
181
};
213
182
}
214
183
}
0 commit comments