1   package com.puppycrawl.tools.checkstyle.checks.coding.equalsavoidnull;
2   
3   import java.io.IOException;
4   import java.io.Reader;
5   // case copied from sun.applet.AppletViewer in openjdk
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                  else {
25                      String nm = scanIdentifier(in);
26                      if (nm.equalsIgnoreCase("param")) {
27                          ;
28                      }
29                      else if (nm.equalsIgnoreCase("applet")) {
30                          ;
31                      }
32                      else if (nm.equalsIgnoreCase("object")) {
33                          ;
34                      }
35                      else if (nm.equalsIgnoreCase("embed")) {
36                          ;
37                      }
38                      else if (nm.equalsIgnoreCase("app")) {
39                          ;
40                      }
41                  }
42              }
43          }
44      }
45  
46      public static String scanIdentifier(Reader in) throws IOException {
47          return null;
48      }
49  }