[ImageJ-bugs] [Bug 921] New: Script editor attempts to parse @ in /* comments */ as parameters

bugzilla at fiji.sc bugzilla at fiji.sc
Thu Aug 28 18:16:13 CDT 2014


http://fiji.sc/bugzilla/show_bug.cgi?id=921

            Bug ID: 921
           Summary: Script editor attempts to parse @ in /* comments */ as
                    parameters
           Product: Fiji
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: SCIFIO
          Assignee: imagej-bugs at imagej.net
          Reporter: saalfeld at mpi-cbg.de

A Beanshell script that starts with a documenting comment:

/**
 * 
 * @author Monkey
 */

triggers an error message:

Started joint-lens-samples.bsh at Thu Aug 28 19:09:07 EDT 2014
Parse error at line 1, column 2.  Encountered: *
    at bsh.Parser.generateParseException(Unknown Source)
    at bsh.Parser.jj_consume_token(Unknown Source)
    at bsh.Parser.Line(Unknown Source)
    at bsh.Interpreter.Line(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at
org.scijava.plugins.scripting.beanshell.BeanshellScriptEngine.eval(BeanshellScriptEngine.java:80)
    at org.scijava.script.ScriptModule.run(ScriptModule.java:172)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
    at
org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:164)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

I suspect that the method to parse annotation style parameters is not robust
against comments.  Removing the comment enables the script to run.  The
Beanshell Interpreter runs it with the comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20140828/5bf29ec2/attachment.html>


More information about the Imagej-bugs mailing list