View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.coding.equalsavoidnull;
2   
3   import java.io.IOException;
4   import java.io.Reader;
5   
6   public class InputEqualsAvoidNullNested {
7       public void foo(Reader in) throws IOException {
8           int c;
9           while(true) {
10              c = in.read();
11              if (c == -1)
12                  break;
13  
14              if (c == '<') {
15                  c = in.read();
16                  if (c == '/') {
17                      String nm = in.toString();
18                      if (nm.equalsIgnoreCase("applet") ||
19                              nm.equalsIgnoreCase("object") ||
20                              nm.equalsIgnoreCase("embed")) {
21                          break;
22                      }
23                  }
24              }
25          }
26      }
27  }