Jump to content
Excelsior Forums
Sign in to follow this  

Error in the SampleService sample

Recommended Posts

I try to compile the sample code "SampleService" which always report the following error "unreachable code" :

------------------------  Parsing Stage  -------------------------

  1/1: SampleService.class


files: 1  errors: 0  warnings: 0  notices: 0

------------------------  Codegen Stage  ----------------------

 0% total, 1/1 to go: SampleService.class

* [ SampleService.java 31.01 W311 ]

*  unreachable code

#        }

errors(0), warnings(1), notes(0); bytes(48007), time  2.97


Could you post to this forum an updated sample code without these unreachable code warning errors.

Thank you in advance.

Share this post

Link to post
Share on other sites


The SampleService example was not changed in JET 3.11, but it compiles without any warnings with the latest JET (3.11). However, it is also possible that the warning is appeared only for some versions of JDK, I've tried the 1.3.1_07. Please don't worry about this warning, it does not affect the compilation. Warnings are NOT errors.

Generally speaking, in many situations the JET can't determine, whether some suspicious code is real flaw, and generates wanings messages "just in case". So, superfluous warnings sometimes appear.

Share this post

Link to post
Share on other sites
Sign in to follow this