* 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;
|
||||
|
||||
import static java.nio.file.Files.isSymbolicLink;
|
||||
import static java.nio.file.Files.readSymbolicLink;
|
||||
import static java.nio.file.Files.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -95,7 +94,7 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new IllegalStateException(e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return null; // since we don't know the old value
|
||||
|
@ -124,7 +123,7 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
|||
}
|
||||
return entries;
|
||||
} 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);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new IllegalStateException(e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,16 +47,16 @@ public class MetaAttributes {
|
|||
public void setObject(Object object) {
|
||||
try {
|
||||
metaAttributeView.put(METADATA_KEY, JsonWriter.objectToJson(object));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e); // unlikely to ever happen JSON serialization issues
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Object getObject() {
|
||||
try {
|
||||
return JsonReader.jsonToJava(metaAttributeView.get(METADATA_KEY));
|
||||
} catch (Exception e) {
|
||||
return null; // ignore JSON serialization issues
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue