Changeset 8374 in josm for trunk


Ignore:
Timestamp:
2015-05-17T02:56:15+02:00 (10 years ago)
Author:
Don-vip
Message:

code style - Unnecessary Final Modifier

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

Legend:

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

    r7937 r8374  
    5151     * @return tags that imply a semantic meaning from <code>way</code> direction and cannot be changed
    5252     */
    53     public static final TagCollection getDirectionalTags(Way way) {
     53    public static TagCollection getDirectionalTags(Way way) {
    5454        return directionalTags.intersect(TagCollection.from(way));
    5555    }
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

    r8180 r8374  
    103103         * @return The reversed tag (is equal to <code>tag</code> if no change is needed)
    104104         */
    105         public static final Tag apply(final Tag tag) {
     105        public static Tag apply(final Tag tag) {
    106106            return apply(tag.getKey(), tag.getValue());
    107107        }
     
    113113         * @return The reversed tag (is equal to <code>key=value</code> if no change is needed)
    114114         */
    115         public static final Tag apply(final String key, final String value) {
     115        public static Tag apply(final String key, final String value) {
    116116            String newKey = key;
    117117            String newValue = value;
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java

    r7937 r8374  
    5858     * @return the unique instance
    5959     */
    60     public static final MultipolygonCache getInstance() {
     60    public static MultipolygonCache getInstance() {
    6161        return INSTANCE;
    6262    }
     
    147147    }
    148148
    149     private static final boolean isMultipolygon(OsmPrimitive p) {
     149    private static boolean isMultipolygon(OsmPrimitive p) {
    150150        return p instanceof Relation && ((Relation) p).isMultipolygon();
    151151    }
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java

    r7294 r8374  
    3838     * @return the int
    3939     */
    40     public static final int getIntLE(byte[] b, int i) {
     40    public static int getIntLE(byte[] b, int i) {
    4141        return (b[i++] & 0x000000FF) | ((b[i++] << 8) & 0x0000FF00) | ((b[i++] << 16) & 0x00FF0000) | (b[i] << 24);
    4242    }
     
    4848     * @return the int
    4949     */
    50     public static final int getIntBE(byte[] b, int i) {
     50    public static int getIntBE(byte[] b, int i) {
    5151        return (b[i++] << 24) | ((b[i++] << 16) & 0x00FF0000) | ((b[i++] << 8) & 0x0000FF00) | (b[i] & 0x000000FF);
    5252    }
     
    5959     * @return the int
    6060     */
    61     public static final int getInt(byte[] b, boolean bigEndian) {
     61    public static int getInt(byte[] b, boolean bigEndian) {
    6262        if (bigEndian)
    6363            return getIntBE(b, 0);
     
    7373     * @return the float
    7474     */
    75     public static final float getFloat(byte[] b, boolean bigEndian) {
     75    public static float getFloat(byte[] b, boolean bigEndian) {
    7676        int i = 0;
    7777        if (bigEndian) {
     
    9090     * @return the double
    9191     */
    92     public static final double getDouble(byte[] b, boolean bigEndian) {
     92    public static double getDouble(byte[] b, boolean bigEndian) {
    9393        int i = 0;
    9494        int j = 0;
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java

    r7100 r8374  
    6767     * @return {@code true}, if the provider has been added, {@code false} otherwise
    6868     */
    69     public static final boolean registerSourceProvider(SourceProvider provider) {
     69    public static boolean registerSourceProvider(SourceProvider provider) {
    7070        if (provider != null)
    7171            return presetSourceProviders.add(provider);
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r8323 r8374  
    153153     * @return true if the user wants to cancel, false if they want to continue
    154154     */
    155     public static final boolean warnUser(String title, String content, ImageIcon baseActionIcon, String continueToolTip) {
     155    public static boolean warnUser(String title, String content, ImageIcon baseActionIcon, String continueToolTip) {
    156156        ExtendedDialog dlg = new ExtendedDialog(Main.parent,
    157157                title, new String[] {tr("Cancel"), tr("Continue")});
     
    177177     * @since 7312
    178178     */
    179     public static final void notifyUserHtmlError(Component parent, String title, String message, String html) {
     179    public static void notifyUserHtmlError(Component parent, String title, String message, String html) {
    180180        JPanel p = new JPanel(new GridBagLayout());
    181181        p.add(new JLabel(message), GBC.eol());
     
    197197     * @since 5484
    198198     */
    199     public static final Image getDisabledImage(Image image) {
     199    public static Image getDisabledImage(Image image) {
    200200        return Toolkit.getDefaultToolkit().createImage(
    201201                new FilteredImageSource(image.getSource(), new GrayFilter(true, 20)));
     
    208208     * @since 5484
    209209     */
    210     public static final ImageIcon getDisabledIcon(ImageIcon icon) {
     210    public static ImageIcon getDisabledIcon(ImageIcon icon) {
    211211        return new ImageIcon(getDisabledImage(icon.getImage()));
    212212    }
     
    221221     * @since 5493
    222222     */
    223     public static final Component prepareResizeableOptionPane(final Component pane, final Dimension minDimension) {
     223    public static Component prepareResizeableOptionPane(final Component pane, final Dimension minDimension) {
    224224        if (pane != null) {
    225225            pane.addHierarchyListener(new HierarchyListener() {
     
    250250     * @since 5735
    251251     */
    252     public static final Timer scheduleTimer(int initialDelay, ActionListener actionListener, boolean repeats) {
     252    public static Timer scheduleTimer(int initialDelay, ActionListener actionListener, boolean repeats) {
    253253        Timer timer = new Timer(initialDelay, actionListener);
    254254        timer.setRepeats(repeats);
  • trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java

    r8285 r8374  
    282282     * @since 5849
    283283     */
    284     public static final UrlLabel getBugReportUrlLabel(String debugText) {
     284    public static UrlLabel getBugReportUrlLabel(String debugText) {
    285285        URL url = getBugReportUrl(debugText);
    286286        if (url != null) {
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r8373 r8374  
    197197     * @see #trnc
    198198     */
    199     public static final String tr(String text, Object... objects) {
     199    public static String tr(String text, Object... objects) {
    200200        if (text == null) return null;
    201201        return MessageFormat.format(gettext(text, null), objects);
     
    214214     * @see #trnc
    215215     */
    216     public static final String trc(String context, String text) {
     216    public static String trc(String context, String text) {
    217217        if (context == null)
    218218            return tr(text);
     
    222222    }
    223223
    224     public static final String trc_lazy(String context, String text) {
     224    public static String trc_lazy(String context, String text) {
    225225        if (context == null)
    226226            return tr(text);
     
    240240     * @return {@code text} unmodified.
    241241     */
    242     public static final String marktr(String text) {
     242    public static String marktr(String text) {
    243243        return text;
    244244    }
    245245
    246     public static final String marktrc(String context, String text) {
     246    public static String marktrc(String context, String text) {
    247247        return text;
    248248    }
     
    271271     * @see #trnc
    272272     */
    273     public static final String trn(String singularText, String pluralText, long n, Object... objects) {
     273    public static String trn(String singularText, String pluralText, long n, Object... objects) {
    274274        return MessageFormat.format(gettextn(singularText, pluralText, null, n), objects);
    275275    }
     
    298298     * @see #trn
    299299     */
    300     public static final String trnc(String context, String singularText, String pluralText, long n, Object... objects) {
     300    public static String trnc(String context, String singularText, String pluralText, long n, Object... objects) {
    301301        return MessageFormat.format(gettextn(singularText, pluralText, context, n), objects);
    302302    }
    303303
    304     private static final String gettext(String text, String ctx, boolean lazy) {
     304    private static String gettext(String text, String ctx, boolean lazy) {
    305305        int i;
    306306        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
     
    322322    }
    323323
    324     private static final String gettext(String text, String ctx) {
     324    private static String gettext(String text, String ctx) {
    325325        return gettext(text, ctx, false);
    326326    }
    327327
    328328    /* try without context, when context try fails */
    329     private static final String gettext_lazy(String text, String ctx) {
     329    private static String gettext_lazy(String text, String ctx) {
    330330        return gettext(text, ctx, true);
    331331    }
    332332
    333     private static final String gettextn(String text, String plural, String ctx, long num) {
     333    private static String gettextn(String text, String plural, String ctx, long num) {
    334334        int i;
    335335        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
     
    360360     * @return an array of locale objects.
    361361     */
    362     public static final Locale[] getAvailableTranslations() {
     362    public static Locale[] getAvailableTranslations() {
    363363        Collection<Locale> v = new ArrayList<>(languages.size());
    364364        if(getTranslationFile("en") != null) {
  • trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java

    r8322 r8374  
    151151     * @since 7299
    152152     */
    153     public static final SimpleDateFormat newIsoDateFormat() {
     153    public static SimpleDateFormat newIsoDateFormat() {
    154154        return new SimpleDateFormat("yyyy-MM-dd");
    155155    }
     
    160160     * @since 7299
    161161     */
    162     public static final SimpleDateFormat newIsoDateTimeFormat() {
     162    public static SimpleDateFormat newIsoDateTimeFormat() {
    163163        return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
    164164    }
     
    169169     * @since 7299
    170170     */
    171     public static final SimpleDateFormat newOsmApiDateTimeFormat() {
     171    public static SimpleDateFormat newOsmApiDateTimeFormat() {
    172172        // Example: "2010-09-07 14:39:41 UTC".
    173173        // Always parsed with US locale regardless of the current locale in JOSM
     
    181181     * @since 7299
    182182     */
    183     public static final DateFormat getDateFormat(int dateStyle) {
     183    public static DateFormat getDateFormat(int dateStyle) {
    184184        if (PROP_ISO_DATES.get()) {
    185185            return newIsoDateFormat();
     
    196196     * @since 7299
    197197     */
    198     public static final String formatDate(Date date, int dateStyle) {
     198    public static String formatDate(Date date, int dateStyle) {
    199199        CheckParameterUtil.ensureParameterNotNull(date, "date");
    200200        return getDateFormat(dateStyle).format(date);
     
    207207     * @since 7299
    208208     */
    209     public static final DateFormat getTimeFormat(int timeStyle) {
     209    public static DateFormat getTimeFormat(int timeStyle) {
    210210        if (PROP_ISO_DATES.get()) {
    211211            // This is not strictly conform to ISO 8601. We just want to avoid US-style times such as 3.30pm
     
    222222     * @since 7299
    223223     */
    224     public static final String formatTime(Date time, int timeStyle) {
     224    public static String formatTime(Date time, int timeStyle) {
    225225        CheckParameterUtil.ensureParameterNotNull(time, "time");
    226226        return getTimeFormat(timeStyle).format(time);
     
    234234     * @since 7299
    235235     */
    236     public static final DateFormat getDateTimeFormat(int dateStyle, int timeStyle) {
     236    public static DateFormat getDateTimeFormat(int dateStyle, int timeStyle) {
    237237        if (PROP_ISO_DATES.get()) {
    238238            // This is not strictly conform to ISO 8601. We just want to avoid US-style times such as 3.30pm
     
    252252     * @since 7299
    253253     */
    254     public static final String formatDateTime(Date datetime, int dateStyle, int timeStyle) {
     254    public static String formatDateTime(Date datetime, int dateStyle, int timeStyle) {
    255255        CheckParameterUtil.ensureParameterNotNull(datetime, "datetime");
    256256        return getDateTimeFormat(dateStyle, timeStyle).format(datetime);
Note: See TracChangeset for help on using the changeset viewer.