Sonar-CachingFileAccess.java
[aaf/authz.git] / auth / auth-core / src / main / java / org / onap / aaf / auth / rserv / CachingFileAccess.java
index a269f24..ac87d80 100644 (file)
@@ -131,6 +131,12 @@ public class CachingFileAccess<TRANS extends Trans> extends HttpCode<TRANS, Void
         typeMap.put("props", "text/plain");
         typeMap.put("jks", "application/octet-stream");
         
+        // Fonts
+        typeMap.put("ttf","font/ttf");
+        typeMap.put("woff","font/woff");
+        typeMap.put("woff2","font/woff2");
+
+        
         timer = new Timer("Caching Cleanup",true);
         timer.schedule(new Cleanup(content,500),60000,60000);
         
@@ -139,12 +145,18 @@ public class CachingFileAccess<TRANS extends Trans> extends HttpCode<TRANS, Void
         env.init().log("CachingFileAccess path: " + new File(web_path).getCanonicalPath());
         Object obj;
         obj = env.get(env.staticSlot(CFA_CACHE_CHECK_INTERVAL),600000L);  // Default is 10 mins
-        if (obj instanceof Long) {checkInterval=(Long)obj;
-        } else {checkInterval=Long.parseLong((String)obj);}
+        if (obj instanceof Long) {
+          checkInterval=(Long)obj;
+        } else {
+          checkInterval=Long.parseLong((String)obj);
+        }
         
         obj = env.get(env.staticSlot(CFA_MAX_SIZE), 512000);    // Default is max file 500k
-        if (obj instanceof Integer) {maxItemSize=(Integer)obj;
-        } else {maxItemSize =Integer.parseInt((String)obj);}
+        if (obj instanceof Integer) {
+          maxItemSize=(Integer)obj;
+        } else {
+          maxItemSize =Integer.parseInt((String)obj);
+        }
               
          clear_command = env.getProperty(CFA_CLEAR_COMMAND,null);
     }