Index: applications/editors/josm/plugins/DirectUpload/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- applications/editors/josm/plugins/DirectUpload/.settings/org.eclipse.jdt.core.prefs	(revision 34616)
+++ applications/editors/josm/plugins/DirectUpload/.settings/org.eclipse.jdt.core.prefs	(revision 34617)
@@ -9,4 +9,5 @@
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
@@ -32,4 +33,9 @@
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
@@ -38,4 +44,12 @@
 org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
Index: applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java
===================================================================
--- applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 34616)
+++ applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 34617)
@@ -8,4 +8,5 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
@@ -34,8 +35,10 @@
 import org.openstreetmap.josm.io.GpxWriter;
 import org.openstreetmap.josm.io.OsmApi;
+import org.openstreetmap.josm.io.OsmTransferException;
 import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.HttpClient;
 import org.openstreetmap.josm.tools.HttpClient.Response;
+import org.openstreetmap.josm.tools.Logging;
 
 /**
@@ -202,8 +205,10 @@
     /**
      * This is the actual workhorse that manages the upload.
-     * @param String Description of the GPX track being uploaded
-     * @param String Tags associated with the GPX track being uploaded
-     * @param boolean Shall the GPX track be public
-     * @param GpxData The GPX Data to upload
+     * @param description Description of the GPX track being uploaded
+     * @param tags Tags associated with the GPX track being uploaded
+     * @param visi Shall the GPX track be public
+     * @param gpxData The GPX Data to upload
+     * @param progressMonitor Progress monitor
+     * @throws IOException if any I/O error occurs
      */
     private void upload(String description, String tags, String visi, GpxData gpxData, ProgressMonitor progressMonitor) throws IOException {
@@ -270,8 +275,10 @@
      * This function sets up the upload URL and logs in using the username and password given
      * in the preferences.
-     * @param int The length of the content to be sent to the server
+     * @param contentLength The length of the content to be sent to the server
      * @return HttpURLConnection The set up conenction
-     */
-    private HttpClient setupConnection(int contentLength) throws Exception {
+     * @throws MalformedURLException in case of invalid URL
+     * @throws OsmTransferException if auth header cannot be added
+     */
+    private HttpClient setupConnection(int contentLength) throws MalformedURLException, OsmTransferException {
 
         // Upload URL
@@ -295,7 +302,8 @@
      * It also posts the result (or errors) to OutputDisplay.
 
-     * @param HttpURLConnection The connection to check/finish up
-     */
-    private boolean finishUpConnection(Response c) throws Exception {
+     * @param c The HTTP connection to check/finish up
+     * @return {@code true} for success
+     */
+    private boolean finishUpConnection(Response c) {
         String returnMsg = c.getResponseMessage();
         final boolean success = returnMsg.equals("OK");
@@ -350,10 +358,11 @@
     /**
      * Generates the output string displayed in the PleaseWaitDialog.
-     * @param int Bytes already uploaded
-     * @return String Message
+     * @param cur Bytes already uploaded
+     * @param progressMonitor Progress monitor
+     * @return Message
      */
     private String getProgressText(int cur, ProgressMonitor progressMonitor) {
         int max = progressMonitor.getTicksCount();
-        int percent = Math.round(cur * 100 / max);
+        int percent = (cur * 100 / max);
         // FIXME method kept because of translated string
         return tr("Uploading GPX track: {0}% ({1} of {2})",
@@ -363,5 +372,5 @@
     /**
      * Nicely calculates given bytes into MB, kB and B (with units)
-     * @param int Bytes
+     * @param bytes Bytes
      * @return String
      */
@@ -370,7 +379,7 @@
                     // Rounds to 2 decimal places
                     ? new DecimalFormat("0.00")
-                        .format((double)Math.round(bytes/(1000*10))/100) + " MB"
+                        .format((double)(bytes/(1000*10))/100) + " MB"
                     : (bytes > 1000
-                        ? Math.round(bytes/1000) + " kB"
+                        ? (bytes/1000) + " kB"
                         : bytes + " B"));
     }
@@ -379,6 +388,6 @@
      * Checks for common errors and displays them in OutputDisplay if it finds any.
      * Returns whether errors have been found or not.
-     * @param String GPX track description
-     * @param GpxData the GPX data to upload
+     * @param description GPX track description
+     * @param gpxData the GPX data to upload
      * @return boolean true if errors have been found
      */
@@ -443,7 +452,8 @@
     /**
      * Writes textfields (like in webbrowser) to the given ByteArrayOutputStream
-     * @param ByteArrayOutputStream
-     * @param String The name of the "textbox"
-     * @param String The value to write
+     * @param baos output stream
+     * @param name The name of the "textbox"
+     * @param value The value to write
+     * @throws IOException if any I/O error occurs
      */
     private void writeField(ByteArrayOutputStream baos, String name, String value) throws IOException {
@@ -458,7 +468,8 @@
     /**
      * Writes gpxData (= file field in webbrowser) to the given ByteArrayOutputStream
-     * @param ByteArrayOutputStream
-     * @param String The name of the "upload field"
-     * @param GpxData The GPX data to upload
+     * @param baos output stream
+     * @param name The name of the "upload field"
+     * @param gpxData The GPX data to upload
+     * @throws IOException if any I/O error occurs
      */
     private void writeGpxFile(ByteArrayOutputStream baos, String name, GpxData gpxData) throws IOException {
@@ -482,16 +493,18 @@
     /**
      * Writes a String to the given ByteArrayOutputStream
-     * @param ByteArrayOutputStream
-     * @param String
+     * @param baos output stream
+     * @param s string
      */
     private void writeString(ByteArrayOutputStream baos, String s) {
         try {
             baos.write(s.getBytes(StandardCharsets.UTF_8));
-        } catch(Exception e) {}
+        } catch(Exception e) {
+            Logging.error(e);
+        }
     }
 
     /**
      * Writes a newline to the given ByteArrayOutputStream
-     * @param ByteArrayOutputStream
+     * @param baos output stream
      */
     private void writeLineEnd(ByteArrayOutputStream baos) {
@@ -501,5 +514,5 @@
     /**
      * Writes a boundary line to the given ByteArrayOutputStream
-     * @param ByteArrayOutputStream
+     * @param baos output stream
      */
     private void writeBoundary(ByteArrayOutputStream baos) {
