fixed critical errors
This commit is contained in:
parent
8675f0a2a9
commit
db32b26ea7
@ -59,6 +59,8 @@ import java.util.List;
|
||||
@Repository
|
||||
public class FileRepositoryImpl implements FileRepository {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(FileRepositoryImpl.class);
|
||||
|
||||
protected static final int STANDARD_INTERVAL_LENGTH = 100;
|
||||
protected static final String ROOT_PATH = "root/";
|
||||
protected static final String PROJECTS_PATH = "projects/";
|
||||
@ -69,7 +71,6 @@ public class FileRepositoryImpl implements FileRepository {
|
||||
protected static final String FINAL_SEMINAR_OPPOSITION_REPORT_PATH = "opposition_reports/";
|
||||
protected static final String FINAL_SEMINAR_THESIS_REVIEW_PATH = "thesis_reviews/";
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(FileRepositoryImpl.class);
|
||||
@Autowired(required = false)
|
||||
private RepositoryManager repositoryManager;
|
||||
|
||||
@ -107,14 +108,14 @@ public class FileRepositoryImpl implements FileRepository {
|
||||
try {
|
||||
file.setProperty("sp:userId", uploader.getId());
|
||||
file.setProperty("sp:isThesisFile", isThesisFile);
|
||||
} catch (RuntimeException disregarded) {
|
||||
disregarded.printStackTrace();
|
||||
} catch (RuntimeException e) {
|
||||
logger.warn("Error while setting file properties", e);
|
||||
}
|
||||
|
||||
session.save();
|
||||
identifier = fileContent.getIdentifier();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Error while storing file", e);
|
||||
throw new FileStorageException("Error while storing file", e);
|
||||
}
|
||||
return identifier;
|
||||
|
Loading…
x
Reference in New Issue
Block a user