Ignore:
Timestamp:
2016-08-06T19:21:33+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S00100 - Method names should comply with a naming convention

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
3 edited

Legend:

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

    r10680 r10748  
    291291    /** Discard lines from one file that have no matches in the other file.
    292292     */
    293     private void discard_confusing_lines() {
    294         filevec[0].discard_confusing_lines(filevec[1]);
    295         filevec[1].discard_confusing_lines(filevec[0]);
     293    private void discardConfusingLines() {
     294        filevec[0].discardConfusingLines(filevec[1]);
     295        filevec[1].discardConfusingLines(filevec[0]);
    296296    }
    297297
     
    299299     * Adjust inserts/deletes of blank lines to join changes as much as possible.
    300300     */
    301     private void shift_boundaries() {
    302         filevec[0].shift_boundaries(filevec[1]);
    303         filevec[1].shift_boundaries(filevec[0]);
     301    private void shiftBoundaries() {
     302        filevec[0].shiftBoundaries(filevec[1]);
     303        filevec[1].shiftBoundaries(filevec[0]);
    304304    }
    305305
     
    403403     * @return the differences of two files
    404404     */
    405     public final Change diff_2(final boolean reverse) {
     405    public final Change diff2(final boolean reverse) {
    406406        return diff(reverse ? reverseScript : forwardScript);
    407407    }
     
    420420        // Some lines are obviously insertions or deletions because they don't match anything.
    421421        // Detect them now, and avoid even thinking about them in the main comparison algorithm.
    422         discard_confusing_lines();
     422        discardConfusingLines();
    423423
    424424        // Now do the main comparison algorithm, considering just the undiscarded lines.
     
    438438
    439439        // Modify the results slightly to make them prettier in cases where that can validly be done.
    440         shift_boundaries();
     440        shiftBoundaries();
    441441
    442442        // Get the results of comparison in the form of a chain of `struct change's -- an edit script.
     
    547547         * @param f the other file
    548548         */
    549         void discard_confusing_lines(FileData f) {
     549        void discardConfusingLines(FileData f) {
    550550            clear();
    551551            // Set up table of which lines are going to be discarded.
     
    749749        }
    750750
    751         /** Adjust inserts/deletes of blank lines to join changes
    752        as much as possible.
    753 
    754        We do something when a run of changed lines include a blank
    755        line at one end and have an excluded blank line at the other.
    756        We are free to choose which blank line is included.
    757        `compareseq' always chooses the one at the beginning,
    758        but usually it is cleaner to consider the following blank line
    759        to be the "change".  The only exception is if the preceding blank line
    760        would join this change to other changes.
    761       @param f the file being compared against
     751        /**
     752         * Adjust inserts/deletes of blank lines to join changes as much as possible.
     753         *
     754         * We do something when a run of changed lines include a blank line at one end and have an excluded blank line at the other.
     755         * We are free to choose which blank line is included.
     756         * `compareseq' always chooses the one at the beginning, but usually it is cleaner to consider the following blank line
     757         * to be the "change". The only exception is if the preceding blank line would join this change to other changes.
     758         * @param f the file being compared against
    762759         */
    763         void shift_boundaries(FileData f) {
     760        void shiftBoundaries(FileData f) {
    764761            final boolean[] changed = changedFlag;
    765762            final boolean[] otherChanged = f.changedFlag;
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r10647 r10748  
    232232    }
    233233
    234     public static String trc_lazy(String context, String text) {
     234    public static String trcLazy(String context, String text) {
    235235        if (context == null)
    236236            return tr(text);
    237237        if (text == null)
    238238            return null;
    239         return MessageFormat.format(gettext_lazy(text, context), (Object) null);
     239        return MessageFormat.format(gettextLazy(text, context), (Object) null);
    240240    }
    241241
     
    337337
    338338    /* try without context, when context try fails */
    339     private static String gettext_lazy(String text, String ctx) {
     339    private static String gettextLazy(String text, String ctx) {
    340340        return gettext(text, ctx, true);
    341341    }
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r10742 r10748  
    309309     *         range 0...1. If val is outside that range, return 255
    310310     */
    311     public static Integer color_float2int(Float val) {
     311    public static Integer colorFloat2int(Float val) {
    312312        if (val == null)
    313313            return null;
     
    323323     * @return corresponding float value in range 0 <= x <= 1
    324324     */
    325     public static Float color_int2float(Integer val) {
     325    public static Float colorInt2float(Integer val) {
    326326        if (val == null)
    327327            return null;
Note: See TracChangeset for help on using the changeset viewer.