リファクタリング

This commit is contained in:
r-ca 2024-01-09 12:39:36 +09:00
parent 78525d634a
commit f36dc05db1
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -187,8 +187,7 @@ public class FileManagerImpl implements FileManager {
}
private void saveBitmapInternal(Bitmap bitmap) throws IOException {
try {
File file = this.path.toFile();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(file.toPath()));
bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(this.path));
} catch (Exception e) {
logger.error("saveBitmapInternal", e.getMessage());
throw new IOException("Failed to save bitmap");