View Javadoc
1   package org.codehaus.plexus.compiler.javac;
2   
3   /**
4    * The MIT License
5    *
6    * Copyright (c) 2005, The Codehaus
7    *
8    * Permission is hereby granted, free of charge, to any person obtaining a copy of
9    * this software and associated documentation files (the "Software"), to deal in
10   * the Software without restriction, including without limitation the rights to
11   * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12   * of the Software, and to permit persons to whom the Software is furnished to do
13   * so, subject to the following conditions:
14   *
15   * The above copyright notice and this permission notice shall be included in all
16   * copies or substantial portions of the Software.
17   *
18   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24   * SOFTWARE.
25   */
26  
27  import java.io.BufferedReader;
28  import java.io.IOException;
29  import java.io.StringReader;
30  import java.util.ArrayList;
31  import java.util.List;
32  
33  import junit.framework.TestCase;
34  
35  import org.codehaus.plexus.compiler.CompilerMessage;
36  import org.codehaus.plexus.util.Os;
37  
38  /**
39   * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
40   */
41  public class ErrorMessageParserTest
42      extends TestCase
43  {
44      private static final String EOL = System.getProperty( "line.separator" );
45  
46      public void testDeprecationMessage()
47          throws Exception
48      {
49          String error =
50              "target/compiler-src/testDeprecation/Foo.java:1: warning: Date(java.lang.String) in java.util.Date has been deprecated"
51                  + EOL +
52                  "import java.util.Date;public class Foo{    private Date date = new Date( \"foo\");}" + EOL +
53                  "                                                               ^" + EOL;
54  
55          CompilerMessage compilerError = JavacCompiler.parseModernError( 0, error );
56  
57          assertNotNull( compilerError );
58  
59          assertFalse( compilerError.isError() );
60  
61          assertEquals( "Date(java.lang.String) in java.util.Date has been deprecated", compilerError.getMessage() );
62  
63          assertEquals( 63, compilerError.getStartColumn() );
64  
65          assertEquals( 66, compilerError.getEndColumn() );
66  
67          assertEquals( 1, compilerError.getStartLine() );
68  
69          assertEquals( 1, compilerError.getEndLine() );
70      }
71  
72      public void testWarningMessage()
73      {
74          String error =
75              "target/compiler-src/testWarning/Foo.java:8: warning: finally clause cannot complete normally" + EOL +
76                  "        finally { return; }" + EOL +
77                  "                          ^" + EOL;
78  
79          CompilerMessage compilerError = JavacCompiler.parseModernError( 0, error );
80  
81          assertNotNull( compilerError );
82  
83          assertFalse( compilerError.isError() );
84  
85          assertEquals( "finally clause cannot complete normally", compilerError.getMessage() );
86  
87          assertEquals( 26, compilerError.getStartColumn() );
88  
89          assertEquals( 27, compilerError.getEndColumn() );
90  
91          assertEquals( 8, compilerError.getStartLine() );
92  
93          assertEquals( 8, compilerError.getEndLine() );
94      }
95  
96      public void testErrorMessage()
97      {
98          String error = "Foo.java:7: not a statement" + EOL +
99              "         i;" + EOL +
100             "         ^" + EOL;
101 
102         CompilerMessage compilerError = JavacCompiler.parseModernError( 1, error );
103 
104         assertNotNull( compilerError );
105 
106         assertTrue( compilerError.isError() );
107 
108         assertEquals( "not a statement", compilerError.getMessage() );
109 
110         assertEquals( 9, compilerError.getStartColumn() );
111 
112         assertEquals( 11, compilerError.getEndColumn() );
113 
114         assertEquals( 7, compilerError.getStartLine() );
115 
116         assertEquals( 7, compilerError.getEndLine() );
117     }
118 
119     public void testUnknownSymbolError()
120     {
121         String error = "./org/codehaus/foo/UnknownSymbol.java:7: cannot find symbol" + EOL +
122             "symbol  : method foo()" + EOL +
123             "location: class org.codehaus.foo.UnknownSymbol" + EOL +
124             "        foo();" + EOL +
125             "        ^" + EOL;
126 
127         CompilerMessage compilerError = JavacCompiler.parseModernError( 1, error );
128 
129         assertNotNull( compilerError );
130 
131         assertTrue( compilerError.isError() );
132 
133         assertEquals( "cannot find symbol" + EOL +
134                           "symbol  : method foo()" + EOL +
135                           "location: class org.codehaus.foo.UnknownSymbol", compilerError.getMessage() );
136 
137         assertEquals( 8, compilerError.getStartColumn() );
138 
139         assertEquals( 14, compilerError.getEndColumn() );
140 
141         assertEquals( 7, compilerError.getStartLine() );
142 
143         assertEquals( 7, compilerError.getEndLine() );
144     }
145 
146     public void testTwoErrors()
147         throws IOException
148     {
149         String errors = "./org/codehaus/foo/ExternalDeps.java:4: package org.apache.commons.lang does not exist" + EOL +
150             "import org.apache.commons.lang.StringUtils;" + EOL +
151             "                               ^" + EOL +
152             "./org/codehaus/foo/ExternalDeps.java:12: cannot find symbol" + EOL +
153             "symbol  : variable StringUtils" + EOL +
154             "location: class org.codehaus.foo.ExternalDeps" + EOL +
155             "          System.out.println( StringUtils.upperCase( str)  );" + EOL +
156             "                              ^" + EOL +
157             "2 errors" + EOL;
158 
159         List<CompilerMessage> messages =
160             JavacCompiler.parseModernStream( 1, new BufferedReader( new StringReader( errors ) ) );
161 
162         assertEquals( 2, messages.size() );
163     }
164 
165     public void testAnotherTwoErrors()
166         throws IOException
167     {
168         String errors = "./org/codehaus/foo/ExternalDeps.java:4: package org.apache.commons.lang does not exist" + EOL +
169             "import org.apache.commons.lang.StringUtils;" + EOL +
170             "                               ^" + EOL +
171             "./org/codehaus/foo/ExternalDeps.java:12: cannot find symbol" + EOL +
172             "symbol  : variable StringUtils" + EOL +
173             "location: class org.codehaus.foo.ExternalDeps" + EOL +
174             "          System.out.println( StringUtils.upperCase( str)  );" + EOL +
175             "                              ^" + EOL +
176             "2 errors" + EOL;
177 
178         List<CompilerMessage> messages =
179             JavacCompiler.parseModernStream( 1, new BufferedReader( new StringReader( errors ) ) );
180 
181         assertEquals( 2, messages.size() );
182     }
183 
184     public void testAssertError()
185         throws IOException
186     {
187         String errors =
188             "./org/codehaus/foo/ReservedWord.java:5: as of release 1.4, 'assert' is a keyword, and may not be used as an identifier"
189                 + EOL +
190                 "(try -source 1.3 or lower to use 'assert' as an identifier)" + EOL +
191                 "        String assert;" + EOL +
192                 "               ^" + EOL +
193                 "1 error" + EOL;
194 
195         List<CompilerMessage> messages =
196             JavacCompiler.parseModernStream( 1, new BufferedReader( new StringReader( errors ) ) );
197 
198         assertEquals( 1, messages.size() );
199     }
200 
201     public void testLocalizedWarningNotTreatedAsError()
202         throws IOException
203     {
204         String errors =
205             "./src/main/java/Main.java:9: \u8b66\u544a:[deprecation] java.io.File \u306e toURL() \u306f\u63a8\u5968\u3055\u308c\u307e\u305b\u3093\u3002"
206                 + EOL +
207                 "    new File( path ).toURL()" + EOL +
208                 "                    ^" + EOL +
209                 "\u8b66\u544a 1 \u500b" + EOL;
210 
211         List<CompilerMessage> messages =
212             JavacCompiler.parseModernStream( 0, new BufferedReader( new StringReader( errors ) ) );
213 
214         assertEquals( 1, messages.size() );
215         assertFalse( ( (CompilerMessage) messages.get( 0 ) ).isError() );
216     }
217 
218     public void testUnixFileNames()
219     {
220         String error = "/my/prj/src/main/java/test/prj/App.java:11: not a statement" + EOL +
221             "        System.out.println( \"Hello World!\" );x" + EOL +
222             "                                             ^" + EOL;
223 
224         CompilerMessage compilerError = JavacCompiler.parseModernError( 1, error );
225 
226         assertEquals( "/my/prj/src/main/java/test/prj/App.java:[11,45] not a statement",
227                       String.valueOf( compilerError ) );
228     }
229 
230     public void testWindowsDriveLettersMCOMPILER140()
231     {
232         String error =
233             "c:\\Documents and Settings\\My Self\\Documents\\prj\\src\\main\\java\\test\\prj\\App.java:11: not a statement"
234                 + EOL +
235                 "        System.out.println( \"Hello World!\" );x" + EOL +
236                 "                                             ^" + EOL;
237 
238         CompilerMessage compilerError = JavacCompiler.parseModernError( 1, error );
239 
240         assertEquals(
241             "c:\\Documents and Settings\\My Self\\Documents\\prj\\src\\main\\java\\test\\prj\\App.java:[11,45] not a statement",
242             String.valueOf( compilerError ) );
243     }
244 
245     /**
246      * Test that CRLF is parsed correctly wrt. the filename in warnings.
247      *
248      * @throws Exception
249      */
250     public void testCRLF_windows()
251         throws Exception
252     {
253         // This test is only relevant on windows (test hardcodes EOL)
254         if ( !Os.isFamily( "windows" ) )
255         {
256             return;
257         }
258 
259         String CRLF = new String( new byte[]{ (byte) 0x0D, (byte) 0x0A } );
260         String errors = "warning: [options] bootstrap class path not set in conjunction with -source 1.6" + CRLF +
261             "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpServerImpl.java]]"
262             + CRLF +
263             "[parsing completed 19ms]" + CRLF +
264             "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpServer.java]]"
265             + CRLF +
266             "[parsing completed 1ms]" + CRLF +
267             "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpServerAware.java]]"
268             + CRLF +
269             "[parsing completed 1ms]" + CRLF +
270             "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java]]"
271             + CRLF +
272             "[parsing completed 3ms]" + CRLF +
273             "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpThreadPool.java]]"
274             + CRLF +
275             "[parsing completed 3ms]" + CRLF +
276             "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpQueueAware.java]]"
277             + CRLF +
278             "[parsing completed 0ms]" + CRLF +
279             "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpThreadPoolAware.java]]"
280             + CRLF +
281             "[parsing completed 1ms]" + CRLF +
282             "[search path for source files: C:\\commander\\pre\\ec\\ec-http\\src\\main\\java]" + CRLF +
283             "[search path for class files: C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\resources.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\rt.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\sunrsasign.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\jsse.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\jce.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\charsets.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\jfr.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\classes,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\dnsns.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\localedata.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\sunec.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\sunjce_provider.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\sunmscapi.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\zipfs.jar,C:\\commander\\pre\\ec\\ec-http\\target\\classes,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-lock\\1.0.0-SNAPSHOT\\ec-lock-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-timer\\1.0.0-SNAPSHOT\\ec-timer-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\commons\\commons-math\\2.2\\commons-math-2.2.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-validation\\1.0.0-SNAPSHOT\\ec-validation-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-xml\\1.0.0-SNAPSHOT\\ec-xml-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\commons-beanutils\\commons-beanutils\\1.8.3-PATCH1\\commons-beanutils-1.8.3-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\commons-collections\\commons-collections\\3.2.1\\commons-collections-3.2.1.jar,C:\\Users\\anders\\.m2\\repository\\dom4j\\dom4j\\1.6.1-PATCH1\\dom4j-1.6.1-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\javax\\validation\\validation-api\\1.0.0.GA\\validation-api-1.0.0.GA.jar,C:\\Users\\anders\\.m2\\repository\\org\\codehaus\\jackson\\jackson-core-asl\\1.9.7\\jackson-core-asl-1.9.7.jar,C:\\Users\\anders\\.m2\\repository\\org\\codehaus\\jackson\\jackson-mapper-asl\\1.9.7\\jackson-mapper-asl-1.9.7.jar,C:\\Users\\anders\\.m2\\repository\\org\\hibernate\\hibernate-core\\3.6.7-PATCH14\\hibernate-core-3.6.7-PATCH14.jar,C:\\Users\\anders\\.m2\\repository\\antlr\\antlr\\2.7.6\\antlr-2.7.6.jar,C:\\Users\\anders\\.m2\\repository\\org\\hibernate\\hibernate-commons-annotations\\3.2.0.Final\\hibernate-commons-annotations-3.2.0.Final.jar,C:\\Users\\anders\\.m2\\repository\\javax\\transaction\\jta\\1.1\\jta-1.1.jar,C:\\Users\\anders\\.m2\\repository\\org\\hibernate\\javax\\persistence\\hibernate-jpa-2.0-api\\1.0.1.Final\\hibernate-jpa-2.0-api-1.0.1.Final.jar,C:\\Users\\anders\\.m2\\repository\\org\\hyperic\\sigar\\1.6.5.132\\sigar-1.6.5.132.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-context\\3.1.1.RELEASE-PATCH1\\spring-context-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-expression\\3.1.1.RELEASE-PATCH1\\spring-expression-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-core\\3.1.1.RELEASE-PATCH1\\spring-core-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\tanukisoft\\wrapper\\3.5.14\\wrapper-3.5.14.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-log\\1.0.0-SNAPSHOT\\ec-log-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\ch\\qos\\logback\\logback-classic\\1.0.3-PATCH4\\logback-classic-1.0.3-PATCH4.jar,C:\\Users\\anders\\.m2\\repository\\ch\\qos\\logback\\logback-core\\1.0.3-PATCH4\\logback-core-1.0.3-PATCH4.jar,C:\\Users\\anders\\.m2\\repository\\org\\slf4j\\slf4j-api\\1.6.4\\slf4j-api-1.6.4.jar,C:\\Users\\anders\\.m2\\repository\\org\\slf4j\\jul-to-slf4j\\1.6.4\\jul-to-slf4j-1.6.4.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-queue\\1.0.0-SNAPSHOT\\ec-queue-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-security\\1.0.0-SNAPSHOT\\ec-security-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-acl\\1.0.0-SNAPSHOT\\ec-acl-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-transaction\\1.0.0-SNAPSHOT\\ec-transaction-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\org\\aspectj\\aspectjrt\\1.7.0.M1-PATCH1\\aspectjrt-1.7.0.M1-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-crypto\\1.0.0-SNAPSHOT\\ec-crypto-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\org\\bouncycastle\\bcprov-jdk16\\1.46\\bcprov-jdk16-1.46.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-property\\1.0.0-SNAPSHOT\\ec-property-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\commons\\commons-lang3\\3.1\\commons-lang3-3.1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-tx\\3.1.1.RELEASE-PATCH1\\spring-tx-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\org\\aopalliance\\com.springsource.org.aopalliance\\1.0.0\\com.springsource.org.aopalliance-1.0.0.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\ldap\\spring-ldap-core\\1.3.1.RELEASE\\spring-ldap-core-1.3.1.RELEASE.jar,C:\\Users\\anders\\.m2\\repository\\commons-lang\\commons-lang\\2.5\\commons-lang-2.5.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\security\\spring-security-core\\2.0.6.PATCH1\\spring-security-core-2.0.6.PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\cglib\\cglib-nodep\\2.2.2\\cglib-nodep-2.2.2.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\commons\\commons-digester3\\3.2-PATCH5\\commons-digester3-3.2-PATCH5.jar,C:\\Users\\anders\\.m2\\repository\\cglib\\cglib\\2.2.2\\cglib-2.2.2.jar,C:\\Users\\anders\\.m2\\repository\\asm\\asm\\3.3.1\\asm-3.3.1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-aop\\3.1.1.RELEASE-PATCH1\\spring-aop-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\com\\google\\guava\\guava\\12.0\\guava-12.0.jar,C:\\Users\\anders\\.m2\\repository\\com\\google\\code\\findbugs\\jsr305\\2.0.0\\jsr305-2.0.0.jar,C:\\Users\\anders\\.m2\\repository\\com\\intellij\\annotations\\116.108\\annotations-116.108.jar,C:\\Users\\anders\\.m2\\repository\\commons-io\\commons-io\\2.3\\commons-io-2.3.jar,C:\\Users\\anders\\.m2\\repository\\net\\jcip\\jcip-annotations\\1.0\\jcip-annotations-1.0.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar,C:\\Users\\anders\\.m2\\repository\\commons-codec\\commons-codec\\1.6\\commons-codec-1.6.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\orbit\\javax.servlet\\3.0.0.v201112011016\\javax.servlet-3.0.0.v201112011016.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-continuation\\8.1.4.v20120524\\jetty-continuation-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-http\\8.1.4.v20120524\\jetty-http-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-io\\8.1.4.v20120524\\jetty-io-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\mortbay\\jetty\\servlet-api\\3.0.20100224\\servlet-api-3.0.20100224.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-beans\\3.1.1.RELEASE-PATCH1\\spring-beans-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-asm\\3.1.1.RELEASE-PATCH1\\spring-asm-3.1.1.RELEASE-PATCH1.jar,.]"
284             + CRLF +
285             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/net/BindException.class)]]"
286             + CRLF +
287             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/ArrayList.class)]]"
288             + CRLF +
289             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Collection.class)]]"
290             + CRLF +
291             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Collections.class)]]"
292             + CRLF +
293             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/HashSet.class)]]"
294             + CRLF +
295             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/concurrent/TimeUnit.class)]]"
296             + CRLF +
297             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/Handler.class)]]"
298             + CRLF +
299             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/Server.class)]]"
300             + CRLF +
301             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/nio/SelectChannelConnector.class)]]"
302             + CRLF +
303             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/ssl/SslSelectChannelConnector.class)]]"
304             + CRLF +
305             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/ssl/SslContextFactory.class)]]"
306             + CRLF +
307             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\intellij\\annotations\\116.108\\annotations-116.108.jar(org/jetbrains/annotations/NonNls.class)]]"
308             + CRLF +
309             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\intellij\\annotations\\116.108\\annotations-116.108.jar(org/jetbrains/annotations/NotNull.class)]]"
310             + CRLF +
311             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\intellij\\annotations\\116.108\\annotations-116.108.jar(org/jetbrains/annotations/TestOnly.class)]]"
312             + CRLF +
313             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-beans\\3.1.1.RELEASE-PATCH1\\spring-beans-3.1.1.RELEASE-PATCH1.jar(org/springframework/beans/factory/BeanNameAware.class)]]"
314             + CRLF +
315             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-beans\\3.1.1.RELEASE-PATCH1\\spring-beans-3.1.1.RELEASE-PATCH1.jar(org/springframework/beans/factory/annotation/Autowired.class)]]"
316             + CRLF +
317             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\google\\guava\\guava\\12.0\\guava-12.0.jar(com/google/common/collect/Iterables.class)]]"
318             + CRLF +
319             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-log\\1.0.0-SNAPSHOT\\ec-log-1.0.0-SNAPSHOT.jar(com/electriccloud/log/Log.class)]]"
320             + CRLF +
321             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-log\\1.0.0-SNAPSHOT\\ec-log-1.0.0-SNAPSHOT.jar(com/electriccloud/log/LogFactory.class)]]"
322             + CRLF +
323             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/service/ServiceManager.class)]]"
324             + CRLF +
325             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/service/ServiceState.class)]]"
326             + CRLF +
327             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ExceptionUtil.class)]]"
328             + CRLF +
329             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/SystemUtil.class)]]"
330             + CRLF +
331             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ToString.class)]]"
332             + CRLF +
333             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ToStringSupport.class)]]"
334             + CRLF +
335             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/String.class)]]"
336             + CRLF +
337             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Object.class)]]"
338             + CRLF +
339             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/io/Serializable.class)]]"
340             + CRLF +
341             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Comparable.class)]]"
342             + CRLF +
343             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/CharSequence.class)]]"
344             + CRLF +
345             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Enum.class)]]"
346             + CRLF +
347             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ToStringAware.class)]]"
348             + CRLF +
349             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-beans\\3.1.1.RELEASE-PATCH1\\spring-beans-3.1.1.RELEASE-PATCH1.jar(org/springframework/beans/factory/Aware.class)]]"
350             + CRLF +
351             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/service/Service.class)]]"
352             + CRLF +
353             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Integer.class)]]"
354             + CRLF +
355             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/concurrent/RejectedExecutionException.class)]]"
356             + CRLF +
357             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/AbstractLifeCycle.class)]]"
358             + CRLF +
359             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/thread/ThreadPool.class)]]"
360             + CRLF +
361             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-queue\\1.0.0-SNAPSHOT\\ec-queue-1.0.0-SNAPSHOT.jar(com/electriccloud/queue/ExecuteQueue.class)]]"
362             + CRLF +
363             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/service/ServiceManagerAware.class)]]"
364             + CRLF +
365             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ToStringImpl.class)]]"
366             + CRLF +
367             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/LifeCycle.class)]]"
368             + CRLF +
369             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/InterruptedException.class)]]"
370             + CRLF +
371             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Runnable.class)]]"
372             + CRLF +
373             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Exception.class)]]"
374             + CRLF +
375             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/io/IOException.class)]]"
376             + CRLF +
377             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/KeyManagementException.class)]]"
378             + CRLF +
379             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/NoSuchAlgorithmException.class)]]"
380             + CRLF +
381             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/SecureRandom.class)]]"
382             + CRLF +
383             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/SSLContext.class)]]"
384             + CRLF +
385             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/TrustManager.class)]]"
386             + CRLF +
387             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/HttpResponse.class)]]"
388             + CRLF +
389             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/HttpClient.class)]]"
390             + CRLF +
391             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpGet.class)]]"
392             + CRLF +
393             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpPost.class)]]"
394             + CRLF +
395             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpUriRequest.class)]]"
396             + CRLF +
397             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/Scheme.class)]]"
398             + CRLF +
399             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ssl/SSLSocketFactory.class)]]"
400             + CRLF +
401             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/entity/StringEntity.class)]]"
402             + CRLF +
403             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/client/DefaultConnectionKeepAliveStrategy.class)]]"
404             + CRLF +
405             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/client/DefaultHttpClient.class)]]"
406             + CRLF +
407             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/client/DefaultHttpRequestRetryHandler.class)]]"
408             + CRLF +
409             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.class)]]"
410             + CRLF +
411             "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java:31: warning: [deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated"
412             + CRLF +
413             "import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;" + CRLF +
414             "                                      ^" + CRLF +
415             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/params/HttpParams.class)]]"
416             + CRLF +
417             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/protocol/HttpContext.class)]]"
418             + CRLF +
419             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/util/EntityUtils.class)]]"
420             + CRLF +
421             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-security\\1.0.0-SNAPSHOT\\ec-security-1.0.0-SNAPSHOT.jar(com/electriccloud/security/DummyX509TrustManager.class)]]"
422             + CRLF +
423             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/SchemeLayeredSocketFactory.class)]]"
424             + CRLF +
425             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/SchemeSocketFactory.class)]]"
426             + CRLF +
427             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/LayeredSchemeSocketFactory.class)]]"
428             + CRLF +
429             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/LayeredSocketFactory.class)]]"
430             + CRLF +
431             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/SocketFactory.class)]]"
432             + CRLF +
433             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/params/CoreConnectionPNames.class)]]"
434             + CRLF +
435             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/SuppressWarnings.class)]]"
436             + CRLF +
437             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Retention.class)]]"
438             + CRLF +
439             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/RetentionPolicy.class)]]"
440             + CRLF +
441             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Target.class)]]"
442             + CRLF +
443             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/ElementType.class)]]"
444             + CRLF +
445             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\google\\guava\\guava\\12.0\\guava-12.0.jar(com/google/common/annotations/GwtCompatible.class)]]"
446             + CRLF +
447             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\google\\guava\\guava\\12.0\\guava-12.0.jar(com/google/common/annotations/GwtIncompatible.class)]]"
448             + CRLF +
449             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/infoset/InfosetType.class)]]"
450             + CRLF +
451             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Annotation.class)]]"
452             + CRLF +
453             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Override.class)]]"
454             + CRLF +
455             "[checking com.electriccloud.http.HttpServerImpl]" + CRLF +
456             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Error.class)]]"
457             + CRLF +
458             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Throwable.class)]]"
459             + CRLF +
460             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/RuntimeException.class)]]"
461             + CRLF +
462             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/AutoCloseable.class)]]"
463             + CRLF +
464             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Class.class)]]"
465             + CRLF +
466             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Number.class)]]"
467             + CRLF +
468             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/AbstractList.class)]]"
469             + CRLF +
470             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/AbstractCollection.class)]]"
471             + CRLF +
472             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Iterable.class)]]"
473             + CRLF +
474             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Byte.class)]]"
475             + CRLF +
476             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Character.class)]]"
477             + CRLF +
478             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Short.class)]]"
479             + CRLF +
480             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/nio/AbstractNIOConnector.class)]]"
481             + CRLF +
482             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/AbstractConnector.class)]]"
483             + CRLF +
484             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/AggregateLifeCycle.class)]]"
485             + CRLF +
486             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/Connector.class)]]"
487             + CRLF +
488             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/Destroyable.class)]]"
489             + CRLF +
490             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/Dumpable.class)]]"
491             + CRLF +
492             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-http\\8.1.4.v20120524\\jetty-http-8.1.4.v20120524.jar(org/eclipse/jetty/http/HttpBuffers.class)]]"
493             + CRLF +
494             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/handler/HandlerWrapper.class)]]"
495             + CRLF +
496             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/handler/AbstractHandlerContainer.class)]]"
497             + CRLF +
498             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/handler/AbstractHandler.class)]]"
499             + CRLF +
500             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/net/SocketException.class)]]"
501             + CRLF +
502             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Thread.class)]]"
503             + CRLF +
504             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/IllegalStateException.class)]]"
505             + CRLF +
506             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/AbstractSet.class)]]"
507             + CRLF +
508             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Iterator.class)]]"
509             + CRLF +
510             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/IllegalArgumentException.class)]]"
511             + CRLF +
512             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Locale.class)]]"
513             + CRLF +
514             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Long.class)]]"
515             + CRLF +
516             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Float.class)]]"
517             + CRLF +
518             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Double.class)]]"
519             + CRLF +
520             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Boolean.class)]]"
521             + CRLF +
522             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Void.class)]]"
523             + CRLF +
524             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/AssertionError.class)]]"
525             + CRLF +
526             "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpServerImpl.class]]"
527             + CRLF +
528             "[checking com.electriccloud.http.HttpServer]" + CRLF +
529             "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpServer.class]]"
530             + CRLF +
531             "[checking com.electriccloud.http.HttpThreadPoolAware]" + CRLF +
532             "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpThreadPoolAware.class]]"
533             + CRLF +
534             "[checking com.electriccloud.http.HttpThreadPool]" + CRLF +
535             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/concurrent/Future.class)]]"
536             + CRLF +
537             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/concurrent/Callable.class)]]"
538             + CRLF +
539             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Date.class)]]"
540             + CRLF +
541             "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpThreadPool.class]]"
542             + CRLF +
543             "[checking com.electriccloud.http.HttpQueueAware]" + CRLF +
544             "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpQueueAware.class]]"
545             + CRLF +
546             "[checking com.electriccloud.http.HttpServerAware]" + CRLF +
547             "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpServerAware.class]]"
548             + CRLF +
549             "[checking com.electriccloud.http.HttpUtil]" + CRLF +
550             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/net/URI.class)]]"
551             + CRLF +
552             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpRequestBase.class)]]"
553             + CRLF +
554             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/message/AbstractHttpMessage.class)]]"
555             + CRLF +
556             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/HttpMessage.class)]]"
557             + CRLF +
558             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/client/AbstractHttpClient.class)]]"
559             + CRLF +
560             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/annotation/GuardedBy.class)]]"
561             + CRLF +
562             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/ResponseHandler.class)]]"
563             + CRLF +
564             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/ClientProtocolException.class)]]"
565             + CRLF +
566             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/HttpEntity.class)]]"
567             + CRLF +
568             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpEntityEnclosingRequestBase.class)]]"
569             + CRLF +
570             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/entity/AbstractHttpEntity.class)]]"
571             + CRLF +
572             "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java:151: warning: [deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated"
573             + CRLF +
574             "        ThreadSafeClientConnManager connectionManager =" + CRLF +
575             "        ^" + CRLF +
576             "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java:152: warning: [deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated"
577             + CRLF +
578             "            new ThreadSafeClientConnManager();" + CRLF +
579             "                ^" + CRLF +
580             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/GeneralSecurityException.class)]]"
581             + CRLF +
582             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/X509TrustManager.class)]]"
583             + CRLF +
584             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/KeyException.class)]]"
585             + CRLF +
586             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ssl/X509HostnameVerifier.class)]]"
587             + CRLF +
588             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/SSLSocketFactory.class)]]"
589             + CRLF +
590             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/HostNameResolver.class)]]"
591             + CRLF +
592             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/HostnameVerifier.class)]]"
593             + CRLF +
594             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ssl/TrustStrategy.class)]]"
595             + CRLF +
596             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/KeyStore.class)]]"
597             + CRLF +
598             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/SchemeRegistry.class)]]"
599             + CRLF +
600             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ClientConnectionManager.class)]]"
601             + CRLF +
602             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/HttpRequestRetryHandler.class)]]"
603             + CRLF +
604             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ConnectionKeepAliveStrategy.class)]]"
605             + CRLF +
606             "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/ParseException.class)]]"
607             + CRLF +
608             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/io/UnsupportedEncodingException.class)]]"
609             + CRLF +
610             "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpUtil$1.class]]"
611             + CRLF +
612             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/StringBuilder.class)]]"
613             + CRLF +
614             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/AbstractStringBuilder.class)]]"
615             + CRLF +
616             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/StringBuffer.class)]]"
617             + CRLF +
618             "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/KeyManager.class)]]"
619             + CRLF +
620             "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpUtil.class]]"
621             + CRLF +
622             "[total 654ms]" + CRLF +
623             "4 warnings" + CRLF;
624         List<CompilerMessage> compilerMessages =
625             JavacCompiler.parseModernStream( 0, new BufferedReader( new StringReader( errors ) ) );
626         assertEquals( "count", 187, compilerMessages.size() );
627         List<CompilerMessage> compilerErrors = new ArrayList<CompilerMessage>( 3 );
628         for ( CompilerMessage message : compilerMessages ) {
629             if ( message.getKind() != CompilerMessage.Kind.OTHER ) {
630                 compilerErrors.add( message );
631             }
632         }
633 
634         assertEquivalent(new CompilerMessage("[options] bootstrap class path not set in conjunction with -source " +
635               "1.6", CompilerMessage.Kind.WARNING), compilerErrors.get(0));
636         CompilerMessage error1 = compilerErrors.get( 1 );
637         assertEquals( "file",
638                       "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java",
639                       error1.getFile() );
640         assertEquals( "message",
641                       "[deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated",
642                       error1.getMessage() );
643         assertEquals( "line", 31, error1.getStartLine() );
644         assertEquals( "column", 38, error1.getStartColumn() );
645         CompilerMessage error2 = compilerErrors.get( 2 );
646         assertEquals( "file",
647                       "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java",
648                       error2.getFile() );
649         assertEquals( "message",
650                       "[deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated",
651                       error2.getMessage() );
652         assertEquals( "line", 151, error2.getStartLine() );
653         assertEquals( "column", 8, error2.getStartColumn() );
654         CompilerMessage error3 = compilerErrors.get( 3 );
655         assertEquals( "file",
656                       "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java",
657                       error3.getFile() );
658         assertEquals( "message",
659                       "[deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated",
660                       error3.getMessage() );
661         assertEquals( "line", 152, error3.getStartLine() );
662         assertEquals( "column", 16, error3.getStartColumn() );
663     }
664 
665     public void testJava6Error() throws Exception
666     {
667         String out = "Error.java:3: cannot find symbol" + EOL + 
668             "symbol  : class Properties" + EOL + 
669             "location: class Error" + EOL + 
670             "                Properties p = new Properties();" + EOL + 
671             "                ^" + EOL + 
672             "Error.java:3: cannot find symbol" + EOL + 
673             "symbol  : class Properties" + EOL + 
674             "location: class Error" + EOL + 
675             "                Properties p = new Properties();" + EOL + 
676             "                                   ^" + EOL + 
677             "2 errors";
678 
679         List<CompilerMessage> compilerErrors = JavacCompiler.parseModernStream( 1, new BufferedReader( new StringReader( out ) ));
680 
681         assertNotNull( compilerErrors );
682 
683         CompilerMessage message1 = compilerErrors.get( 0 );
684 
685         assertTrue( message1.isError() );
686 
687         assertEquals( "cannot find symbol" + EOL +
688                       "symbol  : class Properties" + EOL + 
689                       "location: class Error", message1.getMessage() );
690 
691         assertEquals( 16, message1.getStartColumn() );
692 
693         assertEquals( 26, message1.getEndColumn() );
694 
695         assertEquals( 3, message1.getStartLine() );
696 
697         assertEquals( 3, message1.getEndLine() );
698         
699         CompilerMessage message2 = compilerErrors.get( 1 );
700 
701         assertTrue( message2.isError() );
702 
703         assertEquals( "cannot find symbol" + EOL +
704                       "symbol  : class Properties" + EOL + 
705                       "location: class Error", message2.getMessage() );
706 
707         assertEquals( 35, message2.getStartColumn() );
708 
709         assertEquals( 48, message2.getEndColumn() );
710 
711         assertEquals( 3, message2.getStartLine() );
712 
713         assertEquals( 3, message2.getEndLine() );
714     }
715     
716     public void testJava7Error() throws Exception
717     {
718         String out = "Error.java:3: error: cannot find symbol" + EOL + 
719                         "                Properties p = new Properties();" + EOL + 
720                         "                ^" + EOL + 
721                         "  symbol:   class Properties" + EOL + 
722                         "  location: class Error" + EOL + 
723                         "Error.java:3: error: cannot find symbol" + EOL + 
724                         "                Properties p = new Properties();" + EOL + 
725                         "                                   ^" + EOL + 
726                         "  symbol:   class Properties" + EOL + 
727                         "  location: class Error" + EOL + 
728                         "2 errors";
729         
730         List<CompilerMessage> compilerErrors = JavacCompiler.parseModernStream( 1, new BufferedReader( new StringReader( out ) ));
731         
732         assertNotNull( compilerErrors );
733         
734         CompilerMessage message1 = compilerErrors.get( 0 );
735         
736         assertTrue( message1.isError() );
737         
738         assertEquals( "error: cannot find symbol" + EOL +
739                       "  symbol:   class Properties" + EOL + 
740                       "  location: class Error", message1.getMessage() );
741         
742         assertEquals( 16, message1.getStartColumn() );
743         
744         assertEquals( 26, message1.getEndColumn() );
745         
746         assertEquals( 3, message1.getStartLine() );
747         
748         assertEquals( 3, message1.getEndLine() );
749         
750         CompilerMessage message2 = compilerErrors.get( 1 );
751         
752         assertTrue( message2.isError() );
753         
754         assertEquals( "error: cannot find symbol" + EOL +
755                       "  symbol:   class Properties" + EOL + 
756                       "  location: class Error", message2.getMessage() );
757         
758         assertEquals( 35, message2.getStartColumn() );
759         
760         assertEquals( 48, message2.getEndColumn() );
761         
762         assertEquals( 3, message2.getStartLine() );
763         
764         assertEquals( 3, message2.getEndLine() );
765     }
766     
767     public void testBugParade() throws Exception
768     {
769         String out = "An exception has occurred in the compiler (1.7.0_80). "
770             + "Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. "
771             + "Include your program and the following diagnostic in your report.  Thank you." + EOL + 
772             "com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.util.Optional not found";
773         
774         List<CompilerMessage> compilerErrors = JavacCompiler.parseModernStream( 4, new BufferedReader( new StringReader( out ) ));
775 
776         assertNotNull( compilerErrors );
777         
778         assertEquals( 1, compilerErrors.size() );
779     }
780 
781     public final void testNonAnchoredWarning() throws IOException {
782         final String error =
783               "warning: [options] bootstrap class path not set in conjunction with -source 1.6" + EOL +
784                     "1 warning" + EOL;
785 
786         final List<CompilerMessage> compilerErrors = JavacCompiler.parseModernStream(0, new BufferedReader(new
787               StringReader(
788               error)));
789 
790         assertNotNull(compilerErrors);
791         assertEquals(1, compilerErrors.size());
792         assertEquivalent(
793               new CompilerMessage(
794                     "[options] bootstrap class path not set in conjunction with -source 1.6", CompilerMessage.Kind.WARNING),
795               compilerErrors.get(0));
796     }
797 
798     public final void testAnchoredWarning() throws IOException {
799         final String error =
800               "C:\\repo\\src\\it\\includes-output-when-compiler-forked\\src\\main" +
801                     "\\java\\MyClass.java:23: warning: [divzero] division by zero" + EOL +
802                     "      System.out.println(1/0);" + EOL +
803                     "                           ^" + EOL +
804                     "1 warnings" + EOL;
805 
806         final List<CompilerMessage> compilerErrors =
807               JavacCompiler.parseModernStream(0, new BufferedReader(new StringReader(error)));
808 
809         assertNotNull(compilerErrors);
810         assertEquals(1, compilerErrors.size());
811         assertEquivalent(
812               new CompilerMessage("C:\\repo\\src\\it\\includes-output-when-compiler-forked\\src\\main\\java\\MyClass" +
813                     ".java", CompilerMessage.Kind.WARNING, 23, 27, 23, 30, "[divzero] division by zero"),
814               compilerErrors.get(0));
815     }
816 
817     public final void testMixedWarnings() throws IOException {
818         final String error =
819               "warning: [options] bootstrap class path not set in conjunction with -source 1.6" + EOL +
820                     "C:\\repo\\src\\it\\includes-output-when-compiler-forked\\src\\main\\java" +
821                     "\\MyClass.java:23: warning: [divzero] division by zero" + EOL +
822                     "      System.out.println(1/0);" + EOL +
823                     "                           ^" + EOL +
824                     "2 warnings";
825 
826         final List<CompilerMessage> compilerErrors =
827               JavacCompiler.parseModernStream(0, new BufferedReader(new StringReader(error)));
828 
829         assertNotNull(compilerErrors);
830         assertEquals(2, compilerErrors.size());
831         assertEquivalent(
832               new CompilerMessage(
833                     "[options] bootstrap class path not set in conjunction with -source 1.6", CompilerMessage.Kind.WARNING),
834               compilerErrors.get(0));
835         assertEquivalent(
836               new CompilerMessage("C:\\repo\\src\\it\\includes-output-when-compiler-forked\\src\\main\\java\\MyClass" +
837                     ".java", CompilerMessage.Kind.WARNING, 23, 27, 23, 30, "[divzero] division by zero"),
838               compilerErrors.get(1));
839     }
840 
841     public final void testIssue37() throws IOException {
842         final String error =
843               "warning: [path] bad path element \"d:\\maven_repo\\.m2\\repository\\org\\ow2\\asm\\asm-xml\\5.0.3\\asm-5.0.3.jar\": no such file or directory" + EOL +
844                     "warning: [path] bad path element \"d:\\maven_repo\\.m2\\repository\\org\\ow2\\asm\\asm-xml\\5.0.3\\asm-util-5.0.3.jar\": no such file or directory" + EOL +
845                     "warning: [options] bootstrap class path not set in conjunction with -source 1.7" + EOL +
846                     "3 warnings" + EOL +
847                     "An exception has occurred in the compiler (9). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you." + EOL +
848                     "java.lang.NullPointerException" + EOL +
849                     "\tat jdk.zipfs/jdk.nio.zipfs.JarFileSystem.getVersionMap(JarFileSystem.java:137)" + EOL +
850                     "\tat jdk.zipfs/jdk.nio.zipfs.JarFileSystem.createVersionedLinks(JarFileSystem.java:112)" + EOL +
851                     "\tat jdk.zipfs/jdk.nio.zipfs.JarFileSystem.<init>(JarFileSystem.java:85)" + EOL +
852                     "\tat jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:134)" + EOL +
853                     "\tat jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:517)" + EOL +
854                     "\tat jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getContainer(JavacFileManager.java:319)" + EOL +
855                     "\tat jdk.compiler/com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:715)" + EOL +
856                     "\tat jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:722)" + EOL +
857                     "\tat jdk.compiler/com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:655)" + EOL +
858                     "\tat jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:526)" + EOL +
859                     "\tat jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:293)" + EOL +
860                     "\tat jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)" + EOL +
861                     "\tat jdk.compiler/com.sun.tools.javac.code.Symbol$PackageSymbol.members(Symbol.java:1120)" + EOL +
862                     "\tat jdk.compiler/com.sun.tools.javac.code.Symtab.listPackageModules(Symtab.java:810)" + EOL +
863                     "\tat jdk.compiler/com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:344)" + EOL +
864                     "\tat jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:529)" + EOL +
865                     "\tat jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:285)" + EOL +
866                     "\tat jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:300)" + EOL +
867                     "\tat jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:570)" + EOL +
868                     "\tat jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:554)" + EOL +
869                     "\tat jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1052)" + EOL +
870                     "\tat jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:923)" + EOL +
871                     "\tat jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:302)" + EOL +
872                     "\tat jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:162)" + EOL +
873                     "\tat jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)" + EOL +
874                     "\tat jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)";
875 
876         final List<CompilerMessage> compilerErrors =
877               JavacCompiler.parseModernStream(0, new BufferedReader(new StringReader(error)));
878 
879         assertNotNull( compilerErrors );
880         assertEquals(4, compilerErrors.size());
881 
882         assertEquivalent(new CompilerMessage("[path] bad path element \"d:\\maven_repo\\" +
883               ".m2\\repository\\org\\ow2\\asm\\asm-xml\\5.0.3\\asm-5.0.3.jar\": no such file or directory",
884               CompilerMessage.Kind.WARNING), compilerErrors.get(0));
885         assertEquivalent(new CompilerMessage("warning: [path] bad path element \"d:\\maven_repo\\.m2\\repository\\org\\ow2\\asm\\asm-xml\\5.0.3\\asm-util-5.0.3.jar\": no such file or directory",
886               CompilerMessage.Kind.WARNING), compilerErrors.get(1));
887         assertEquivalent(new CompilerMessage("[options] bootstrap class path not set in conjunction with -source 1.7",
888               CompilerMessage.Kind.WARNING), compilerErrors.get(2));
889 
890         final CompilerMessage finalMessage = compilerErrors.get(3);
891         assertEquals(CompilerMessage.Kind.ERROR, finalMessage.getKind());
892         assertTrue("Starts correctly", finalMessage.getMessage().startsWith("An exception has occurred in the compiler"));
893         assertTrue("continues through end of output", finalMessage.getMessage().endsWith("\tat jdk.compiler/com.sun" +
894               ".tools.javac.Main.main(Main.java:43)" + EOL));
895     }
896 
897     private static void assertEquivalent(CompilerMessage expected, CompilerMessage actual){
898         assertEquals("Message did not match", expected.getMessage(), actual.getMessage());
899         assertEquals("Kind did not match", expected.getKind(), actual.getKind());
900         assertEquals("File did not match", expected.getFile(), actual.getFile());
901         assertEquals( "Start line did not match", expected.getStartLine(), actual.getStartLine());
902         assertEquals( "Start column did not match", expected.getStartColumn(), actual.getStartColumn());
903         assertEquals("End line did not match", expected.getEndLine(), actual.getEndLine());
904         assertEquals("End column did not match", expected.getEndColumn(), actual.getEndColumn());
905     }
906 }