Advertisement
Guest User

hahaha

a guest
May 26th, 2015
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1.  protected void Method() {
  2.    try {
  3.      if (condition) {
  4.        //something
  5.        try {
  6.          //log and do something
  7.        } catch (SomeException e) {
  8.          //log exception
  9.        }
  10.        Iterator itemsIterator = items.iterator();
  11.        while (itemsIterator.hasNext()) {
  12.          FileItem item = (FileItem) itemsIterator.next();
  13.  
  14.          if (someCondition) {
  15.            // blah blah blah
  16.            if (anotherCondition) {
  17.              //print some info to user
  18.            }
  19.          } else {
  20.            //do some other shit
  21.            try {
  22.              item.write(savedFile);
  23.            } catch (Exception e) {
  24.              log("Saving file failed ", e);
  25.            }
  26.          }
  27.        }
  28.      }
  29.    } finally {
  30.      out.close();
  31.    }
  32.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement