Ignore:
Timestamp:
2010-09-15T18:56:19+02:00 (15 years ago)
Author:
stoecker
Message:

remove tabs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/livegps/src/org/json/JSONTokener.java

    r21622 r23191  
    3939public class JSONTokener {
    4040
    41     private int         character;
    42         private boolean eof;
    43     private int         index;
    44     private int         line;
    45     private char        previous;
    46     private Reader      reader;
     41    private int     character;
     42    private boolean eof;
     43    private int     index;
     44    private int     line;
     45    private char    previous;
     46    private Reader  reader;
    4747    private boolean usePrevious;
    4848
     
    5454     */
    5555    public JSONTokener(Reader reader) {
    56         this.reader = reader.markSupported() ? 
    57                         reader : new BufferedReader(reader);
     56        this.reader = reader.markSupported() ?
     57                reader : new BufferedReader(reader);
    5858        this.eof = false;
    5959        this.usePrevious = false;
     
    109109        return -1;
    110110    }
    111    
     111
    112112    public boolean end() {
    113         return eof && !usePrevious;     
     113        return eof && !usePrevious;
    114114    }
    115115
     
    124124        if (end()) {
    125125            return false;
    126         } 
     126        }
    127127        back();
    128128        return true;
     
    138138        int c;
    139139        if (this.usePrevious) {
    140                 this.usePrevious = false;
     140            this.usePrevious = false;
    141141            c = this.previous;
    142142        } else {
    143                 try {
    144                     c = this.reader.read();
    145                 } catch (IOException exception) {
    146                     throw new JSONException(exception);
    147                 }
    148        
    149                 if (c <= 0) { // End of stream
    150                         this.eof = true;
    151                         c = 0;
    152                 } 
    153         }
    154         this.index += 1;
    155         if (this.previous == '\r') {
    156                 this.line += 1;
    157                 this.character = c == '\n' ? 0 : 1;
    158         } else if (c == '\n') {
    159                 this.line += 1;
    160                 this.character = 0;
    161         } else {
    162                 this.character += 1;
    163         }
    164         this.previous = (char) c;
     143            try {
     144                c = this.reader.read();
     145            } catch (IOException exception) {
     146                throw new JSONException(exception);
     147            }
     148
     149            if (c <= 0) { // End of stream
     150                this.eof = true;
     151                c = 0;
     152            }
     153        }
     154        this.index += 1;
     155        if (this.previous == '\r') {
     156            this.line += 1;
     157            this.character = c == '\n' ? 0 : 1;
     158        } else if (c == '\n') {
     159            this.line += 1;
     160            this.character = 0;
     161        } else {
     162            this.character += 1;
     163        }
     164        this.previous = (char) c;
    165165        return this.previous;
    166166    }
     
    204204             buffer[pos] = next();
    205205             if (end()) {
    206                  throw syntaxError("Substring bounds error");                 
     206                 throw syntaxError("Substring bounds error");
    207207             }
    208208             pos += 1;
     
    273273                case '\\':
    274274                case '/':
    275                         sb.append(c);
    276                         break;
     275                    sb.append(c);
     276                    break;
    277277                default:
    278278                    throw syntaxError("Illegal escape.");
     
    412412        return c;
    413413    }
    414    
     414
    415415
    416416    /**
Note: See TracChangeset for help on using the changeset viewer.