Changeset 9975 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-03-13T00:27:11+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
r9067 r9975 46 46 public abstract Collection<Command> execute(P oldprimitive, P primitive) throws UserCancelException; 47 47 48 private final String[] applicationOptions= new String[] {48 private static final String[] APPLICATION_OPTIONS = new String[] { 49 49 tr("Apply selected changes"), 50 50 tr("Do not apply changes"), … … 133 133 JOptionPane.PLAIN_MESSAGE, 134 134 null, 135 applicationOptions,136 applicationOptions[0]135 APPLICATION_OPTIONS, 136 APPLICATION_OPTIONS[0] 137 137 ); 138 138 -
trunk/src/org/openstreetmap/josm/data/osm/Storage.java
r9703 r9975 91 91 private int size; 92 92 private volatile int modCount; 93 private final double loadFactor= 0.6d;93 private static final double LOAD_FACTOR = 0.6d; 94 94 private static final int DEFAULT_CAPACITY = 16; 95 95 private final boolean safeIterator; … … 143 143 public Storage(Hash<? super T, ? super T> ha, int capacity, boolean safeIterator) { 144 144 this.hash = ha; 145 int cap = 1 << (int) (Math.ceil(Math.log(capacity/ loadFactor) / Math.log(2)));145 int cap = 1 << (int) (Math.ceil(Math.log(capacity/LOAD_FACTOR) / Math.log(2))); 146 146 @SuppressWarnings("unchecked") T[] newData = (T[]) new Object[cap]; 147 147 data = newData; … … 328 328 329 329 private void ensureSpace() { 330 if (size > data.length* loadFactor) { // rehash330 if (size > data.length*LOAD_FACTOR) { // rehash 331 331 @SuppressWarnings("unchecked") T[] big = (T[]) new Object[data.length * 2]; 332 332 int nMask = big.length - 1; -
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
r9941 r9975 98 98 KeyEvent.VK_H, Shortcut.ALT_CTRL); 99 99 100 protected final String[] columnToolTips= {100 protected static final String[] COLUMN_TOOLTIPS = { 101 101 Main.platform.makeTooltip(tr("Enable filter"), ENABLE_FILTER_SHORTCUT), 102 102 Main.platform.makeTooltip(tr("Hiding filter"), HIDING_FILTER_SHORTCUT), … … 116 116 int index = columnModel.getColumnIndexAtX(p.x); 117 117 int realIndex = columnModel.getColumn(index).getModelIndex(); 118 return columnToolTips[realIndex];118 return COLUMN_TOOLTIPS[realIndex]; 119 119 } 120 120 }; -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r9926 r9975 888 888 @Override 889 889 public boolean supportLayers(List<Layer> layers) { 890 if (layers. size() < 1) {890 if (layers.isEmpty()) { 891 891 return false; 892 892 } else { -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
r9770 r9975 21 21 22 22 @SuppressWarnings("unchecked") 23 private final DividedScale<StyleElementList>[] states = (DividedScale<StyleElementList>[])new DividedScale[2];23 private final DividedScale<StyleElementList>[] states = new DividedScale[2]; 24 24 25 25 private StyleCache(StyleCache sc) {
Note:
See TracChangeset
for help on using the changeset viewer.