Ignore:
Timestamp:
2016-03-16T01:17:59+01:00 (10 years ago)
Author:
Don-vip
Message:

sonar - fix various issues

Location:
trunk/src/org/openstreetmap/josm/io
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/CertificateAmendment.java

    r9997 r10000  
    106106            }
    107107            if (certificateIsMissing(keyStore, cert)) {
    108                 Main.debug(tr("Adding certificate for TLS connections: {0}", cert.getSubjectX500Principal().getName()));
     108                if (Main.isDebugEnabled()) {
     109                    Main.debug(tr("Adding certificate for TLS connections: {0}", cert.getSubjectX500Principal().getName()));
     110                }
    109111                String alias = "josm:" + new File(CERT_AMEND[i]).getName();
    110112                try {
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r9353 r10000  
    859859     * @throws OsmTransferException if the API response cannot be parsed
    860860     */
    861     private Note parseSingleNote(String xml) throws OsmTransferException {
     861    private static Note parseSingleNote(String xml) throws OsmTransferException {
    862862        try {
    863863            List<Note> newNotes = new NoteReader(xml).parse();
     
    865865                return newNotes.get(0);
    866866            }
    867             //Shouldn't ever execute. Server will either respond with an error (caught elsewhere) or one note
     867            // Shouldn't ever execute. Server will either respond with an error (caught elsewhere) or one note
    868868            throw new OsmTransferException(tr("Note upload failed"));
    869869        } catch (SAXException | IOException e) {
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java

    r9231 r10000  
    266266     *             If the error can not be written
    267267     */
    268     private void sendError(Writer out) throws IOException {
     268    private static void sendError(Writer out) throws IOException {
    269269        sendHeader(out, "500 Internal Server Error", "text/html", true);
    270270        out.write("<HTML>\r\n");
     
    285285     *             If the error can not be written
    286286     */
    287     private void sendNotImplemented(Writer out) throws IOException {
     287    private static void sendNotImplemented(Writer out) throws IOException {
    288288        sendHeader(out, "501 Not Implemented", "text/html", true);
    289289        out.write("<HTML>\r\n");
     
    306306     *             If the error can not be written
    307307     */
    308     private void sendForbidden(Writer out, String help) throws IOException {
     308    private static void sendForbidden(Writer out, String help) throws IOException {
    309309        sendHeader(out, "403 Forbidden", "text/html", true);
    310310        out.write("<HTML>\r\n");
     
    330330     *             If the error can not be written
    331331     */
    332     private void sendBadRequest(Writer out, String help) throws IOException {
     332    private static void sendBadRequest(Writer out, String help) throws IOException {
    333333        sendHeader(out, "400 Bad Request", "text/html", true);
    334334        out.write("<HTML>\r\n");
Note: See TracChangeset for help on using the changeset viewer.