Why is final variable not inspectable?

150 Views Asked by At

I'm reworking some code to make it usable with the new RootTools 3.0 (which fixes an important bug):

One section I rewrote looks like this, with a callback-class for better readability. I'm adding the size of two directories to tell the total of browser cache that may be cleared:

@Override
protected void onResume() {
    super.onResume();
    //Refresh views:
    try {
        //Show browser's cache size:
        ShellCommands.getListing("/data/data/com.android.browser/app_databases/", null, new Callback<SumSize>() {
            @Override
            public void call(SumSize localstore) throws InterruptedException, IOException, TimeoutException, RootDeniedException {
                final SumSize total = localstore;
                getFirefoxProfiles(new Callback<String>() {
                    @Override
                    public void call(String input) throws InterruptedException, IOException, TimeoutException, RootDeniedException {
                        ShellCommands.getListing(input+"/Cache/", null, new Callback<SumSize>() {
                            @Override
                            public void call(SumSize input) {
                                total.add(input);
                                ((TextView)findViewById(R.id.lblClearBrowser)).setText(total.getReadable());
                            }
                        });
                    }
                });
            }
        });

A bit more complex than it was with the .waitforfinish, but I'm having a serious problem in debugging: the inner most call(SumSize input) seems to work correctly, but there is no way to see what the total is when debugging. Is this a bug in Java with final outer variables? A bug in Android? A bug in Eclipse?

1

There are 1 best solutions below

1
On

Your Variables view needs to be set to Show Constants. You can toggle this from the Java section of its local menu.