* more simple warning message if xattr is not supported
This commit is contained in:
parent
b8c8071127
commit
48742c56af
|
@ -1,7 +1,6 @@
|
||||||
package net.filebot;
|
package net.filebot;
|
||||||
|
|
||||||
import static java.nio.file.Files.isSymbolicLink;
|
import static java.nio.file.Files.*;
|
||||||
import static java.nio.file.Files.readSymbolicLink;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -95,7 +94,7 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalStateException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null; // since we don't know the old value
|
return null; // since we don't know the old value
|
||||||
|
@ -124,7 +123,7 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
||||||
}
|
}
|
||||||
return entries;
|
return entries;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalStateException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +134,7 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
||||||
this.put(key, null);
|
this.put(key, null);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalStateException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,16 +47,16 @@ public class MetaAttributes {
|
||||||
public void setObject(Object object) {
|
public void setObject(Object object) {
|
||||||
try {
|
try {
|
||||||
metaAttributeView.put(METADATA_KEY, JsonWriter.objectToJson(object));
|
metaAttributeView.put(METADATA_KEY, JsonWriter.objectToJson(object));
|
||||||
} catch (Exception e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e); // unlikely to ever happen JSON serialization issues
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getObject() {
|
public Object getObject() {
|
||||||
try {
|
try {
|
||||||
return JsonReader.jsonToJava(metaAttributeView.get(METADATA_KEY));
|
return JsonReader.jsonToJava(metaAttributeView.get(METADATA_KEY));
|
||||||
} catch (Exception e) {
|
} catch (IOException e) {
|
||||||
return null; // ignore JSON serialization issues
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue