Ticket #21462: 21462-synchronized.patch

File 21462-synchronized.patch, 765 bytes (added by marcello@…, 4 years ago)

patch for excessive synchronization in preferences

  • src/org/openstreetmap/josm/data/Preferences.java

     
    682682     * @return {@code true}, if something has changed (i.e. value is different than before)
    683683     */
    684684    @Override
    685     public synchronized boolean putSetting(final String key, Setting<?> setting) {
     685    public boolean putSetting(final String key, Setting<?> setting) {
    686686        CheckParameterUtil.ensureParameterNotNull(key);
    687687        if (setting != null && setting.getValue() == null)
    688688            throw new IllegalArgumentException("setting argument must not have null value");