Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.52 KB | None | 0 0
  1. ________Original code_____
  2.   public void checkSessionLock()
  3.     {
  4.         try
  5.         {
  6.             File file = new File(savePath, "session.lock");
  7.             DataInputStream datainputstream = new DataInputStream(new FileInputStream(file));
  8.             try
  9.             {
  10.                 if(datainputstream.readLong() != lockTimestamp)
  11.                 {
  12.                     throw new MinecraftException("The save is being accessed from another location, aborting");
  13.                 }
  14.             }
  15.             finally
  16.             {
  17.                 datainputstream.close();
  18.             }
  19.         }
  20.         catch(IOException ioexception)
  21.         {
  22.             throw new MinecraftException("Failed to check session lock, aborting");
  23.         }
  24.     }
  25.  
  26. ______WTF CODE____
  27.  public void checkSessionLock()
  28.     {
  29.         DataInputStream datainputstream;
  30.         File file = new File(savePath, "session.lock");
  31.         datainputstream = new DataInputStream(new FileInputStream(file));
  32.         if(datainputstream.readLong() != lockTimestamp)
  33.         {
  34.             throw new MinecraftException("The save is being accessed from another location, aborting");
  35.         }
  36.         break MISSING_BLOCK_LABEL_61;
  37.         Exception exception;
  38.         exception;
  39.         datainputstream.close();
  40.         throw exception;
  41.         datainputstream.close();
  42.         break MISSING_BLOCK_LABEL_80;
  43.         IOException ioexception;
  44.         ioexception;
  45.         throw new MinecraftException("Failed to check session lock, aborting");
  46.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement