@Test public void testMalformedURI() { Trace trace = createTrace(createFrame(null, "^^^this:is|a$bad(uri)")); Collection<ExternalResourceDescriptor> resList = analyzer.locateExternalResourceName(trace); assertTrue("Mismatched resources size", (resList == null) || resList.isEmpty()); }
public Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> framesList) { if (ListUtil.size(framesList) <= 0) { return Collections.emptyList(); } Set<ExternalResourceDescriptor> resSet = new HashSet<ExternalResourceDescriptor>(framesList.size()); for (Frame frame : framesList) { ExternalResourceDescriptor res = extractExternalResourceDescriptor(frame); if (res == null) { continue; } if (!resSet.add(res)) continue; } return resSet; }
HttpExternalResourceAnalyzer extends AbstractExternalResourceAnalyzer { public Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> framesList) { if (ListUtil.size(framesList) <= 0) { return Collections.emptyList(); } Set<ExternalResourceDescriptor> resSet = new HashSet<ExternalResourceDescriptor>(framesList.size()); for (Frame frame : framesList) { ExternalResourceDescriptor res = extractExternalResourceDescriptor(frame); if (res == null) { continue; } if (!resSet.add(res)) continue; } return resSet; } }
HttpExternalResourceAnalyzer extends AbstractExternalResourceAnalyzer { public Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> framesList) { if (ListUtil.size(framesList) <= 0) { return Collections.emptyList(); } Set<ExternalResourceDescriptor> resSet = new HashSet<ExternalResourceDescriptor>(framesList.size()); for (Frame frame : framesList) { ExternalResourceDescriptor res = extractExternalResourceDescriptor(frame); if (res == null) { continue; } if (!resSet.add(res)) continue; } return resSet; } private  HttpExternalResourceAnalyzer(); }
HttpExternalResourceAnalyzer extends AbstractExternalResourceAnalyzer { public Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> framesList) { if (ListUtil.size(framesList) <= 0) { return Collections.emptyList(); } Set<ExternalResourceDescriptor> resSet = new HashSet<ExternalResourceDescriptor>(framesList.size()); for (Frame frame : framesList) { ExternalResourceDescriptor res = extractExternalResourceDescriptor(frame); if (res == null) { continue; } if (!resSet.add(res)) continue; } return resSet; } private  HttpExternalResourceAnalyzer(); static final HttpExternalResourceAnalyzer getInstance(); Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> framesList); }
HttpExternalResourceAnalyzer extends AbstractExternalResourceAnalyzer { public Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> framesList) { if (ListUtil.size(framesList) <= 0) { return Collections.emptyList(); } Set<ExternalResourceDescriptor> resSet = new HashSet<ExternalResourceDescriptor>(framesList.size()); for (Frame frame : framesList) { ExternalResourceDescriptor res = extractExternalResourceDescriptor(frame); if (res == null) { continue; } if (!resSet.add(res)) continue; } return resSet; } private  HttpExternalResourceAnalyzer(); static final HttpExternalResourceAnalyzer getInstance(); Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> framesList);  }