10 mistake = "unknown to men";
11 }
12
13 public SVGRasterizerException(String err) {14 super(err); // call super class constructor15 mistake = err; // save message16 }17
18 public String getError() {
19 return mistake;
5 private static final long serialVersionUID = -5110552374074051446L;
6 private String mistake;
7
8 public SVGRasterizerException() { 9 super();10 mistake = "unknown to men";11 }12
13 public SVGRasterizerException(String err) {
14 super(err); // call super class constructor
19 return INSTANCE;
20 }
21
22 private SVGRasterizer() {23 }24
25 public synchronized ByteArrayOutputStream transcode(
26 ByteArrayOutputStream stream, String svg, MimeType mime, Float width)
21
22 private String type;
23
24 private MimeType(String type) {25 this.type = type;26 }27
28 public String getType() { return type; }
29
33 protected static Logger logger = Logger.getLogger("exportservlet");
34
35
36 public ExportController() { 37 super(); 38 } 39
40 public void init() {
41 }
This constructor does not have any documentation.
Consider adding a documentation comment to explain its use.
While it may seem like the usage of a constructor is perfectly obvious, any consumers of your API may not be able to pick up on certain details.
In the example below, it is difficult to understand what the arguments of this constructor for DataForwarder
signify.
class DataForwarder {
public DataForwarder(int nTypes, String... values) {
// ...
}
}
Document the constructor and provide useful information about it or its parameters as required.
/**
* Initializes a DataForwarder with a set of types to filter by, along with their names.
*
* @param nTypes - The number of types to filter by.
* @param values - The input type names to filter by.
*/
public DataForwarder(int nTypes, String... values) {
// ...
}
If you feel this constructor does not require documentation, you can add a skipcq comment to this constructor.