@@ -134,25 +134,14 @@ protected ProgressiveRendering() {
134134 ((ScheduledExecutorService ) executorService ).schedule (new Runnable () {
135135 @ Override public void run () {
136136 LOG .log (Level .FINE , "some time has elapsed since {0} finished, so releasing" , boundId );
137- release ();
137+ boundObjectTable . release (boundId );
138138 }
139139 }, timeout () /* add some grace period for browser/network overhead */ * 2 , TimeUnit .MILLISECONDS );
140140 }
141141 }
142142 });
143143 }
144144
145- /** {@link BoundObjectTable#releaseMe} just cannot work the way we need it to. */
146- private void release () {
147- try {
148- Method release = BoundObjectTable .Table .class .getDeclaredMethod ("release" , String .class );
149- release .setAccessible (true );
150- release .invoke (boundObjectTable , boundId );
151- } catch (Exception x ) {
152- LOG .log (Level .WARNING , "failed to unbind " + boundId , x );
153- }
154- }
155-
156145 /**
157146 * Copies important fields from the current HTTP request and makes them available during {@link #compute}.
158147 * This is necessary because some model methods such as {@link AbstractItem#getUrl} behave differently when called from a request.
@@ -281,7 +270,7 @@ protected final boolean canceled() {
281270 r .put ("status" , statusJSON );
282271 if (statusJSON instanceof String ) { // somehow completed
283272 LOG .log (Level .FINE , "finished in news so releasing {0}" , boundId );
284- release ();
273+ boundObjectTable . release (boundId );
285274 }
286275 lastNewsTime = System .currentTimeMillis ();
287276 LOG .log (Level .FINER , "news from {0}" , uri );
0 commit comments