1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 08:25:02 -04:00

* more simple warning message if xattr is not supported

This commit is contained in:
Reinhard Pointner 2014-07-17 16:28:52 +00:00
parent b8c8071127
commit 48742c56af
2 changed files with 8 additions and 9 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}