| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
package net.sf.arestc.core; |
| 22 |
|
|
| 23 |
|
import java.io.IOException; |
| 24 |
|
import java.net.MalformedURLException; |
| 25 |
|
|
| 26 |
|
|
| 27 |
|
import org.apache.commons.io.IOUtils; |
| 28 |
|
import org.apache.log4j.Logger; |
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
@author |
| 35 |
|
|
|
|
|
| 63.6% |
Uncovered Elements: 4 (11) |
Complexity: 5 |
Complexity Density: 0.62 |
|
| 36 |
|
public class DummyTransformer extends BaseCommand { |
| 37 |
|
|
| 38 |
|
|
| 39 |
|
private static final Logger LOGGER = Logger.getLogger(CallServer.class |
| 40 |
|
.getName()); |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 45 |
0
|
public DummyTransformer() {... |
| 46 |
0
|
super(); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
@param |
| 53 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 54 |
1
|
public DummyTransformer(final ConnectorCommand next) {... |
| 55 |
1
|
super(next); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
@see |
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
|
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 3 |
Complexity Density: 0.5 |
|
| 65 |
1
|
@Override... |
| 66 |
|
public ConnectorContext process(final ConnectorRequest request, |
| 67 |
|
final ConnectorContext context) throws CommandException { |
| 68 |
1
|
try { |
| 69 |
1
|
final String name = request.getServiceName(); |
| 70 |
1
|
context.setReturnedBody(IOUtils.toString(this.getClass() |
| 71 |
|
.getClassLoader().getResourceAsStream(name))); |
| 72 |
|
} catch (final MalformedURLException e) { |
| 73 |
0
|
LOGGER.error("Error occured in process:", e); |
| 74 |
|
} catch (final IOException e) { |
| 75 |
0
|
LOGGER.error("Error occured in process:", e); |
| 76 |
|
} |
| 77 |
1
|
return super.process(request, context); |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
} |