Changeset 251


Ignore:
Timestamp:
11/15/02 14:43:40 (20 years ago)
Author:
piso
Message:

findLineForOccurrence(): removed trace output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/ListOccurrencesInFiles.java

    r93 r251  
    33 *
    44 * Copyright (C) 2000-2002 Peter Graves
    5  * $Id: ListOccurrencesInFiles.java,v 1.2 2002-10-11 01:42:37 piso Exp $
     5 * $Id: ListOccurrencesInFiles.java,v 1.3 2002-11-15 14:43:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    201201    private Line findLineForOccurrence(File sourceFile, Line sourceLine)
    202202    {
    203         Log.debug("findLineForOccurrence " + sourceFile + " " + (sourceLine.lineNumber()+1));
    204203        if (sourceFile == null)
    205204            return null;
     
    222221        for (line = line.next(); line instanceof OccurrenceLine; line = line.next()) {
    223222            int candidate = ((OccurrenceLine)line).getSourceLineNumber();
    224             Log.debug("candidate = " + candidate);
    225223            if (candidate == target)
    226224                return line;
    227             if (best != null)
    228                 if (candidate > target) {
    229                     Log.debug("candidate = " + candidate + " best = " + best);
    230                     return best;
    231                 }
     225            if (best != null && candidate > target)
     226                return best;
    232227            best = line;
    233228        }
    234         Log.debug("returning best = " + best);
    235229        return best;
    236230    }
Note: See TracChangeset for help on using the changeset viewer.