diff options
Diffstat (limited to 'auth/auth-core')
13 files changed, 23 insertions, 23 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/local/TextIndex.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/local/TextIndex.java index 6ef6a769..39225f74 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/local/TextIndex.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/local/TextIndex.java @@ -89,7 +89,7 @@ public class TextIndex { } } - List<Integer> entries = new ArrayList<Integer>(); + List<Integer> entries = new ArrayList<>(); for(int i=min;i<=max;++i) { ttok.pos(i*REC_SIZE); tib.rewind(); @@ -127,7 +127,7 @@ public class TextIndex { public void create(final Trans trans,final DataFile data, int maxLine, char delim, int fieldOffset, int skipLines) throws IOException { FileChannel fos; - List<Idx> list = new LinkedList<Idx>(); // Some hashcodes will double... DO NOT make a set + List<Idx> list = new LinkedList<>(); // Some hashcodes will double... DO NOT make a set TimeTaken tt2 = trans.start("Open Files", Env.SUB); RandomAccessFile raf=null; try { diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/Organization.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/Organization.java index 8476e06c..bbae00ca 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/Organization.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/Organization.java @@ -307,11 +307,11 @@ public interface Organization { public static final Organization NULL = new Organization() { private final GregorianCalendar gc = new GregorianCalendar(1900, 1, 1); - private final List<Identity> nullList = new ArrayList<Identity>(); - private final Set<String> nullStringSet = new HashSet<String>(); + private final List<Identity> nullList = new ArrayList<>(); + private final Set<String> nullStringSet = new HashSet<>(); private String[] nullStringArray = new String[0]; private final Identity nullIdentity = new Identity() { - List<String> nullUser = new ArrayList<String>(); + List<String> nullUser = new ArrayList<>(); @Override public String type() { return N_A; diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java index 57d37d0b..f9507038 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java @@ -48,7 +48,7 @@ import org.onap.aaf.misc.env.impl.BasicEnv; public class OrganizationFactory { private static final String ORGANIZATION_DOT = "Organization."; private static Organization defaultOrg = null; - private static Map<String,Organization> orgs = new ConcurrentHashMap<String,Organization>(); + private static Map<String,Organization> orgs = new ConcurrentHashMap<>(); public static Organization init(BasicEnv env) throws OrganizationException { int idx = ORGANIZATION_DOT.length(); Organization org,firstOrg = null; diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Acceptor.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Acceptor.java index 1953694b..82a226ec 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Acceptor.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Acceptor.java @@ -41,7 +41,7 @@ class Acceptor<TRANS extends Trans> { public Acceptor(List<Pair<String, Pair<HttpCode<TRANS,?>, List<Pair<String, Object>>>>> types) { this.types = types; - acceptable = new ArrayList<Pair<String, Pair<HttpCode<TRANS,?>, List<Pair<String, Object>>>>>(); + acceptable = new ArrayList<>(); } private boolean eval(HttpCode<TRANS,?> code, String str, List<String> props) { @@ -128,7 +128,7 @@ class Acceptor<TRANS extends Trans> { int cis,cie=-1,cend; int sis,sie,send; String name; - ArrayList<String> props = new ArrayList<String>(); + ArrayList<String> props = new ArrayList<>(); do { // Clear these in case more than one Semi props.clear(); // on loop, do not want mixed properties diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java index 5a03a091..bc563f39 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java @@ -109,11 +109,11 @@ public class CachingFileAccess<TRANS extends Trans> extends HttpCode<TRANS, Void public CachingFileAccess(EnvJAXB env, String ... args) throws IOException { super(null,"Caching File Access"); setEnv(env,args); - content = new ConcurrentSkipListMap<String,Content>(); // multi-thread changes possible + content = new ConcurrentSkipListMap<>(); // multi-thread changes possible - attachOnly = new HashSet<String>(); // short, unchanged + attachOnly = new HashSet<>(); // short, unchanged - typeMap = new TreeMap<String,String>(); // Structure unchanged after Construction + typeMap = new TreeMap<>(); // Structure unchanged after Construction typeMap.put("ico","image/icon"); typeMap.put("html","text/html"); typeMap.put("css","text/css"); @@ -540,7 +540,7 @@ public class CachingFileAccess<TRANS extends Trans> extends HttpCode<TRANS, Void public void run() { int size = content.size(); if(size>maxSize) { - ArrayList<Comp> scont = new ArrayList<Comp>(size); + ArrayList<Comp> scont = new ArrayList<>(size); Object[] entries = content.entrySet().toArray(); for(int i=0;i<size;++i) { scont.add(i, new Comp((Map.Entry<String,Content>)entries[i])); diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Match.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Match.java index ac8b31c1..e4eb239d 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Match.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Match.java @@ -51,7 +51,7 @@ public class Match { */ public Match(String path) { // IF DEBUG: System.out.print("\n[" + path + "]"); - params = new HashMap<String,Integer>(); + params = new HashMap<>(); if(path!=null) { String[] pa = path.split("/"); values = new byte[pa.length][]; diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/RouteReport.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/RouteReport.java index 5de2ebe3..1c946e83 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/RouteReport.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/RouteReport.java @@ -28,6 +28,6 @@ public class RouteReport { public HttpMethods meth; public String path; public String desc; - public final List<String> contextTypes = new ArrayList<String>(); + public final List<String> contextTypes = new ArrayList<>(); } diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Routes.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Routes.java index fefb8f3c..7cfadf2b 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Routes.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/Routes.java @@ -80,7 +80,7 @@ public class Routes<TRANS extends Trans> { } public List<RouteReport> routeReport() { - ArrayList<RouteReport> ltr = new ArrayList<RouteReport>(); + ArrayList<RouteReport> ltr = new ArrayList<>(); for(int i=0;i<end;++i) { ltr.add(routes[i].api()); } diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TypedCode.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TypedCode.java index 82b291c7..4425886c 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TypedCode.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TypedCode.java @@ -59,7 +59,7 @@ public class TypedCode<TRANS extends Trans> extends Content<TRANS> { private List<Pair<String, Pair<HttpCode<TRANS,?>,List<Pair<String, Object>>>>> types; public TypedCode() { - types = new ArrayList<Pair<String,Pair<HttpCode<TRANS,?>,List<Pair<String,Object>>>>>(); + types = new ArrayList<>(); } /** @@ -88,7 +88,7 @@ public class TypedCode<TRANS extends Trans> extends Content<TRANS> { @Override protected Pair<String, Pair<HttpCode<TRANS,?>, List<Pair<String, Object>>>> types(HttpCode<TRANS,?> code, String str) { Pair<String, Pair<HttpCode<TRANS,?>,List<Pair<String, Object>>>> type = null; - ArrayList<Pair<String, Object>> props = new ArrayList<Pair<String,Object>>(); + ArrayList<Pair<String, Object>> props = new ArrayList<>(); // Want Q percentage is to be first in the array everytime. If not listed, 1.0 is default props.add(new Pair<String,Object>(Q,1f)); Pair<HttpCode<TRANS,?>, List<Pair<String,Object>>> cl = new Pair<HttpCode<TRANS,?>, List<Pair<String,Object>>>(code, props); @@ -227,7 +227,7 @@ public class TypedCode<TRANS extends Trans> extends Content<TRANS> { public void api(RouteReport tr) { // Need to build up a map, because Prop entries can be in several places. - HashMap<HttpCode<?,?>,StringBuilder> psb = new HashMap<HttpCode<?,?>,StringBuilder>(); + HashMap<HttpCode<?,?>,StringBuilder> psb = new HashMap<>(); StringBuilder temp; tr.desc = null; diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java index 7078cf0f..de20e476 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java @@ -49,7 +49,7 @@ public class Validator { private StringBuilder msgs; static { - nsKeywords = new ArrayList<String>(); + nsKeywords = new ArrayList<>(); nsKeywords.add(".access"); nsKeywords.add(".owner"); nsKeywords.add(".admin"); diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/layer/test/JU_Result.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/layer/test/JU_Result.java index 3219e476..a172ad26 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/layer/test/JU_Result.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/layer/test/JU_Result.java @@ -73,7 +73,7 @@ public class JU_Result { Collection<String> col1 = new ArrayList(); List<String> list1 = new ArrayList(); - Set<String> set1 = new HashSet<String>(); + Set<String> set1 = new HashSet<>(); Integer[] R1 = new Integer[0]; set1.add("derp"); list1.add("test"); diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/local/test/JU_DataFile.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/local/test/JU_DataFile.java index d0094dbc..559b275f 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/local/test/JU_DataFile.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/local/test/JU_DataFile.java @@ -46,7 +46,7 @@ public class JU_DataFile { // File file = new File("../authz-batch/data/v1.dat"); // DataFile df = new DataFile(file,"r"); // int count = 0; -// List<String> list = new ArrayList<String>(); +// List<String> list = new ArrayList<>(); // try { // df.open(); // Token tok = df.new Token(1024000); diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/rserv/test/JU_CachingFileAccess.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/rserv/test/JU_CachingFileAccess.java index e9c382d5..3d1f0062 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/rserv/test/JU_CachingFileAccess.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/rserv/test/JU_CachingFileAccess.java @@ -122,7 +122,7 @@ public class JU_CachingFileAccess { @Test public void testCleanupParams() { - NavigableMap<String,org.onap.aaf.auth.rserv.Content> content = new ConcurrentSkipListMap<String,org.onap.aaf.auth.rserv.Content>(); + NavigableMap<String,org.onap.aaf.auth.rserv.Content> content = new ConcurrentSkipListMap<>(); cachingFileAccess.cleanupParams(50, 500); //TODO: find right input } @@ -170,7 +170,7 @@ public class JU_CachingFileAccess { @Test public void testInvalidate() { - //NavigableMap<String,org.onap.aaf.auth.rserv.Content> content = new ConcurrentSkipListMap<String,org.onap.aaf.auth.rserv.Content>(); + //NavigableMap<String,org.onap.aaf.auth.rserv.Content> content = new ConcurrentSkipListMap<>(); //Content con = mock(Content.class); //content.put("hello", con); cachingFileAccess.invalidate("hello"); |