Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (9 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

File:
1 edited

Legend:

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

    r8509 r8510  
    501501        }
    502502        panel.setVisible(true);
    503         redoUndoListener.commandChanged(0,0);
     503        redoUndoListener.commandChanged(0, 0);
    504504
    505505        Main.map = map;
     
    532532
    533533        Object updateStatus(String event);
     534
    534535        void finish(Object status);
    535536    }
     
    768769        setMapFrame(mapFrame);
    769770        if (firstLayer != null) {
    770             mapFrame.selectMapMode((MapMode)mapFrame.getDefaultButtonAction(), firstLayer);
     771            mapFrame.selectMapMode((MapMode) mapFrame.getDefaultButtonAction(), firstLayer);
    771772        }
    772773        mapFrame.initializeDialogsPane();
     
    904905    protected static int windowState = JFrame.NORMAL;
    905906
    906     private final CommandQueueListener redoUndoListener = new CommandQueueListener(){
     907    private final CommandQueueListener redoUndoListener = new CommandQueueListener() {
    907908        @Override
    908909        public void commandChanged(final int queueSize, final int redoSize) {
     
    998999                                );
    9991000                    }
    1000                     if (f!=null) {
     1001                    if (f != null) {
    10011002                        fileList.add(f);
    10021003                    }
     
    10081009                }
    10091010            }
    1010             if(!fileList.isEmpty()) {
     1011            if (!fileList.isEmpty()) {
    10111012                OpenFileAction.openFiles(fileList, true);
    10121013            }
     
    10671068                continue;
    10681069            }
    1069             AbstractModifiableLayer odl = (AbstractModifiableLayer)l;
     1070            AbstractModifiableLayer odl = (AbstractModifiableLayer) l;
    10701071            if ((odl.requiresSaveToFile() || (odl.requiresUploadToServer() && !odl.isUploadDiscouraged())) && odl.isModified()) {
    10711072                layersWithUnmodifiedChanges.add(odl);
     
    11381139     */
    11391140    private static DownloadParamType paramType(String s) {
    1140         if(s.startsWith("http:") || s.startsWith("https:")) return DownloadParamType.httpUrl;
    1141         if(s.startsWith("file:")) return DownloadParamType.fileUrl;
     1141        if (s.startsWith("http:") || s.startsWith("https:")) return DownloadParamType.httpUrl;
     1142        if (s.startsWith("file:")) return DownloadParamType.fileUrl;
    11421143        String coorPattern = "\\s*[+-]?[0-9]+(\\.[0-9]+)?\\s*";
    1143         if(s.matches(coorPattern+"(,"+coorPattern+"){3}")) return DownloadParamType.bounds;
     1144        if (s.matches(coorPattern+"(,"+coorPattern+") {3}")) return DownloadParamType.bounds;
    11441145        // everything else must be a file name
    11451146        return DownloadParamType.fileName;
     
    11741175        if (st.countTokens() == 4) {
    11751176            Bounds b = new Bounds(
    1176                     new LatLon(Double.parseDouble(st.nextToken()),Double.parseDouble(st.nextToken())),
    1177                     new LatLon(Double.parseDouble(st.nextToken()),Double.parseDouble(st.nextToken()))
     1177                    new LatLon(Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken())),
     1178                    new LatLon(Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()))
    11781179                    );
    11791180            downloadFromParamBounds(rawGps, b);
     
    12471248            Component c = e.getComponent();
    12481249            if (c instanceof JFrame && c.isVisible()) {
    1249                 if(Main.windowState == JFrame.NORMAL) {
     1250                if (Main.windowState == JFrame.NORMAL) {
    12501251                    Main.geometry = new WindowGeometry((JFrame) c);
    12511252                } else {
     
    12581259    protected static void addListener() {
    12591260        parent.addComponentListener(new WindowPositionSizeListener());
    1260         ((JFrame)parent).addWindowStateListener(new WindowPositionSizeListener());
     1261        ((JFrame) parent).addWindowStateListener(new WindowPositionSizeListener());
    12611262    }
    12621263
     
    13561357                || (newValue != null && oldValue != null && !Objects.equals(newValue.toCode(), oldValue.toCode()))) {
    13571358
    1358             synchronized(Main.class) {
     1359            synchronized (Main.class) {
    13591360                Iterator<WeakReference<ProjectionChangeListener>> it = listeners.iterator();
    1360                 while (it.hasNext()){
     1361                while (it.hasNext()) {
    13611362                    WeakReference<ProjectionChangeListener> wr = it.next();
    13621363                    ProjectionChangeListener listener = wr.get();
     
    13981399    public static void removeProjectionChangeListener(ProjectionChangeListener listener) {
    13991400        if (listener == null) return;
    1400         synchronized(Main.class){
     1401        synchronized (Main.class) {
    14011402            Iterator<WeakReference<ProjectionChangeListener>> it = listeners.iterator();
    1402             while (it.hasNext()){
     1403            while (it.hasNext()) {
    14031404                WeakReference<ProjectionChangeListener> wr = it.next();
    14041405                // remove the listener - and any other listener which got garbage
     
    14621463    public static void removeWindowSwitchListener(WindowSwitchListener listener) {
    14631464        if (listener == null) return;
    1464         synchronized (Main.class){
     1465        synchronized (Main.class) {
    14651466            Iterator<WeakReference<WindowSwitchListener>> it = windowSwitchListeners.iterator();
    1466             while (it.hasNext()){
     1467            while (it.hasNext()) {
    14671468                WeakReference<WindowSwitchListener> wr = it.next();
    14681469                // remove the listener - and any other listener which got garbage
     
    15361537                synchronized (Main.class) {
    15371538                    Iterator<WeakReference<WindowSwitchListener>> it = windowSwitchListeners.iterator();
    1538                     while (it.hasNext()){
     1539                    while (it.hasNext()) {
    15391540                        WeakReference<WindowSwitchListener> wr = it.next();
    15401541                        WindowSwitchListener listener = wr.get();
     
    15651566                synchronized (Main.class) {
    15661567                    Iterator<WeakReference<WindowSwitchListener>> it = windowSwitchListeners.iterator();
    1567                     while (it.hasNext()){
     1568                    while (it.hasNext()) {
    15681569                        WeakReference<WindowSwitchListener> wr = it.next();
    15691570                        WindowSwitchListener listener = wr.get();
Note: See TracChangeset for help on using the changeset viewer.