Skip to content
Snippets Groups Projects
Commit f809e774 authored by srosse's avatar srosse
Browse files

OO-2076: fix NPE if the fileName is null

parent 57e25b56
No related branches found
No related tags found
No related merge requests found
......@@ -56,12 +56,12 @@ public class SortedProperties extends Properties {
*
* @see java.util.Hashtable#keys()
*/
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "cast" })
@Override
public synchronized Enumeration<Object> keys() {
// sort elements based on detector (prop key) names
Set set = keySet();
return sortKeys(set);
return (Enumeration<Object>)sortKeys(set);
}
/**
......
......@@ -122,7 +122,9 @@ public class VideoHandler extends FileHandler {
displayname, description, resource, RepositoryEntry.ACC_OWNERS);
DBFactory.getInstance().commit();
if(fileName == null) {
fileName = file.getName();
}
fileName = fileName.toLowerCase();
VFSLeaf importFile = new LocalFileImpl(file);
VideoManager videoManager = CoreSpringFactory.getImpl(VideoManager.class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment