On 25/11/2015 13:02, Konstantin Kolinko wrote:
> 2015-11-25 14:45 GMT+03:00  <[email protected]>:
>> Author: markt
>> Date: Wed Nov 25 11:45:04 2015
>> New Revision: 1716360
>>
>> URL: http://svn.apache.org/viewvc?rev=1716360&view=rev
>> Log:
>> Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58624
>> Correct a thread safety issue that meant that blocking message writes could 
>> block indefinitely if the WebSocket connection was closed while a message 
>> write was in progress.
>>
>> Added:
>>     
>> tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsRemoteEndpointImplServer.java
>>       - copied unchanged from r1716359, 
>> tomcat/tc8.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsRemoteEndpointImplServer.java
>> Modified:
>>     tomcat/tc7.0.x/trunk/   (props changed)
>>     tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java
>>     tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>
> 
> 
> TestWsRemoteEndpointImplServer.java uses Java 7 code.
> 
> If I run the tests with JAVA_HOME=Java 6 and  java.7.home=path to JDK
> 7,  then compilation of tests fails:
> 
>     [javac] Compiling 3 source files to REDACTED\output\testclasses
>     [javac] 
> REDACTED\tc7.0.x\trunk\test\org\apache\tomcat\websocket\server\TestWsRemoteEndpointImplServer.java:104:
> illegal start of type
>     [javac]             List<Class<? extends Encoder>> encoders = new
> ArrayList<>();
>     [javac]
>          ^
>     [javac] 
> REDACTED\tc7.0.x\trunk\test\org\apache\tomcat\websocket\server\TestWsRemoteEndpointImplServer.java:155:
> <identifier> expected
>     [javac]             } catch (IOException | EncodeException e) {
>     [javac]                                 ^
>     [javac] 
> REDACTED\tc7.0.x\trunk\test\org\apache\tomcat\websocket\server\TestWsRemoteEndpointImplServer.java:155:
> '{' expected
>     [javac]             } catch (IOException | EncodeException e) {
>     [javac]                                   ^
>     [javac] 
> REDACTED\tc7.0.x\trunk\test\org\apache\tomcat\websocket\server\TestWsRemoteEndpointImplServer.java:155:
> not a statement
>     [javac]             } catch (IOException | EncodeException e) {
>     [javac]                                                    ^
>     [javac] 
> REDACTED\tc7.0.x\trunk\test\org\apache\tomcat\websocket\server\TestWsRemoteEndpointImplServer.java:155:
> ';' expected
>     [javac]             } catch (IOException | EncodeException e) {
>     [javac]                                                     ^
>     [javac] 
> REDACTED\tc7.0.x\trunk\test\org\apache\tomcat\websocket\server\TestWsRemoteEndpointImplServer.java:176:
> reached end of file while parsing
>     [javac] }
>     [javac]  ^
>     [javac] 6 errors
> 
> 
> At buildbot:
> https://ci.apache.org/builders/tomcat-7-trunk/builds/193/steps/compile_1/logs/stdio
> 
> In build.xml (in <target name="test-compile") there is a single javac
> call that compiles both Java 6 and Java 7 tests. I think this can be
> solved by splitting it into two javac calls.  (Alternative solution is
> to auto-adjust ${compile.source} and ${compile.target} arguments to
> javac depending on availability of ${java.7.home})

Thanks. I opted for making the test class Java 6 friendly as that seemed
the simplest option.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to