1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.web; |
21 |
|
|
22 |
|
import org.slf4j.Logger; |
23 |
|
import org.slf4j.LoggerFactory; |
24 |
|
|
|
|
| 80% |
Uncovered Elements: 2 (10) |
Complexity: 4 |
Complexity Density: 0.57 |
|
25 |
|
public class ObjectRemoveForm extends ObjectAddForm |
26 |
|
{ |
27 |
|
private int classId; |
28 |
|
|
29 |
|
private static final Logger LOGGER = LoggerFactory.getLogger(ObjectRemoveForm.class); |
30 |
|
|
|
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.4 |
|
31 |
2 |
@Override... |
32 |
|
public void readRequest() |
33 |
|
{ |
34 |
2 |
super.readRequest(); |
35 |
2 |
try { |
36 |
2 |
setClassId(Integer.parseInt(getRequest().getParameter("classid"))); |
37 |
|
} catch (Exception ex) { |
38 |
0 |
setClassId(-1); |
39 |
0 |
LOGGER.warn("No or bad classid found while processing an objectremove request: " |
40 |
|
+ getRequest().getParameter("classid")); |
41 |
|
} |
42 |
|
} |
43 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
44 |
1 |
public int getClassId()... |
45 |
|
{ |
46 |
1 |
return this.classId; |
47 |
|
} |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
2 |
public void setClassId(int classId)... |
50 |
|
{ |
51 |
2 |
this.classId = classId; |
52 |
|
} |
53 |
|
|
54 |
|
} |