Changeset 8126 in josm
- Timestamp:
- 2015-03-08T23:39:57+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 60 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r8072 r8126 154 154 * Global application. 155 155 */ 156 public static Main main; 156 public static volatile Main main; 157 157 158 158 /** … … 191 191 * The toolbar preference control to register new actions. 192 192 */ 193 public static ToolbarPreferences toolbar; 193 public static volatile ToolbarPreferences toolbar; 194 194 195 195 /** … … 468 468 * to the JOSM team for inclusion. 469 469 */ 470 public static PlatformHook platform; 470 public static volatile PlatformHook platform; 471 471 472 472 /** … … 525 525 } 526 526 527 private static InitStatusListener initListener = null; 527 private static volatile InitStatusListener initListener = null; 528 528 529 529 public static interface InitStatusListener { … … 892 892 public static final JPanel panel = new JPanel(new BorderLayout()); 893 893 894 protected static WindowGeometry geometry; 894 protected static volatile WindowGeometry geometry; 895 895 protected static int windowState = JFrame.NORMAL; 896 896 … … 1305 1305 * Use {@link #setProjection(Projection)} in order to trigger a projection change event. 1306 1306 */ 1307 private static Projection proj; 1307 private static volatile Projection proj; 1308 1308 1309 1309 /** … … 1481 1481 private static MasterWindowListener INSTANCE; 1482 1482 1483 public static MasterWindowListener getInstance() { 1483 public static synchronized MasterWindowListener getInstance() { 1484 1484 if (INSTANCE == null) { 1485 1485 INSTANCE = new MasterWindowListener(); -
trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
r7859 r8126 39 39 */ 40 40 public class ImageryAdjustAction extends MapMode implements MouseListener, MouseMotionListener, AWTEventListener{ 41 private static ImageryOffsetDialog offsetDialog; 41 private static volatile ImageryOffsetDialog offsetDialog; 42 42 private static Cursor cursor = ImageProvider.getCursor("normal", "move"); 43 43 -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r8061 r8126 125 125 } 126 126 127 private static SearchSetting lastSearch = null; 127 private static volatile SearchSetting lastSearch = null; 128 128 129 129 /** -
trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java
r6223 r8126 32 32 } 33 33 34 private static BoldRenderer boldRenderer = null; 34 private static volatile BoldRenderer boldRenderer = null; 35 35 36 36 protected CorrectionTable(T correctionTableModel) { -
trunk/src/org/openstreetmap/josm/data/Version.java
r7033 r8126 57 57 * @return the unique instance of the version information 58 58 */ 59 public static Version getInstance() { 59 public static synchronized Version getInstance() { 60 60 if (instance == null) { 61 61 instance = new Version(); -
trunk/src/org/openstreetmap/josm/data/coor/CoordinateFormat.java
r6883 r8126 49 49 } 50 50 51 private static CoordinateFormat defaultCoordinateFormat = DECIMAL_DEGREES; 51 private static volatile CoordinateFormat defaultCoordinateFormat = DECIMAL_DEGREES; 52 52 53 53 /** -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
r7005 r8126 35 35 * @return the unique instance of the history data set 36 36 */ 37 public static HistoryDataSet getInstance() { 37 public static synchronized HistoryDataSet getInstance() { 38 38 if (historyDataSet == null) { 39 39 historyDataSet = new HistoryDataSet(); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
r7294 r8126 91 91 * @return instance of map rending class 92 92 */ 93 public static MapRendererFactory getInstance() { 93 public static synchronized MapRendererFactory getInstance() { 94 94 if (instance == null) { 95 95 instance = new MapRendererFactory(); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java
r6084 r8126 10 10 import org.openstreetmap.josm.data.Preferences.ColorKey; 11 11 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles; 12 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener; 12 13 import org.openstreetmap.josm.gui.mappaint.StyleSource; 13 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener;14 14 15 15 public enum PaintColors implements ColorKey { … … 35 35 private final Color defaultColor; 36 36 37 private static Color backgroundColorCache = null; 37 private static volatile Color backgroundColorCache = null; 38 38 39 39 private static final MapPaintSylesUpdateListener styleOverrideListener = new MapPaintSylesUpdateListener() { -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r7395 r8126 149 149 */ 150 150 private static MultipolygonRoleMatcher roleMatcher; 151 private static MultipolygonRoleMatcher getMultipolygonRoleMatcher() { 151 private static synchronized MultipolygonRoleMatcher getMultipolygonRoleMatcher() { 152 152 if (roleMatcher == null) { 153 153 roleMatcher = new MultipolygonRoleMatcher(); -
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r7834 r8126 72 72 public class OsmValidator implements LayerChangeListener { 73 73 74 public static ValidatorLayer errorLayer = null; 74 public static volatile ValidatorLayer errorLayer = null; 75 75 76 76 /** The validate action */ -
trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
r8106 r8126 57 57 protected static final int OUTER_STYLE = 1613; 58 58 59 private static ElemStyles styles; 59 private static volatile ElemStyles styles; 60 60 61 61 private final List<List<Node>> nonClosedWays = new ArrayList<>(); … … 222 222 } else { 223 223 /* old style multipolygon - solve: copy tags from outer way to multipolygon */ 224 addError(r, new TestError(this, Severity.WARNING, 224 addError(r, new TestError(this, Severity.WARNING, 225 225 trn("Multipolygon relation should be tagged with area tags and not the outer way", 226 226 "Multipolygon relation should be tagged with area tags and not the outer ways", polygon.getOuterWays().size()), -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r7268 r8126 71 71 72 72 /** The spell check key substitutions: the key should be substituted by the value */ 73 private static Map<String, String> spellCheckKeyData; 73 private static volatile Map<String, String> spellCheckKeyData; 74 74 /** The spell check preset values */ 75 private static MultiMap<String, String> presetsValueData; 75 private static volatile MultiMap<String, String> presetsValueData; 76 76 /** The TagChecker data */ 77 77 private static final List<CheckerData> checkerData = new ArrayList<>(); … … 364 364 withErrors.put(p, "IPK"); 365 365 } 366 if (checkKeys && key.indexOf(' ') >= 0 && !withErrors.contains(p, "IPK")) { 366 if (checkKeys && key != null && key.indexOf(' ') >= 0 && !withErrors.contains(p, "IPK")) { 367 367 errors.add( new TestError(this, Severity.WARNING, tr("Invalid white space in property key"), 368 368 tr(s, key), MessageFormat.format(s, key), INVALID_KEY_SPACE, p) ); … … 379 379 withErrors.put(p, "HTML"); 380 380 } 381 if (checkValues && value != null && value.length() > 0 && presetsValueData != null) { 381 if (checkValues && key != null && value != null && value.length() > 0 && presetsValueData != null) { 382 382 final Set<String> values = presetsValueData.get(key); 383 383 final boolean keyInPresets = values != null; … … 423 423 } 424 424 } 425 if (checkFixmes && value != null && value.length() > 0) { 425 if (checkFixmes && key != null && value != null && value.length() > 0) { 426 426 if ((value.toLowerCase().contains("fixme") 427 427 || value.contains("check and delete") -
trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
r7025 r8126 334 334 }; 335 335 336 private static Map<String, String> mapNameToValue = null; 336 private static volatile Map<String, String> mapNameToValue = null; 337 337 338 338 public String unescape(String str) { -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r7305 r8126 59 59 * @return the unique instance of this formatter 60 60 */ 61 public static DefaultNameFormatter getInstance() { 61 public static synchronized DefaultNameFormatter getInstance() { 62 62 if (instance == null) { 63 63 instance = new DefaultNameFormatter(); … … 109 109 * @return the list of naming tags used in relations 110 110 */ 111 public static List<String> getNamingtagsForRelations() { 111 public static synchronized List<String> getNamingtagsForRelations() { 112 112 if (namingTagsForRelations == null) { 113 113 namingTagsForRelations = new ArrayList<>( -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r7005 r8126 280 280 } // end constructor 281 281 282 private static boolean supportsDnD() 282 private static synchronized boolean supportsDnD() 283 283 { // Static Boolean 284 284 if( supportsDnD == null ) -
trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
r7434 r8126 59 59 * @return the unique instance of the JOSM user identity manager 60 60 */ 61 public static JosmUserIdentityManager getInstance() { 61 public static synchronized JosmUserIdentityManager getInstance() { 62 62 if (instance == null) { 63 63 instance = new JosmUserIdentityManager(); … … 283 283 if (OsmApi.isUsingOAuth()) { 284 284 try { 285 instance.initFromOAuth(Main.parent);285 getInstance().initFromOAuth(Main.parent); 286 286 } catch (Exception e) { 287 287 Main.error(e); -
trunk/src/org/openstreetmap/josm/gui/NotificationManager.java
r8116 r8126 76 76 private final Color PANEL_OPAQUE = new Color(224, 236, 249); 77 77 78 public static NotificationManager getInstance() { 78 public static synchronized NotificationManager getInstance() { 79 79 if (INSTANCE == null) { 80 80 INSTANCE = new NotificationManager(); -
trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java
r7005 r8126 59 59 * @return The unique instance of this dialog 60 60 */ 61 public static DeleteFromRelationConfirmationDialog getInstance() { 61 public static synchronized DeleteFromRelationConfirmationDialog getInstance() { 62 62 if (instance == null) { 63 63 instance = new DeleteFromRelationConfirmationDialog(); -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r7674 r8126 100 100 */ 101 101 @Deprecated 102 public static CombinePrimitiveResolverDialog getInstance() { 102 public static synchronized CombinePrimitiveResolverDialog getInstance() { 103 103 if (instance == null) { 104 104 GuiHelper.runInEDTAndWait(new Runnable() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r7617 r8126 80 80 public class LayerListDialog extends ToggleDialog { 81 81 /** the unique instance of the dialog */ 82 private static LayerListDialog instance; 82 private static volatile LayerListDialog instance; 83 83 84 84 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
r7982 r8126 69 69 70 70 /** the unique instance of the cache manager */ 71 private static ChangesetCacheManager instance; 71 private static volatile ChangesetCacheManager instance; 72 72 73 73 /** -
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r8071 r8126 60 60 * @return the unique instance of the download dialog 61 61 */ 62 public static DownloadDialog getInstance() { 62 public static synchronized DownloadDialog getInstance() { 63 63 if (instance == null) { 64 64 instance = new DownloadDialog(Main.parent); -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r7082 r8126 72 72 * @return the unique instance of the help browser 73 73 */ 74 public static HelpBrowser getInstance() { 74 public static synchronized HelpBrowser getInstance() { 75 75 if (instance == null) { 76 76 instance = new HelpBrowser(); -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
r7528 r8126 38 38 * @return the unique instance 39 39 */ 40 public static HistoryBrowserDialogManager getInstance() { 40 public static synchronized HistoryBrowserDialogManager getInstance() { 41 41 if (instance == null) { 42 42 instance = new HistoryBrowserDialogManager(); -
trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java
r6070 r8126 2 2 package org.openstreetmap.josm.gui.io; 3 3 4 import java.util.Objects; 4 5 import java.util.Observable; 5 6 … … 7 8 * ChangesetCommentModel is an observable model for the changeset comment edited 8 9 * in the {@link UploadDialog}. 9 * 10 * @since 3133 10 11 */ 11 12 public class ChangesetCommentModel extends Observable { … … 13 14 14 15 /** 15 * Sets the current changeset comment and notifies observers if the comment 16 * has changed. 16 * Sets the current changeset comment and notifies observers if the comment has changed. 17 17 * 18 18 * @param comment the new upload comment. Empty string assumed if null. … … 21 21 String oldValue = this.comment; 22 22 this.comment = comment == null ? "" : comment; 23 if (!oldValue .equals(this.comment)) {23 if (!Objects.equals(oldValue, this.comment)) { 24 24 setChanged(); 25 25 notifyObservers(this.comment); -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r7375 r8126 74 74 * @return the unique instance of the upload dialog 75 75 */ 76 public static UploadDialog getUploadDialog() { 76 public static synchronized UploadDialog getUploadDialog() { 77 77 if (uploadDialog == null) { 78 78 uploadDialog = new UploadDialog(); -
trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java
r7937 r8126 27 27 } 28 28 29 private static JumpToNextMarker jumpToNextMarkerAction; 30 private static JumpToPreviousMarker jumpToPreviousMarkerAction; 29 private static volatile JumpToNextMarker jumpToNextMarkerAction; 30 private static volatile JumpToPreviousMarker jumpToPreviousMarkerAction; 31 31 32 32 public static void initialize() { -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r8061 r8126 232 232 * a paint texture for non-downloaded area 233 233 */ 234 private static TexturePaint hatched; 234 private static volatile TexturePaint hatched; 235 235 236 236 static { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r8061 r8126 902 902 } 903 903 904 private static List<MapMode> supportedMapModes = null; 904 private static volatile List<MapMode> supportedMapModes = null; 905 905 906 906 /** -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
r8069 r8126 49 49 50 50 // Only one instance of that class is present at one time 51 private static ImageViewerDialog dialog; 51 private static volatile ImageViewerDialog dialog; 52 52 53 53 private boolean collapseButtonClicked = false; -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java
r8056 r8126 23 23 24 24 private URL audioUrl; 25 private static AudioMarker recentlyPlayedMarker = null; 25 private static volatile AudioMarker recentlyPlayedMarker = null; 26 26 public double syncOffset; 27 27 public boolean timeFromAudio = false; // as opposed to from the GPX track -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
r7310 r8126 38 38 private Timer timer = null; 39 39 private double animationInterval = 0.0; // seconds 40 private static PlayHeadMarker playHead = null; 40 private static volatile PlayHeadMarker playHead = null; 41 41 private MapMode oldMode = null; 42 42 private LatLon oldCoor; -
trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
r8087 r8126 172 172 * session. There should be preference listener updating this cache. 173 173 */ 174 private static Color DEFAULT_TEXT_COLOR = null; 174 private static volatile Color DEFAULT_TEXT_COLOR = null; 175 175 private static void initDefaultParameters() { 176 176 if (DEFAULT_TEXT_COLOR != null) return; -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java
r8097 r8126 135 135 * @see #getIconProvider() 136 136 */ 137 private static ImageProvider getDefaultIconProvider() { 137 private static synchronized ImageProvider getDefaultIconProvider() { 138 138 if (defaultIconProvider == null) { 139 139 defaultIconProvider = new ImageProvider("dialogs/mappaint", "pencil"); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java
r6643 r8126 21 21 * @return The unique instance of {@code OAuthAccessTokenHolder} 22 22 */ 23 public static OAuthAccessTokenHolder getInstance() { 23 public static synchronized OAuthAccessTokenHolder getInstance() { 24 24 if (instance == null) { 25 25 instance = new OAuthAccessTokenHolder(); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetNameTemplateList.java
r7937 r8126 21 21 * @return the unique instance 22 22 */ 23 public static TaggingPresetNameTemplateList getInstance() { 23 public static synchronized TaggingPresetNameTemplateList getInstance() { 24 24 if (instance == null) { 25 25 instance = new TaggingPresetNameTemplateList(); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
r7937 r8126 46 46 } 47 47 48 private static File zipIcons = null; 48 private static volatile File zipIcons = null; 49 49 50 50 /** -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchDialog.java
r7509 r8126 25 25 * @return the unique instance of {@code TaggingPresetSearchDialog}. 26 26 */ 27 public static TaggingPresetSearchDialog getInstance() { 27 public static synchronized TaggingPresetSearchDialog getInstance() { 28 28 if (instance == null) { 29 29 instance = new TaggingPresetSearchDialog(); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java
r7937 r8126 1 1 package org.openstreetmap.josm.gui.tagging; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 5 import java.awt.event.ActionEvent; 6 import java.awt.event.ActionListener; 7 import java.awt.event.KeyEvent; 8 import java.util.HashSet; 2 9 3 10 import org.openstreetmap.josm.Main; … … 7 14 import org.openstreetmap.josm.tools.Shortcut; 8 15 import org.openstreetmap.josm.tools.Utils; 9 10 import java.awt.event.ActionEvent;11 import java.awt.event.ActionListener;12 import java.awt.event.KeyEvent;13 import java.util.HashSet;14 15 import static org.openstreetmap.josm.tools.I18n.tr;16 16 17 17 /** … … 29 29 * @return the unique instance of {@code TaggingPresetSearchPrimitiveDialog}. 30 30 */ 31 public static TaggingPresetSearchPrimitiveDialog getInstance() { 31 public static synchronized TaggingPresetSearchPrimitiveDialog getInstance() { 32 32 if (instance == null) { 33 33 instance = new TaggingPresetSearchPrimitiveDialog(); -
trunk/src/org/openstreetmap/josm/gui/util/FileFilterAllFiles.java
r7937 r8126 10 10 /** 11 11 * A FileFilter that accepts all files. 12 * @since 5572 12 13 */ 13 14 public class FileFilterAllFiles extends FileFilter { … … 15 16 private static FileFilterAllFiles INSTANCE; 16 17 17 public static FileFilterAllFiles getInstance() { 18 /** 19 * Replies the unique instance. 20 * @return the unique instance 21 */ 22 public static synchronized FileFilterAllFiles getInstance() { 18 23 if (INSTANCE == null) { 19 24 INSTANCE = new FileFilterAllFiles(); -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenCheckBoxMenuItem.java
r7937 r8126 18 18 public class StayOpenCheckBoxMenuItem extends JCheckBoxMenuItem { 19 19 20 private static MenuElement[] path; 20 private static volatile MenuElement[] path; 21 21 22 22 { -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenMenuItem.java
r7937 r8126 17 17 public class StayOpenMenuItem extends JMenuItem { 18 18 19 private static MenuElement[] path; 19 private static volatile MenuElement[] path; 20 20 21 21 { -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenRadioButtonMenuItem.java
r7937 r8126 17 17 public class StayOpenRadioButtonMenuItem extends JRadioButtonMenuItem { 18 18 19 private static MenuElement[] path; 19 private static volatile MenuElement[] path; 20 20 21 21 { -
trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java
r7937 r8126 16 16 17 17 /** The locale for both implementations */ 18 protected static Locale locale; 18 protected static volatile Locale locale; 19 19 20 20 /** -
trunk/src/org/openstreetmap/josm/io/MessageNotifier.java
r7937 r8126 50 50 private static final Runnable WORKER = new Worker(); 51 51 52 private static ScheduledFuture<?> task = null; 52 private static volatile ScheduledFuture<?> task = null; 53 53 54 54 private static class Worker implements Runnable { -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r7869 r8126 55 55 56 56 /** Used by plugins to register themselves as data postprocessors. */ 57 private static List<OsmServerReadPostprocessor> postprocessors; 57 private static volatile List<OsmServerReadPostprocessor> postprocessors; 58 58 59 59 /** register a new postprocessor */ -
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r7656 r8126 37 37 private Collection<OsmPrimitive> processed; 38 38 39 private static List<OsmServerWritePostprocessor> postprocessors; 39 private static volatile List<OsmServerWritePostprocessor> postprocessors; 40 40 public static void registerPostprocessor(OsmServerWritePostprocessor pp) { 41 41 if (postprocessors == null) { -
trunk/src/org/openstreetmap/josm/io/OsmWriterFactory.java
r7937 r8126 17 17 public class OsmWriterFactory { 18 18 19 public static OsmWriterFactory theFactory; 19 public static volatile OsmWriterFactory theFactory; 20 20 public static OsmWriter createOsmWriter(PrintWriter out, boolean osmConform, String version) { 21 21 // pre-set factory with this default implementation; can still be overwritten -
trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
r7083 r8126 20 20 public class CredentialsManager implements CredentialsAgent { 21 21 22 private static CredentialsManager instance; 22 private static volatile CredentialsManager instance; 23 23 24 24 /** -
trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java
r7005 r8126 16 16 */ 17 17 public final class DefaultAuthenticator extends Authenticator { 18 private static DefaultAuthenticator instance; 18 private static volatile DefaultAuthenticator instance; 19 19 20 20 /** -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
r7800 r8126 23 23 private ServerSocket server; 24 24 25 private static RemoteControlHttpServer instance; 25 private static volatile RemoteControlHttpServer instance; 26 26 27 27 /** -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
r7937 r8126 75 75 private ServerSocket server; 76 76 77 private static RemoteControlHttpsServer instance; 77 private static volatile RemoteControlHttpsServer instance; 78 78 private boolean initOK = false; 79 79 private SSLContext sslContext; -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r8074 r8126 566 566 * @return the class loader 567 567 */ 568 public static DynamicURLClassLoader getPluginClassLoader() { 568 public static synchronized DynamicURLClassLoader getPluginClassLoader() { 569 569 if (pluginClassLoader == null) { 570 570 pluginClassLoader = AccessController.doPrivileged(new PrivilegedAction<DynamicURLClassLoader>() { -
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r7025 r8126 26 26 public final class AudioPlayer extends Thread { 27 27 28 private static AudioPlayer audioPlayer = null; 28 private static volatile AudioPlayer audioPlayer = null; 29 29 30 30 private enum State { INITIALIZING, NOTPLAYING, PLAYING, PAUSED, INTERRUPTED } -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r8018 r8126 42 42 43 43 private static boolean handlingInProgress = false; 44 private static BugReporterThread bugReporterThread = null; 44 private static volatile BugReporterThread bugReporterThread = null; 45 45 private static int exceptionCounter = 0; 46 46 private static boolean suppressExceptionDialogs = false; -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r7901 r8126 76 76 } 77 77 78 private static PluralMode pluralMode = PluralMode.MODE_NOTONE; /* english default */ 79 private static String loadedCode = "en"; 78 private static volatile PluralMode pluralMode = PluralMode.MODE_NOTONE; /* english default */ 79 private static volatile String loadedCode = "en"; 80 80 81 81 /* Localization keys for file chooser (and color chooser). */ … … 164 164 "OptionPane.cancelButtonText" 165 165 }; 166 private static Map<String, String> strings = null; 167 private static Map<String, String[]> pstrings = null; 166 private static volatile Map<String, String> strings = null; 167 private static volatile Map<String, String[]> pstrings = null; 168 168 private static Map<String, PluralMode> languages = new HashMap<>(); 169 169 -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r8102 r8126 1356 1356 } 1357 1357 1358 private static SVGUniverse getSvgUniverse() { 1358 private static synchronized SVGUniverse getSvgUniverse() { 1359 1359 if (svgUniverse == null) { 1360 1360 svgUniverse = new SVGUniverse(); -
trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
r7937 r8126 124 124 * @return The unique instance of this class 125 125 */ 126 public static MultikeyActionsHandler getInstance() { 126 public static synchronized MultikeyActionsHandler getInstance() { 127 127 if (instance == null) { 128 128 instance = new MultikeyActionsHandler(); -
trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java
r7509 r8126 7 7 import java.util.ArrayList; 8 8 import java.util.Collection; 9 9 10 import org.openstreetmap.josm.data.coor.LatLon; 10 11 import org.openstreetmap.josm.data.osm.BBox; … … 47 48 } 48 49 49 private static Collection<Area> leftHandTrafficPolygons; 50 private static GeoPropertyIndex<Boolean> rlCache; 50 private static volatile Collection<Area> leftHandTrafficPolygons; 51 private static volatile GeoPropertyIndex<Boolean> rlCache; 51 52 52 53 /**
Note:
See TracChangeset
for help on using the changeset viewer.