Object value = t.getAttr(orig, attrName);
public Object readAttribute(String name, String attrName) { Table t; String[] arr = new String[2]; split(name, arr); /** At the momement substitutes lack of API */ if (attrName.equals(READONLY_ATTRIBUTES)) { return info.readOnly(arr[0]) ? Boolean.TRUE : Boolean.FALSE; } synchronized (this) { // synchronized so only one table for each folder // can exist t = loadTable(arr[0]); } // JST: // had to split the code to do getAttr out of synchronized block // because the attribute can be serialized FileObject and // so the code returns back to FileSystem (that is usually synchronized) // // this leads to deadlocks between FS & DefaultAttributes implementation // // I do not know if the table should not be somehow synchronized, // but it seems ok. return t.getAttr(arr[1], attrName); }
Object prev = t.getAttr(arr[1], attrName);
Object value = t.getAttr (orig, attrName); if (value != null) { obj.setAttribute (attrName, value);
Object value = t.getAttr (orig, attrName); if (value != null) { obj.setAttribute (attrName, value);
Object prev = t.getAttr(arr[1], attrName);
Object prev = t.getAttr(arr[1], attrName);
public Object readAttribute(String name, String attrName) { Table t; String[] arr = new String[2]; split (name, arr); /** At the momement substitutes lack of API */ if (attrName.equals (READONLY_ATTRIBUTES)) return info.readOnly(arr[0]) ? Boolean.TRUE : Boolean.FALSE; synchronized (this) { // synchronized so only one table for each folder // can exist t = loadTable (arr[0]); } // JST: // had to split the code to do getAttr out of synchronized block // because the attribute can be serialized FileObject and // so the code returns back to FileSystem (that is usually synchronized) // // this leads to deadlocks between FS & DefaultAttributes implementation // // I do not know if the table should not be somehow synchronized, // but it seems ok. return t.getAttr (arr[1], attrName); }
public Object readAttribute(String name, String attrName) { Table t; String[] arr = new String[2]; split (name, arr); /** At the momement substitutes lack of API */ if (attrName.equals (READONLY_ATTRIBUTES)) return info.readOnly(arr[0]) ? Boolean.TRUE : Boolean.FALSE; synchronized (this) { // synchronized so only one table for each folder // can exist t = loadTable (arr[0]); } // JST: // had to split the code to do getAttr out of synchronized block // because the attribute can be serialized FileObject and // so the code returns back to FileSystem (that is usually synchronized) // // this leads to deadlocks between FS & DefaultAttributes implementation // // I do not know if the table should not be somehow synchronized, // but it seems ok. return t.getAttr (arr[1], attrName); }