This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 29356
Collapse All | Expand All

(-)src/org/netbeans/core/projects/cache/BinaryFS.java (-1 / +19 lines)
Lines 14-19 Link Here
14
package org.netbeans.core.projects.cache;
14
package org.netbeans.core.projects.cache;
15
15
16
import java.io.*;
16
import java.io.*;
17
import java.lang.reflect.Field;
17
import java.lang.reflect.Method;
18
import java.lang.reflect.Method;
18
import java.net.URL;
19
import java.net.URL;
19
import java.util.*;
20
import java.util.*;
Lines 377-383 Link Here
377
        public Object getAttribute(String attrName) {
378
        public Object getAttribute(String attrName) {
378
            initialize();
379
            initialize();
379
            AttrImpl attr = (AttrImpl)attrs.get(attrName);
380
            AttrImpl attr = (AttrImpl)attrs.get(attrName);
380
            return attr == null ? null : attr.getValue(this, attrName);
381
            if (attr != null) {
382
                FileObject topFO = null;
383
                try {
384
                    Class mfoClass = Class.forName("org.openide.filesystems.MultiFileObject"); //NOI18N
385
                    Field field = mfoClass.getDeclaredField("attrAskedFileObject"); //NOI18N
386
                    field.setAccessible(true);
387
    
388
                    ThreadLocal attrAskedFileObject = (ThreadLocal) field.get(null);
389
                    topFO = (FileObject) attrAskedFileObject.get();
390
                    attrAskedFileObject.set(null);
391
                } catch (Exception e) {
392
                    ErrorManager.getDefault().notify(e);
393
                }
394
395
                return attr.getValue(topFO == null ? this : topFO, attrName);
396
            } else {
397
                return null;
398
            }
381
        }
399
        }
382
        
400
        
383
        /** Get all file attribute names for this file. */
401
        /** Get all file attribute names for this file. */

Return to bug 29356