Ignore:
Timestamp:
2016-06-15T10:30:37+02:00 (3 years ago)
Author:
Don-vip
Message:

Checkstyle 6.19: enable SingleSpaceSeparator and fix violations

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

Legend:

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

    r8510 r10378  
    131131            }
    132132        } else {
    133             if (!capabilities.containsKey(element))  {
     133            if (!capabilities.containsKey(element)) {
    134134                Map<String, String> h = new HashMap<>();
    135135                capabilities.put(element, h);
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r10300 r10378  
    157157        CheckParameterUtil.ensureParameterNotNull(min, "min");
    158158        CheckParameterUtil.ensureParameterNotNull(max, "max");
    159         this.bounds  = new Bounds(min, max);
     159        this.bounds = new Bounds(min, max);
    160160        return this;
    161161    }
     
    215215     */
    216216    public ChangesetQuery beingOpen(boolean isOpen) {
    217         this.open =  isOpen;
     217        this.open = isOpen;
    218218        return this;
    219219    }
     
    474474
    475475        protected Map<String, String> createMapFromQueryString(String query) {
    476             Map<String, String> queryParams  = new HashMap<>();
     476            Map<String, String> queryParams = new HashMap<>();
    477477            String[] keyValuePairs = query.split("&");
    478478            for (String keyValuePair: keyValuePairs) {
  • trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java

    r9078 r10378  
    9797            return 0;
    9898        }
    99         if (port <= 0 || port >  65535) {
     99        if (port <= 0 || port > 65535) {
    100100            Main.error(tr("Illegal port number in preference ''{0}''. Got {1}.", property, port));
    101101            Main.error(tr("The proxy will not be used."));
  • trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java

    r9078 r10378  
    3232import org.xml.sax.helpers.DefaultHandler;
    3333
    34 public class DiffResultProcessor  {
     34public class DiffResultProcessor {
    3535
    3636    private static class DiffResultEntry {
     
    7676     *
    7777     */
    78     public  void parse(String diffUploadResponse, ProgressMonitor progressMonitor) throws XmlParsingException {
     78    public void parse(String diffUploadResponse, ProgressMonitor progressMonitor) throws XmlParsingException {
    7979        if (progressMonitor == null) {
    8080            progressMonitor = NullProgressMonitor.INSTANCE;
     
    168168                case "way":
    169169                case "relation":
    170                     PrimitiveId id  = new SimplePrimitiveId(
     170                    PrimitiveId id = new SimplePrimitiveId(
    171171                            Long.parseLong(atts.getValue("old_id")),
    172172                            OsmPrimitiveType.fromApiTypeName(qName)
  • trunk/src/org/openstreetmap/josm/io/GpxReader.java

    r10216 r10378  
    504504
    505505        @Override
    506         public void endDocument() throws SAXException  {
     506        public void endDocument() throws SAXException {
    507507            if (!states.empty())
    508508                throw new SAXException(tr("Parse error: invalid document structure for GPX document."));
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r10217 r10378  
    314314        final String baseUrl = getBaseUrl();
    315315        switch (type) {
     316            // CHECKSTYLE.OFF: SingleSpaceSeparator
    316317            case NODE:     msg = tr("Fetching a package of nodes from ''{0}''",     baseUrl); break;
    317318            case WAY:      msg = tr("Fetching a package of ways from ''{0}''",      baseUrl); break;
    318319            case RELATION: msg = tr("Fetching a package of relations from ''{0}''", baseUrl); break;
     320            // CHECKSTYLE.ON: SingleSpaceSeparator
    319321            default: throw new AssertionError();
    320322        }
     
    584586                    String msg;
    585587                    switch (type) {
     588                        // CHECKSTYLE.OFF: SingleSpaceSeparator
    586589                        case NODE:     msg = tr("Fetching node with id {0} from ''{1}''",     id, baseUrl); break;
    587590                        case WAY:      msg = tr("Fetching way with id {0} from ''{1}''",      id, baseUrl); break;
    588591                        case RELATION: msg = tr("Fetching relation with id {0} from ''{1}''", id, baseUrl); break;
     592                        // CHECKSTYLE.ON: SingleSpaceSeparator
    589593                        default: throw new AssertionError();
    590594                    }
  • trunk/src/org/openstreetmap/josm/io/NoteReader.java

    r10216 r10378  
    194194
    195195        @Override
    196         public void endDocument() throws SAXException  {
     196        public void endDocument() throws SAXException {
    197197            parsedNotes = notes;
    198198        }
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r10373 r10378  
    133133     * @throws IllegalArgumentException if serverUrl is null
    134134     */
    135     protected OsmApi(String serverUrl)  {
     135    protected OsmApi(String serverUrl) {
    136136        CheckParameterUtil.ensureParameterNotNull(serverUrl, "serverUrl");
    137137        this.serverUrl = serverUrl;
  • trunk/src/org/openstreetmap/josm/io/OsmChangeImporter.java

    r8895 r10378  
    4444    }
    4545
    46     protected void importData(InputStream in, final File associatedFile, ProgressMonitor  progressMonitor) throws IllegalDataException {
     46    protected void importData(InputStream in, final File associatedFile, ProgressMonitor progressMonitor) throws IllegalDataException {
    4747        final DataSet dataSet = OsmChangeReader.parseDataSet(in, progressMonitor);
    4848        final OsmDataLayer layer = new OsmDataLayer(dataSet, associatedFile.getName(), associatedFile);
  • trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java

    r10212 r10378  
    9898     * @throws IllegalArgumentException if type is null
    9999     */
    100     public OsmServerBackreferenceReader(long id, OsmPrimitiveType type, boolean readFull)  {
     100    public OsmServerBackreferenceReader(long id, OsmPrimitiveType type, boolean readFull) {
    101101        this(id, type);
    102102        this.readFull = readFull;
     
    202202            }
    203203            if (isReadFull()) {
    204                 Collection<Relation> relationsToCheck  = new ArrayList<>(ds.getRelations());
     204                Collection<Relation> relationsToCheck = new ArrayList<>(ds.getRelations());
    205205                for (Relation relation: relationsToCheck) {
    206206                    if (!relation.isNew() && relation.hasIncompleteMembers()) {
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r10212 r10378  
    4141     * @throws OsmTransferException if data transfer errors occur
    4242     */
    43     protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor) throws OsmTransferException  {
     43    protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor) throws OsmTransferException {
    4444        return getInputStream(urlStr, progressMonitor, null);
    4545    }
     
    5555     * @throws OsmTransferException if data transfer errors occur
    5656     */
    57     protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor, String reason) throws OsmTransferException  {
     57    protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor, String reason) throws OsmTransferException {
    5858        try {
    5959            api.initialize(progressMonitor);
  • trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java

    r10308 r10378  
    2020        if (requestorType == null)
    2121            return null;
    22         PasswordAuthentication credentials =  lookup(requestorType, host);
     22        PasswordAuthentication credentials = lookup(requestorType, host);
    2323        final String username = (credentials == null || credentials.getUserName() == null) ? "" : credentials.getUserName();
    2424        final String password = (credentials == null || credentials.getPassword() == null) ? "" : String.valueOf(credentials.getPassword());
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r10308 r10378  
    150150            ExistingValues old = new ExistingValues(key);
    151151            for (OsmPrimitive osm : sel) {
    152                 oldValue  = osm.get(key);
     152                oldValue = osm.get(key);
    153153                if (oldValue != null) {
    154154                    old.addValue(oldValue);
     
    209209        propertyTable.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK), "shiftenter");
    210210        propertyTable.getActionMap().put("shiftenter", new AbstractAction() {
    211             @Override  public void actionPerformed(ActionEvent e) {
     211            @Override public void actionPerformed(ActionEvent e) {
    212212                buttonAction(1, e); // add all tags on Shift-Enter
    213213            }
     
    242242    protected void buttonAction(int buttonIndex, ActionEvent evt) {
    243243        // if layer all layers were closed, ignore all actions
    244         if (Main.main.getCurrentDataSet() != null  && buttonIndex != 2) {
     244        if (Main.main.getCurrentDataSet() != null && buttonIndex != 2) {
    245245            TableModel tm = propertyTable.getModel();
    246246            for (int i = 0; i < tm.getRowCount(); i++) {
Note: See TracChangeset for help on using the changeset viewer.