MCPcopy Create free account
hub / github.com/dianping/cat / customizeUri

Method customizeUri

integration/URL/CatFilter.java:190–204  ·  view source on GitHub ↗
(Transaction t, HttpServletRequest req)

Source from the content-addressed store, hash-verified

188 }
189
190 private void customizeUri(Transaction t, HttpServletRequest req) {
191 if (t instanceof DefaultTransaction) {
192 Object catPageType = req.getAttribute(CatConstants.CAT_PAGE_TYPE);
193
194 if (catPageType instanceof String) {
195 ((DefaultTransaction) t).setType(catPageType.toString());
196 }
197
198 Object catPageUri = req.getAttribute(CatConstants.CAT_PAGE_URI);
199
200 if (catPageUri instanceof String) {
201 ((DefaultTransaction) t).setName(catPageUri.toString());
202 }
203 }
204 }
205
206 private String getRequestURI(HttpServletRequest req) {
207 String url = req.getRequestURI();

Callers 1

handleMethod · 0.95

Calls 3

setTypeMethod · 0.45
toStringMethod · 0.45
setNameMethod · 0.45

Tested by

no test coverage detected