Changeset 8870 in josm


Ignore:
Timestamp:
2015-10-13T23:50:14+02:00 (5 years ago)
Author:
Don-vip
Message:

sonar - squid:S2325 - "private" methods that don't access instance data should be "static"

Location:
trunk/src/org/openstreetmap/josm
Files:
87 edited

Legend:

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

    r8863 r8870  
    12651265        }
    12661266
    1267         private void handleComponentEvent(ComponentEvent e) {
     1267        private static void handleComponentEvent(ComponentEvent e) {
    12681268            Component c = e.getComponent();
    12691269            if (c instanceof JFrame && c.isVisible()) {
  • trunk/src/org/openstreetmap/josm/actions/AboutAction.java

    r8510 r8870  
    111111    }
    112112
    113     private JScrollPane createScrollPane(JosmTextArea area) {
     113    private static JScrollPane createScrollPane(JosmTextArea area) {
    114114        area.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    115115        area.setOpaque(false);
  • trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java

    r8840 r8870  
    291291     * @return List of nodes with more than one referrer
    292292     */
    293     private List<Node> collectNodesWithExternReferers(List<Way> ways) {
     293    private static List<Node> collectNodesWithExternReferers(List<Way> ways) {
    294294        List<Node> withReferrers = new ArrayList<>();
    295295        for (Way w: ways) {
     
    308308     * @return Nodes anticlockwise ordered
    309309     */
    310     private List<Node> collectNodesAnticlockwise(List<Way> ways) {
     310    private static List<Node> collectNodesAnticlockwise(List<Way> ways) {
    311311        List<Node> nodes = new ArrayList<>();
    312312        Node firstNode = ways.get(0).firstNode();
     
    355355     * @return true if action can be done
    356356     */
    357     private boolean actionAllowed(Collection<Node> nodes) {
     357    private static boolean actionAllowed(Collection<Node> nodes) {
    358358        boolean outside = false;
    359359        for (Node n: nodes) {
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r8836 r8870  
    8282     * @return A array of two nodes.
    8383     */
    84     private Node[] nodePairFurthestApart(List<Node> nodes) {
     84    private static Node[] nodePairFurthestApart(List<Node> nodes) {
    8585        // Detect if selected nodes are on the same way.
    8686
     
    134134     * @return An array containing the two most distant nodes.
    135135     */
    136     private Node[] nodeFurthestAppart(List<Node> nodes) {
     136    private static Node[] nodeFurthestAppart(List<Node> nodes) {
    137137        Node node1 = null, node2 = null;
    138138        double minSqDistance = 0;
     
    214214     * @throws InvalidSelection If the nodes have same coordinates.
    215215     */
    216     private Command alignOnlyNodes(List<Node> nodes) throws InvalidSelection {
     216    private static Command alignOnlyNodes(List<Node> nodes) throws InvalidSelection {
    217217        // Choose nodes used as anchor points for projection.
    218218        Node[] anchors = nodePairFurthestApart(nodes);
     
    232232     * @throws InvalidSelection if a polygon is selected, or if a node is used by 3 or more ways
    233233     */
    234     private Command alignMultiWay(Collection<Way> ways) throws InvalidSelection {
     234    private static Command alignMultiWay(Collection<Way> ways) throws InvalidSelection {
    235235        // Collect all nodes and compute line equation
    236236        Set<Node> nodes = new HashSet<>();
     
    270270     * @throws InvalidSelection if a node got more than 4 neighbours (self-crossing way)
    271271     */
    272     private List<Line> getInvolvedLines(Node node, List<Way> refWays) throws InvalidSelection {
     272    private static List<Line> getInvolvedLines(Node node, List<Way> refWays) throws InvalidSelection {
    273273        List<Line> lines = new ArrayList<>();
    274274        List<Node> neighbors = new ArrayList<>();
     
    327327     * @throws InvalidSelection if more than 2 lines
    328328     */
    329     private Command alignSingleNode(Node node, List<Line> lines) throws InvalidSelection {
     329    private static Command alignSingleNode(Node node, List<Line> lines) throws InvalidSelection {
    330330        if (lines.size() == 1)
    331331            return lines.get(0).projectionCommand(node);
  • trunk/src/org/openstreetmap/josm/actions/CopyAction.java

    r8510 r8870  
    8686    }
    8787
    88     private boolean isEmptySelection() {
     88    private static boolean isEmptySelection() {
    8989        Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
    9090        if (sel.isEmpty()) {
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r8513 r8870  
    248248     * @return Modified nodes list ordered according hand traffic.
    249249     */
    250     private List<Node> orderNodesByTrafficHand(List<Node> nodes) {
     250    private static List<Node> orderNodesByTrafficHand(List<Node> nodes) {
    251251        boolean rightHandTraffic = true;
    252252        for (Node n: nodes) {
     
    268268     * @return Modified nodes list with same direction as way.
    269269     */
    270     private List<Node> orderNodesByWay(List<Node> nodes, Way way) {
     270    private static List<Node> orderNodesByWay(List<Node> nodes, Way way) {
    271271        List<Node> wayNodes = way.getNodes();
    272272        if (!way.isClosed()) {
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r8795 r8870  
    172172    }
    173173
    174     private Relation getSelectedMultipolygonRelation() {
     174    private static Relation getSelectedMultipolygonRelation() {
    175175        return getSelectedMultipolygonRelation(getCurrentDataSet().getSelectedWays(), getCurrentDataSet().getSelectedRelations());
    176176    }
  • trunk/src/org/openstreetmap/josm/actions/DistributeAction.java

    r8795 r8870  
    112112     * @return true in this case
    113113     */
    114     private boolean checkDistributeWay(Collection<Way> ways, Collection<Node> nodes) {
     114    private static boolean checkDistributeWay(Collection<Way> ways, Collection<Node> nodes) {
    115115        if (ways.size() == 1 && nodes.size() <= 2) {
    116116            Way w = ways.iterator().next();
     
    137137     * @return Collection of command to be executed.
    138138     */
    139     private Collection<Command> distributeWay(Collection<Way> ways,
     139    private static Collection<Command> distributeWay(Collection<Way> ways,
    140140                                              Collection<Node> nodes) {
    141141        Way w = ways.iterator().next();
     
    201201     * @return true in this case
    202202     */
    203     private Boolean checkDistributeNodes(Collection<Way> ways, Collection<Node> nodes) {
     203    private static Boolean checkDistributeNodes(Collection<Way> ways, Collection<Node> nodes) {
    204204        return ways.isEmpty() && nodes.size() >= 3;
    205205    }
     
    284284     * @return Set of nodes without coordinates
    285285     */
    286     private Set<Node> removeNodesWithoutCoordinates(Collection<Node> col) {
     286    private static Set<Node> removeNodesWithoutCoordinates(Collection<Node> col) {
    287287        Set<Node> result = new HashSet<>();
    288288        for (Iterator<Node> it = col.iterator(); it.hasNext();) {
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r8840 r8870  
    963963     * @return list of node paths to produce.
    964964     */
    965     private List<List<Node>> buildNodeChunks(Way way, Collection<Node> splitNodes) {
     965    private static List<List<Node>> buildNodeChunks(Way way, Collection<Node> splitNodes) {
    966966        List<List<Node>> result = new ArrayList<>();
    967967        List<Node> curList = new ArrayList<>();
  • trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java

    r8855 r8870  
    233233     * @see WMSLayer#checkGrabberType
    234234     */
    235     private void addWMSLayer(String title, String url) {
     235    private static void addWMSLayer(String title, String url) {
    236236        WMSLayer layer = new WMSLayer(new ImageryInfo(title, url));
    237237        Main.main.addLayer(layer);
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r8510 r8870  
    310310    }
    311311
    312     private boolean hasOnlyIncompleteMembers(Relation r, Collection<OsmPrimitive> toPurge, Collection<? extends OsmPrimitive> moreToPurge) {
     312    private static boolean hasOnlyIncompleteMembers(
     313            Relation r, Collection<OsmPrimitive> toPurge, Collection<? extends OsmPrimitive> moreToPurge) {
    313314        for (RelationMember m : r.getMembers()) {
    314315            if (!m.getMember().isIncomplete() && !toPurge.contains(m.getMember()) && !moreToPurge.contains(m.getMember()))
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r8846 r8870  
    303303     * </ul>
    304304     */
    305     private Way modifyWay(Node originalNode, Way w, List<Command> cmds, List<Node> newNodes) {
     305    private static Way modifyWay(Node originalNode, Way w, List<Command> cmds, List<Node> newNodes) {
    306306        // clone the node for the way
    307307        Node newNode = new Node(originalNode, true /* clear OSM ID */);
     
    396396     * @param newNodes New created nodes by this set of command
    397397     */
    398     private void execCommands(List<Command> cmds, List<Node> newNodes) {
     398    private static void execCommands(List<Command> cmds, List<Node> newNodes) {
    399399        Main.main.undoRedo.add(new SequenceCommand(/* for correct i18n of plural forms - see #9110 */
    400400                trn("Dupe into {0} node", "Dupe into {0} nodes", newNodes.size() + 1, newNodes.size() + 1), cmds));
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java

    r8840 r8870  
    169169     * removes any highlighting that may have been set beforehand.
    170170     */
    171     private void removeHighlighting() {
     171    private static void removeHighlighting() {
    172172        highlightHelper.clear();
    173173        DataSet ds = getCurrentDataSet();
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r8855 r8870  
    831831    }
    832832
    833     private void showStatusInfo(double angle, double hdg, double distance, boolean activeFlag) {
     833    private static void showStatusInfo(double angle, double hdg, double distance, boolean activeFlag) {
    834834        Main.map.statusLine.setAngle(angle);
    835835        Main.map.statusLine.activateAnglePanel(activeFlag);
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r8846 r8870  
    561561     * @param e current mouse point
    562562     */
    563     private void addNewNode(MouseEvent e) {
     563    private static void addNewNode(MouseEvent e) {
    564564        // Should maybe do the same as in DrawAction and fetch all nearby segments?
    565565        WaySegment ws = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive.isSelectablePredicate);
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ModifiersSpec.java

    r8470 r8870  
    4545    }
    4646
    47     private boolean match(final int a, final int knownValue) {
     47    private static boolean match(final int a, final int knownValue) {
    4848        assert knownValue == ON | knownValue == OFF;
    4949        return a == knownValue || a == UNKNOWN;
    5050    }
    5151
    52     private boolean match(final int a, final boolean knownValue) {
     52    private static boolean match(final int a, final boolean knownValue) {
    5353        return a == (knownValue ? ON : OFF) || a == UNKNOWN;
    5454    }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r8808 r8870  
    362362    }
    363363
    364     private void removeWayHighlighting(Collection<Way> ways) {
     364    private static void removeWayHighlighting(Collection<Way> ways) {
    365365        if (ways == null)
    366366            return;
     
    566566    }
    567567
    568     private String prefKey(String subKey) {
     568    private static String prefKey(String subKey) {
    569569        return "edit.make-parallel-way-action." + subKey;
    570570    }
    571571
    572     private String getStringPref(String subKey, String def) {
     572    private static String getStringPref(String subKey, String def) {
    573573        return Main.pref.get(prefKey(subKey), def);
    574574    }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r8846 r8870  
    772772    }
    773773
    774     private boolean doesImpactStatusLine(Collection<Node> affectedNodes, Collection<Way> selectedWays) {
     774    private static boolean doesImpactStatusLine(Collection<Node> affectedNodes, Collection<Way> selectedWays) {
    775775        for (Way w : selectedWays) {
    776776            for (Node n : w.getNodes()) {
     
    798798     * Obtain command in undoRedo stack to "continue" when dragging
    799799     */
    800     private Command getLastCommand() {
     800    private static Command getLastCommand() {
    801801        Command c = !Main.main.undoRedo.commands.isEmpty()
    802802                ? Main.main.undoRedo.commands.getLast() : null;
  • trunk/src/org/openstreetmap/josm/actions/upload/ApiPreconditionCheckerHook.java

    r8510 r8870  
    5050    }
    5151
    52     private boolean checkMaxNodes(Collection<OsmPrimitive> primitives, long maxNodes) {
     52    private static boolean checkMaxNodes(Collection<OsmPrimitive> primitives, long maxNodes) {
    5353        for (OsmPrimitive osmPrimitive : primitives) {
    5454            for (String key: osmPrimitive.keySet()) {
  • trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java

    r8380 r8870  
    109109     *          if the user requested cancel.
    110110     */
    111     private boolean displayErrorScreen(List<TestError> errors) {
     111    private static boolean displayErrorScreen(List<TestError> errors) {
    112112        JPanel p = new JPanel(new GridBagLayout());
    113113        ValidatorTreePanel errorPanel = new ValidatorTreePanel(errors);
  • trunk/src/org/openstreetmap/josm/data/AutosaveTask.java

    r8846 r8870  
    118118    }
    119119
    120     private String getFileName(String layerName, int index) {
     120    private static String getFileName(String layerName, int index) {
    121121        String result = layerName;
    122122        for (char illegalCharacter : ILLEGAL_CHARACTERS) {
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r8846 r8870  
    614614        }
    615615
    616         private void processPluginInstallElement(Element elem) {
     616        private static void processPluginInstallElement(Element elem) {
    617617            String install = elem.getAttribute("install");
    618618            String uninstall = elem.getAttribute("remove");
     
    739739        }
    740740
    741         private String normalizeDirName(String dir) {
     741        private static String normalizeDirName(String dir) {
    742742            String s = dir.replace('\\', '/');
    743743            if (s.endsWith("/")) s = s.substring(0, s.length()-1);
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r8846 r8870  
    689689    }
    690690
    691     private void addPossibleResourceDir(Set<String> locations, String s) {
     691    private static void addPossibleResourceDir(Set<String> locations, String s) {
    692692        if (s != null) {
    693693            if (!s.endsWith(File.separator)) {
     
    867867    }
    868868
    869     private void setCorrectPermissions(File file) {
     869    private static void setCorrectPermissions(File file) {
    870870        if (!file.setReadable(false, false) && Main.isDebugEnabled()) {
    871871            Main.debug(tr("Unable to set file non-readable {0}", file.getAbsolutePath()));
     
    13371337    }
    13381338
    1339     private <T> Collection<Map<String, String>> serializeListOfStructs(Collection<T> l, Class<T> klass) {
     1339    private static <T> Collection<Map<String, String>> serializeListOfStructs(Collection<T> l, Class<T> klass) {
    13401340        if (l == null)
    13411341            return null;
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java

    r8824 r8870  
    247247
    248248    // some additional checks to respect extended URLs in preferences (legacy workaround)
    249     private boolean isSimilar(String a, String b) {
     249    private static boolean isSimilar(String a, String b) {
    250250        return Objects.equals(a, b) || (a != null && b != null && !a.isEmpty() && !b.isEmpty() && (a.contains(b) || b.contains(a)));
    251251    }
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r8855 r8870  
    969969    }
    970970
    971     private void deleteWay(Way way) {
     971    private static void deleteWay(Way way) {
    972972        way.setNodes(null);
    973973        way.setDeleted(true);
     
    10991099    }
    11001100
    1101     private void reindexRelation(Relation relation) {
     1101    private static void reindexRelation(Relation relation) {
    11021102        BBox before = relation.getBBox();
    11031103        relation.updatePosition();
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r8565 r8870  
    218218    }
    219219
    220     private void resetPrimitive(OsmPrimitive osm) {
     220    private static void resetPrimitive(OsmPrimitive osm) {
    221221        if (osm instanceof Way) {
    222222            ((Way) osm).setNodes(null);
  • trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java

    r8811 r8870  
    136136     * when hidden is false, returns whether the primitive is disabled or hidden
    137137     */
    138     private boolean isFiltered(OsmPrimitive primitive, boolean hidden) {
     138    private static boolean isFiltered(OsmPrimitive primitive, boolean hidden) {
    139139        return hidden ? primitive.isDisabledAndHidden() : primitive.isDisabled();
    140140    }
     
    147147     * @return true, if at least one non-inverted filter applies to the primitive
    148148     */
    149     private boolean isFilterExplicit(OsmPrimitive primitive, boolean hidden) {
     149    private static boolean isFilterExplicit(OsmPrimitive primitive, boolean hidden) {
    150150        return hidden ? primitive.getHiddenType() : primitive.getDisabledType();
    151151    }
     
    162162     * (c) at least one of the parent ways is explicitly filtered
    163163     */
    164     private boolean allParentWaysFiltered(OsmPrimitive primitive, boolean hidden) {
     164    private static boolean allParentWaysFiltered(OsmPrimitive primitive, boolean hidden) {
    165165        List<OsmPrimitive> refs = primitive.getReferrers();
    166166        boolean isExplicit = false;
     
    175175    }
    176176
    177     private boolean oneParentWayNotFiltered(OsmPrimitive primitive, boolean hidden) {
     177    private static boolean oneParentWayNotFiltered(OsmPrimitive primitive, boolean hidden) {
    178178        List<OsmPrimitive> refs = primitive.getReferrers();
    179179        for (OsmPrimitive p: refs) {
     
    185185    }
    186186
    187     private boolean allParentMultipolygonsFiltered(OsmPrimitive primitive, boolean hidden) {
     187    private static boolean allParentMultipolygonsFiltered(OsmPrimitive primitive, boolean hidden) {
    188188        boolean isExplicit = false;
    189189        for (Relation r : new SubclassFilteredCollection<OsmPrimitive, Relation>(
     
    196196    }
    197197
    198     private boolean oneParentMultipolygonNotFiltered(OsmPrimitive primitive, boolean hidden) {
     198    private static boolean oneParentMultipolygonNotFiltered(OsmPrimitive primitive, boolean hidden) {
    199199        for (Relation r : new SubclassFilteredCollection<OsmPrimitive, Relation>(
    200200                primitive.getReferrers(), OsmPrimitive.multipolygonPredicate)) {
     
    205205    }
    206206
    207     private FilterType test(List<FilterInfo> filters, OsmPrimitive primitive, boolean hidden) {
     207    private static FilterType test(List<FilterInfo> filters, OsmPrimitive primitive, boolean hidden) {
    208208
    209209        if (primitive.isIncomplete())
  • trunk/src/org/openstreetmap/josm/data/osm/NoteData.java

    r8840 r8870  
    279279    }
    280280
    281     private User getCurrentUser() {
     281    private static User getCurrentUser() {
    282282        JosmUserIdentityManager userMgr = JosmUserIdentityManager.getInstance();
    283283        return User.createOsmUser(userMgr.getUserId(), userMgr.getUserName());
  • trunk/src/org/openstreetmap/josm/data/osm/Storage.java

    r8855 r8870  
    266266     * Additional mixing of hash
    267267     */
    268     private int rehash(int h) {
     268    private static int rehash(int h) {
    269269        return 1103515245*h >> 2;
    270270    }
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r8846 r8870  
    8181     * Prevent directly following identical nodes in ways.
    8282     */
    83     private List<Node> removeDouble(List<Node> nodes) {
     83    private static List<Node> removeDouble(List<Node> nodes) {
    8484        Node last = null;
    8585        int count = nodes.size();
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r8846 r8870  
    363363    }
    364364
    365     private Polygon buildPolygon(Point center, int radius, int sides, double rotation) {
     365    private static Polygon buildPolygon(Point center, int radius, int sides, double rotation) {
    366366        Polygon polygon = new Polygon();
    367367        for (int i = 0; i < sides; i++) {
     
    15001500    }
    15011501
    1502     private double[] pointAt(double t, Polygon poly, double pathLength) {
     1502    private static double[] pointAt(double t, Polygon poly, double pathLength) {
    15031503        double totalLen = t * pathLength;
    15041504        double curLen = 0;
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java

    r8855 r8870  
    276276    }
    277277
    278     private boolean isNodeTagged(Node n) {
     278    private static boolean isNodeTagged(Node n) {
    279279        return n.isTagged() || n.isAnnotated();
    280280    }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java

    r8512 r8870  
    7777        }
    7878
    79         private void setNormalized(Collection<String> literals, List<String> target) {
     79        private static void setNormalized(Collection<String> literals, List<String> target) {
    8080            target.clear();
    8181            for (String l: literals) {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java

    r8739 r8870  
    202202    }
    203203
    204     private void dispatchEvent(AbstractDatasetChangedEvent event, Relation r, Collection<Map<Relation, Multipolygon>> maps) {
     204    private static void dispatchEvent(AbstractDatasetChangedEvent event, Relation r, Collection<Map<Relation, Multipolygon>> maps) {
    205205        for (Map<Relation, Multipolygon> map : maps) {
    206206            Multipolygon m = map.get(r);
     
    217217    }
    218218
    219     private void removeMultipolygonFrom(Relation r, Collection<Map<Relation, Multipolygon>> maps) {
     219    private static void removeMultipolygonFrom(Relation r, Collection<Map<Relation, Multipolygon>> maps) {
    220220        for (Map<Relation, Multipolygon> map : maps) {
    221221            map.remove(r);
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r8510 r8870  
    8383    private NTV2SubGrid lastSubGrid;
    8484
    85     private void readBytes(InputStream in, byte[] b) throws IOException {
     85    private static void readBytes(InputStream in, byte[] b) throws IOException {
    8686        if (in.read(b) < b.length) {
    8787            Main.error("Failed to read expected amount of bytes ("+ b.length +") from stream");
     
    167167     * @return an array of top level Sub Grids with lower level Sub Grids set.
    168168     */
    169     private NTV2SubGrid[] createSubGridTree(NTV2SubGrid[] subGrid) {
     169    private static NTV2SubGrid[] createSubGridTree(NTV2SubGrid[] subGrid) {
    170170        int topLevelCount = 0;
    171171        Map<String, List<NTV2SubGrid>> subGridMap = new HashMap<>();
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r8512 r8870  
    149149    }
    150150
    151     private void readBytes(InputStream in, byte[] b) throws IOException {
     151    private static void readBytes(InputStream in, byte[] b) throws IOException {
    152152        if (in.read(b) < b.length) {
    153153            Main.error("Failed to read expected amount of bytes ("+ b.length +") from stream");
     
    209209     * @return interpolated value
    210210     */
    211     private double interpolate(float a, float b, float c, float d, double x, double y) {
     211    private static double interpolate(float a, float b, float c, float d, double x, double y) {
    212212        return a + (((double) b - (double) a) * x) + (((double) c - (double) a) * y) +
    213213        (((double) a + (double) d - b - c) * x * y);
  • trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java

    r8840 r8870  
    162162     * Check if plugin directory exists (store ignored errors file)
    163163     */
    164     private void checkValidatorDir() {
     164    private static void checkValidatorDir() {
    165165        try {
    166166            File pathDir = new File(getValidatorDir());
     
    173173    }
    174174
    175     private void loadIgnoredErrors() {
     175    private static void loadIgnoredErrors() {
    176176        ignoredErrors.clear();
    177177        if (Main.pref.getBoolean(ValidatorPreference.PREF_USE_IGNORE, true)) {
  • trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java

    r8510 r8870  
    218218    }
    219219
    220     private String chompLeadingDot(String str) {
     220    private static String chompLeadingDot(String str) {
    221221        if (str.startsWith(".")) {
    222222            return str.substring(1);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java

    r8777 r8870  
    9191    }
    9292
    93     private GeneralPath createPath(List<Node> nodes) {
     93    private static GeneralPath createPath(List<Node> nodes) {
    9494        GeneralPath result = new GeneralPath();
    9595        result.moveTo((float) nodes.get(0).getCoor().lat(), (float) nodes.get(0).getCoor().lon());
     
    109109    }
    110110
    111     private Intersection getPolygonIntersection(GeneralPath outer, List<Node> inner) {
     111    private static Intersection getPolygonIntersection(GeneralPath outer, List<Node> inner) {
    112112        boolean inside = false;
    113113        boolean outside = false;
     
    292292    }
    293293
    294     private void addRelationIfNeeded(TestError error, Relation r) {
     294    private static void addRelationIfNeeded(TestError error, Relation r) {
    295295        // Fix #8212 : if the error references only incomplete primitives,
    296296        // add multipolygon in order to let user select something and fix the error
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r8863 r8870  
    297297     * @param s string to check
    298298     */
    299     private boolean containsLow(String s) {
     299    private static boolean containsLow(String s) {
    300300        if (s == null)
    301301            return false;
     
    454454    }
    455455
    456     private Map<String, String> getPossibleValues(Set<String> values) {
     456    private static Map<String, String> getPossibleValues(Set<String> values) {
    457457        // generate a map with common typos
    458458        Map<String, String> map = new HashMap<>();
     
    666666            public boolean valueBool;
    667667
    668             private Pattern getPattern(String str) throws PatternSyntaxException {
     668            private static Pattern getPattern(String str) throws PatternSyntaxException {
    669669                if (str.endsWith("/i"))
    670670                    return Pattern.compile(str.substring(1, str.length()-2), Pattern.CASE_INSENSITIVE);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/WayConnectedToArea.java

    r8510 r8870  
    8484    }
    8585
    86     private boolean isArea(OsmPrimitive p) {
     86    private static boolean isArea(OsmPrimitive p) {
    8787        return (p.hasKey("landuse") || p.hasKey("natural"))
    8888                && ElemStyles.hasAreaElemStyle(p, false);
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r8863 r8870  
    422422    }
    423423
    424     private String getRelationTypeName(IRelation relation) {
     424    private static String getRelationTypeName(IRelation relation) {
    425425        String name = trc("Relation type", relation.get("type"));
    426426        if (name == null) {
     
    455455    }
    456456
    457     private String getNameTagValue(IRelation relation, String nameTag) {
     457    private static String getNameTagValue(IRelation relation, String nameTag) {
    458458        if ("name".equals(nameTag)) {
    459459            if (Main.pref.getBoolean("osm-primitives.localize-name", true))
     
    509509    }
    510510
    511     private String buildDefaultToolTip(long id, Map<String, String> tags) {
     511    private static String buildDefaultToolTip(long id, Map<String, String> tags) {
    512512        StringBuilder sb = new StringBuilder();
    513513        sb.append("<html><strong>id</strong>=")
  • trunk/src/org/openstreetmap/josm/gui/FileDrop.java

    r8848 r8870  
    3434import org.openstreetmap.josm.Main;
    3535import org.openstreetmap.josm.actions.OpenFileAction;
     36import org.openstreetmap.josm.gui.FileDrop.TransferableObject;
    3637
    3738// CHECKSTYLE.OFF: HideUtilityClassConstructor
     
    227228
    228229    /** Determine if the dragged data is a file list. */
    229     private boolean isDragOk(final DropTargetDragEvent evt) {
     230    private static boolean isDragOk(final DropTargetDragEvent evt) {
    230231        boolean ok = false;
    231232
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r8846 r8870  
    617617        }
    618618
    619         private void handleAutosave() {
     619        private static void handleAutosave() {
    620620            if (AutosaveTask.PROP_AUTOSAVE_ENABLED.get()) {
    621621                AutosaveTask autosaveTask = new AutosaveTask();
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r8863 r8870  
    909909     * @param result resulting list ofmenu items
    910910     */
    911     private void findMenuItems(final JMenu menu, final String textToFind, final List<JMenuItem> result) {
     911    private static void findMenuItems(final JMenu menu, final String textToFind, final List<JMenuItem> result) {
    912912        for (int i = 0; i < menu.getItemCount(); i++) {
    913913            JMenuItem menuItem = menu.getItem(i);
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r8856 r8870  
    207207    }
    208208
    209     private EastNorth calculateDefaultCenter() {
     209    private static EastNorth calculateDefaultCenter() {
    210210        Bounds b = DownloadDialog.getSavedDownloadBounds();
    211211        if (b == null) {
  • trunk/src/org/openstreetmap/josm/gui/SelectionManager.java

    r8557 r8870  
    368368    }
    369369
    370     private void selectionAreaChanged() {
     370    private static void selectionAreaChanged() {
    371371        // Trigger a redraw of the map view.
    372372        // A nicer way would be to provide change events for the temporary layer.
     
    436436    }
    437437
    438     private Polygon rectToPolygon(Rectangle r) {
     438    private static Polygon rectToPolygon(Rectangle r) {
    439439        Polygon poly = new Polygon();
    440440
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java

    r8856 r8870  
    288288     * @return List of primitives whose filtering can be affected by change in source primitives
    289289     */
    290     private Collection<OsmPrimitive> getAffectedPrimitives(Collection<? extends OsmPrimitive> primitives) {
     290    private static Collection<OsmPrimitive> getAffectedPrimitives(Collection<? extends OsmPrimitive> primitives) {
    291291        // Filters can use nested parent/child expression so complete tree is necessary
    292292        Set<OsmPrimitive> result = new HashSet<>();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java

    r8846 r8870  
    422422    }
    423423
    424     private String getSort(StyleSource s) {
     424    private static String getSort(StyleSource s) {
    425425        if (s instanceof XmlStyleSource) {
    426426            return tr("xml");
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r8863 r8870  
    226226     * @return {@code true} if the user accepts to overwrite key, {@code false} otherwise
    227227     */
    228     private boolean warnOverwriteKey(String action, String togglePref) {
     228    private static boolean warnOverwriteKey(String action, String togglePref) {
    229229        ExtendedDialog ed = new ExtendedDialog(
    230230                Main.parent,
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java

    r8510 r8870  
    191191    }
    192192
    193     private void setDotted(Graphics g) {
     193    private static void setDotted(Graphics g) {
    194194        ((Graphics2D) g).setStroke(new BasicStroke(
    195195                1f,
     
    201201    }
    202202
    203     private void unsetDotted(Graphics g) {
     203    private static void unsetDotted(Graphics g) {
    204204        ((Graphics2D) g).setStroke(new BasicStroke());
    205205    }
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r8855 r8870  
    788788        }
    789789
    790         private User getCurrentUser() {
     790        private static User getCurrentUser() {
    791791            UserInfo info = JosmUserIdentityManager.getInstance().getUserInfo();
    792792            return info == null ? User.getAnonymous() : User.createOsmUser(info.getId(), info.getDisplayName());
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r8836 r8870  
    568568    }
    569569
    570     private String getLastChangesetTagFromHistory(String historyKey, List<String> def) {
     570    private static String getLastChangesetTagFromHistory(String historyKey, List<String> def) {
    571571        Collection<String> history = Main.pref.getCollection(historyKey, def);
    572572        int age = (int) (System.currentTimeMillis() / 1000 - Main.pref.getInteger(BasicUploadSettingsPanel.HISTORY_LAST_USED_KEY, 0));
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r8846 r8870  
    12731273    }
    12741274
    1275     private int getLastIndexOfListBefore(List<ImageEntry> images, long searchedTime) {
     1275    private static int getLastIndexOfListBefore(List<ImageEntry> images, long searchedTime) {
    12761276        int lstSize = images.size();
    12771277
     
    13071307    }
    13081308
    1309     private String formatTimezone(double timezone) {
     1309    private static String formatTimezone(double timezone) {
    13101310        StringBuilder ret = new StringBuilder();
    13111311
     
    13261326    }
    13271327
    1328     private double parseTimezone(String timezone) throws ParseException {
     1328    private static double parseTimezone(String timezone) throws ParseException {
    13291329
    13301330        if (timezone.isEmpty())
     
    13971397    }
    13981398
    1399     private long parseOffset(String offset) throws ParseException {
     1399    private static long parseOffset(String offset) throws ParseException {
    14001400        String error = tr("Error while parsing offset.\nExpected format: {0}", "number");
    14011401
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r8846 r8870  
    444444    }
    445445
    446     private Dimension scaledDimension(Image thumb) {
     446    private static Dimension scaledDimension(Image thumb) {
    447447        final double d = Main.map.mapView.getDist100Pixel();
    448448        final double size = 10 /*meter*/;     /* size of the photo on the map */
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java

    r8840 r8870  
    559559    }
    560560
    561     private Point getCenterImgCoord(Rectangle visibleRect) {
     561    private static Point getCenterImgCoord(Rectangle visibleRect) {
    562562        return new Point(visibleRect.x + visibleRect.width / 2,
    563563                visibleRect.y + visibleRect.height / 2);
     
    630630    }
    631631
    632     private void checkVisibleRectPos(Image image, Rectangle visibleRect) {
     632    private static void checkVisibleRectPos(Image image, Rectangle visibleRect) {
    633633        if (visibleRect.x < 0) {
    634634            visibleRect.x = 0;
     
    645645    }
    646646
    647     private void checkVisibleRectSize(Image image, Rectangle visibleRect) {
     647    private static void checkVisibleRectSize(Image image, Rectangle visibleRect) {
    648648        if (visibleRect.width > image.getWidth(null)) {
    649649            visibleRect.width = image.getWidth(null);
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java

    r8848 r8870  
    5757    }
    5858
    59     private void warnCantImportIntoServerLayer(GpxLayer layer) {
     59    private static void warnCantImportIntoServerLayer(GpxLayer layer) {
    6060        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>" +
    6161                "Because its way points do not include a timestamp we cannot correlate them with audio data.</html>",
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java

    r8510 r8870  
    3333    }
    3434
    35     private void warnCantImportIntoServerLayer(GpxLayer layer) {
     35    private static void warnCantImportIntoServerLayer(GpxLayer layer) {
    3636        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>"+
    3737                "Because its way points do not include a timestamp we cannot correlate them with images.</html>",
     
    4141    }
    4242
    43     private void addRecursiveFiles(List<File> files, File[] sel) {
     43    private static void addRecursiveFiles(List<File> files, File[] sel) {
    4444        for (File f : sel) {
    4545            if (f.isDirectory()) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java

    r8836 r8870  
    6969        }
    7070
    71         private boolean mapHasGpxorMarkerLayer() {
     71        private static boolean mapHasGpxorMarkerLayer() {
    7272            for (Layer layer : Main.map.mapView.getAllLayers()) {
    7373                if (layer instanceof GpxLayer || layer instanceof MarkerLayer) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r8846 r8870  
    309309        }
    310310
    311         private boolean conditionRequiresKeyPresence(KeyMatchType matchType) {
     311        private static boolean conditionRequiresKeyPresence(KeyMatchType matchType) {
    312312            return matchType != KeyMatchType.REGEX;
    313313        }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java

    r8846 r8870  
    141141     * @param mc side effect: update the valid region for the current MultiCascade
    142142     */
    143     private boolean requiresUpdate(Prototype current, Prototype candidate, Double scale, MultiCascade mc) {
     143    private static boolean requiresUpdate(Prototype current, Prototype candidate, Double scale, MultiCascade mc) {
    144144        if (current == null || candidate.priority >= current.priority) {
    145145            if (scale == null)
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java

    r8846 r8870  
    684684        }
    685685
    686         private void appendRow(StringBuilder s, String th, String td) {
     686        private static void appendRow(StringBuilder s, String th, String td) {
    687687            s.append("<tr><th>").append(th).append("</th><td>").append(td).append("</td</tr>");
    688688        }
     
    14261426        }
    14271427
    1428         private String fromSourceEntry(SourceEntry entry) {
     1428        private static String fromSourceEntry(SourceEntry entry) {
    14291429            if (entry == null)
    14301430                return null;
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r8836 r8870  
    195195    }
    196196
    197     private File[] askUserForCustomSettingsFiles(boolean saveFileFlag, String title) {
     197    private static File[] askUserForCustomSettingsFiles(boolean saveFileFlag, String title) {
    198198        FileFilter filter = new FileFilter() {
    199199            @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java

    r8846 r8870  
    143143    }
    144144
    145     private String getName(String o) {
     145    private static String getName(String o) {
    146146        return Main.pref.getColorName(o);
    147147    }
     
    262262     * Add all missing color entries.
    263263     */
    264     private void fixColorPrefixes() {
     264    private static void fixColorPrefixes() {
    265265        PaintColors.getColors();
    266266        ConflictColors.getColors();
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java

    r8769 r8870  
    172172    }
    173173
    174     private Long getCacheSize(CacheAccess<String, BufferedImageCacheEntry> cache) {
     174    private static Long getCacheSize(CacheAccess<String, BufferedImageCacheEntry> cache) {
    175175        ICacheStats stats = cache.getStatistics();
    176176        for (IStats cacheStats: stats.getAuxiliaryCacheStats()) {
     
    242242    }
    243243
    244     private DefaultTableModel getTableModel(final CacheAccess<String, BufferedImageCacheEntry> cache) {
     244    private static DefaultTableModel getTableModel(final CacheAccess<String, BufferedImageCacheEntry> cache) {
    245245        final DefaultTableModel tableModel = new DefaultTableModel(
    246246                getCacheStats(cache),
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r8836 r8870  
    9999    }
    100100
    101     private void addSettingsSection(final JPanel p, String name, JPanel section, GBC gbc) {
     101    private static void addSettingsSection(final JPanel p, String name, JPanel section, GBC gbc) {
    102102        final JLabel lbl = new JLabel(name);
    103103        lbl.setFont(lbl.getFont().deriveFont(Font.BOLD));
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java

    r8836 r8870  
    164164        }
    165165
    166         private JComponent build() {
     166        private static JComponent build() {
    167167            StringBuilder s = new StringBuilder();
    168168            s.append("<b>+proj=...</b> - <i>").append(tr("Projection name"))
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r8554 r8870  
    471471    }
    472472
    473     private Collection<String> getSubprojectionPreference(ProjectionChoice pc) {
     473    private static Collection<String> getSubprojectionPreference(ProjectionChoice pc) {
    474474        return Main.pref.getCollection("projection.sub."+pc.getId(), null);
    475475    }
  • trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreference.java

    r8836 r8870  
    160160        }
    161161
    162         private void addDefault(List<ExtendedSourceEntry> defaults, String filename, String title, String description) {
     162        private static void addDefault(List<ExtendedSourceEntry> defaults, String filename, String title, String description) {
    163163            ExtendedSourceEntry i = new ExtendedSourceEntry(filename+".mapcss", "resource://data/validator/"+filename+".mapcss");
    164164            i.title = title;
  • trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java

    r8840 r8870  
    5353    private boolean cancelable;
    5454
    55     private void doInEDT(Runnable runnable) {
     55    private static void doInEDT(Runnable runnable) {
    5656        // This must be invoke later even if current thread is EDT because inside there is dialog.setVisible
    5757        // which freeze current code flow until modal dialog is closed
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetMenu.java

    r8863 r8870  
    6565    }
    6666
    67     private Component copyMenuComponent(Component menuComponent) {
     67    private static Component copyMenuComponent(Component menuComponent) {
    6868        if (menuComponent instanceof JMenu) {
    6969            JMenu menu = (JMenu) menuComponent;
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java

    r8863 r8870  
    162162        }
    163163
    164         private int isMatching(Collection<String> values, String[] searchString) {
     164        private static int isMatching(Collection<String> values, String[] searchString) {
    165165            int sum = 0;
    166166            for (String word: searchString) {
  • trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java

    r8846 r8870  
    198198    }
    199199
    200     private boolean isFocusInMainWindow() {
     200    private static boolean isFocusInMainWindow() {
    201201        Component focused = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
    202202        return focused != null && SwingUtilities.getWindowAncestor(focused) instanceof JFrame;
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r8846 r8870  
    312312    }
    313313
    314     private Dimension sizeWithInsets(Container parent, Dimension size) {
     314    private static Dimension sizeWithInsets(Container parent, Dimension size) {
    315315        Insets insets = parent.getInsets();
    316316        int width = size.width + insets.left + insets.right;
     
    331331    }
    332332
    333     private Rectangle boundsWithYandHeight(Rectangle bounds, double y, double height) {
     333    private static Rectangle boundsWithYandHeight(Rectangle bounds, double y, double height) {
    334334        Rectangle r = new Rectangle();
    335335        r.setBounds((int) (bounds.getX()), (int) y, (int) (bounds.getWidth()), (int) height);
     
    337337    }
    338338
    339     private Rectangle boundsWithXandWidth(Rectangle bounds, double x, double width) {
     339    private static Rectangle boundsWithXandWidth(Rectangle bounds, double x, double width) {
    340340        Rectangle r = new Rectangle();
    341341        r.setBounds((int) x, (int) (bounds.getY()), (int) width, (int) (bounds.getHeight()));
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r8849 r8870  
    2727import org.openstreetmap.josm.data.gpx.GpxConstants;
    2828import org.openstreetmap.josm.data.gpx.GpxData;
    29 import org.openstreetmap.josm.data.osm.DataSet;
    3029import org.openstreetmap.josm.gui.ExtendedDialog;
    3130import org.openstreetmap.josm.gui.layer.GpxLayer;
     
    173172            gpxData = ((GpxLayer) layer).data;
    174173        } else {
    175             gpxData = OsmDataLayer.toGpxData(getCurrentDataSet(), file);
     174            gpxData = OsmDataLayer.toGpxData(Main.main.getCurrentDataSet(), file);
    176175        }
    177176
     
    337336        authorNameListener.keyReleased(null);
    338337    }
    339 
    340     /**
    341      * Replies the current dataset
    342      *
    343      * @return the current dataset. null, if no current dataset exists
    344      */
    345     private DataSet getCurrentDataSet() {
    346         return Main.main.getCurrentDataSet();
    347     }
    348338}
  • trunk/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java

    r8387 r8870  
    6161    }
    6262
    63     private char filter(char in) {
     63    private static char filter(char in) {
    6464        if (in < 0x20 && INVALID_CHARS[in]) {
    6565            if (firstWarning) {
  • trunk/src/org/openstreetmap/josm/io/JpgImporter.java

    r8846 r8870  
    8888    }
    8989
    90     private void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor)
     90    private static void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor)
    9191            throws IOException {
    9292
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r8840 r8870  
    448448    }
    449449
    450     private LatLon parseLatLon(String ns, String ew, String dlat, String dlon)
     450    private static LatLon parseLatLon(String ns, String ew, String dlat, String dlon)
    451451    throws NumberFormatException {
    452452        String widthNorth = dlat.trim();
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r8846 r8870  
    210210    }
    211211
    212     private InputStream fixEncoding(InputStream stream, String encoding) throws IOException {
     212    private static InputStream fixEncoding(InputStream stream, String encoding) throws IOException {
    213213        if ("gzip".equalsIgnoreCase(encoding)) {
    214214            stream = new GZIPInputStream(stream);
  • trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java

    r8854 r8870  
    5454    }
    5555
    56     private String completeOverpassQuery(String query) {
     56    private static String completeOverpassQuery(String query) {
    5757        int firstColon = query.indexOf(';');
    5858        if (firstColon == -1) {
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java

    r8846 r8870  
    303303    }
    304304
    305     private boolean isProjSupported(String crs) {
     305    private static boolean isProjSupported(String crs) {
    306306        for (ProjectionChoice pc : ProjectionPreference.getProjectionChoices()) {
    307307            if (pc.getPreferencesFromCode(crs) != null) return true;
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java

    r8846 r8870  
    354354     *             When error
    355355     */
    356     private void sendHeader(Writer out, String status, String contentType,
     356    private static void sendHeader(Writer out, String status, String contentType,
    357357            boolean endHeaders) throws IOException {
    358358        out.write("HTTP/1.1 " + status + "\r\n");
  • trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java

    r8510 r8870  
    124124    }
    125125
    126     private void addAttr(String name, String value, Element element, SessionWriter.ExportSupport support) {
    127             Element attrElem = support.createElement(name);
    128             attrElem.appendChild(support.createTextNode(value));
    129             element.appendChild(attrElem);
     126    private static void addAttr(String name, String value, Element element, SessionWriter.ExportSupport support) {
     127        Element attrElem = support.createElement(name);
     128        attrElem.appendChild(support.createTextNode(value));
     129        element.appendChild(attrElem);
    130130    }
    131131}
  • trunk/src/org/openstreetmap/josm/tools/AlphanumComparator.java

    r8419 r8870  
    6464     * calculate it once) *
    6565     */
    66     private String getChunk(String s, int slength, int marker) {
     66    private static String getChunk(String s, int slength, int marker) {
    6767        StringBuilder chunk = new StringBuilder();
    6868        char c = s.charAt(marker);
  • trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java

    r8846 r8870  
    208208    }
    209209
    210     private String formatMenuText(KeyStroke keyStroke, String index, String description) {
     210    private static String formatMenuText(KeyStroke keyStroke, String index, String description) {
    211211        String shortcutText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers()) + '+'
    212212                + KeyEvent.getKeyText(keyStroke.getKeyCode()) + ',' + index;
  • trunk/src/org/openstreetmap/josm/tools/WikiReader.java

    r8849 r8870  
    106106    }
    107107
    108     private String readNormal(BufferedReader in, boolean html) throws IOException {
     108    private static String readNormal(BufferedReader in, boolean html) throws IOException {
    109109        StringBuilder b = new StringBuilder();
    110110        for (String line = in.readLine(); line != null; line = in.readLine()) {
  • trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java

    r8372 r8870  
    4040    }
    4141
    42     private boolean isDateInShortStandardFormat(String date) {
     42    private static boolean isDateInShortStandardFormat(String date) {
    4343        char[] dateChars;
    4444        // We can only parse the date if it is in a very specific format.
     
    107107    }
    108108
    109     private boolean isDateInLongStandardFormat(String date) {
     109    private static boolean isDateInLongStandardFormat(String date) {
    110110        char[] dateChars;
    111111        // We can only parse the date if it is in a very specific format.
Note: See TracChangeset for help on using the changeset viewer.