Changeset 3947 in josm for trunk/src


Ignore:
Timestamp:
2011-03-02T17:59:40+01:00 (14 years ago)
Author:
stoecker
Message:

remove MOTD caching for applet

File:
1 edited

Legend:

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

    r3122 r3947  
    154154     */
    155155    private void loadFromDisk() {
    156         try {
    157             BufferedInputStream input = new BufferedInputStream(new FileInputStream(path));
    158             this.data = new byte[input.available()];
    159             input.read(this.data);
    160             input.close();
    161         } catch(IOException e) {
     156        if(Main.applet)
    162157            this.data = updateForce();
     158        else {
     159            try {
     160                BufferedInputStream input = new BufferedInputStream(new FileInputStream(path));
     161                this.data = new byte[input.available()];
     162                input.read(this.data);
     163                input.close();
     164            } catch(IOException e) {
     165                this.data = updateForce();
     166            }
    163167        }
    164168    }
     
    168172     */
    169173    private void saveToDisk() {
     174        if(Main.applet)
     175            return;
    170176        try {
    171177            BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(path));
Note: See TracChangeset for help on using the changeset viewer.