Bug 73817 - Assertion failure executing rule
Assertion failure executing rule
Status: VERIFIED FIXED
Product: contrib
Classification: Unclassified
Component: Jackpot
5.x
All All
: P1 (vote)
: TBD
Assigned To: _ tball
issues@contrib
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-21 15:04 UTC by Jaroslav Tulach
Modified: 2006-03-22 13:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2006-03-21 15:04:03 UTC
I tried a rule like:


$err => note("Found") :: $err instanceof org.openide.ErrorManager

and I got "ErrorManagerLog:4: invalid rule format: "$err" is missing a => 
expression (perhaps missing braces around a multi-statement block?)" a bit 
scary message given the fact that I am missing ";". So I tried

$err => note("Found") :: $err instanceof org.openide.ErrorManager;

but I got:

org.netbeans.jackpot.engine.EngineException: Error executing operator
	at org.netbeans.jackpot.builder.Engine.runScript(Engine.java:158)
	at 
org.netbeans.modules.jackpot.JackpotModule.runCommand(JackpotModule.java:130)
	at 
org.netbeans.modules.jackpot.actions.JackpotAction$CommandRunner.run(JackpotAction.java:77)
[catch] at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.AssertionError: isSubtype 13
	at com.sun.tools.javac.code.Types$5.visitType(Types.java:347)
	at com.sun.tools.javac.code.Types$5.visitType(Types.java:449)
	at 
com.sun.tools.javac.code.Types$DefaultTypeVisitor.visitPackageType(Types.java:3111)
	at com.sun.tools.javac.code.Type$PackageType.accept(Type.java:887)
	at 
com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3106)
	at com.sun.tools.javac.code.Types.isSubtype(Types.java:324)
	at com.sun.tools.javac.code.Types.isSubtype(Types.java:308)
	at com.sun.tools.javac.model.JavacTypes.isSubtype(JavacTypes.java:73)
	at org.netbeans.jackpot.query.Query.isSubType(Query.java:378)
	at org.netbeans.jackpot.query.Query.isInstance(Query.java:367)
	at ErrorManagerLog.rewrite(ErrorManagerLog.java:17)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:92)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translateClassRef(GeneratedMatcher.java:133)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:954)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:363)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:44)
	at 
com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1524)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translateClassRef(GeneratedMatcher.java:133)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:954)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:363)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:44)
	at 
com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1524)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translateClassRef(GeneratedMatcher.java:133)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:428)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitImport(ImmutableTreeTranslator.java:244)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitImport(ImmutableTreeTranslator.java:44)
	at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:499)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:112)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:402)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitCompilationUnit(ImmutableTreeTranslator.java:232)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitCompilationUnit(ImmutableTreeTranslator.java:44)
	at 
com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:474)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:112)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:417)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:239)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:44)
	at org.netbeans.jackpot.builder.PackageDef.accept(PackageDef.java:62)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:112)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:416)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:239)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:44)
	at org.netbeans.jackpot.builder.PackageDef.accept(PackageDef.java:62)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:112)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:416)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:239)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:44)
	at org.netbeans.jackpot.builder.PackageDef.accept(PackageDef.java:62)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:112)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:416)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:239)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:44)
	at org.netbeans.jackpot.builder.PackageDef.accept(PackageDef.java:62)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:112)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:416)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:239)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:44)
	at org.netbeans.jackpot.builder.PackageDef.accept(PackageDef.java:62)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:65)
	at 
org.netbeans.jackpot.script.GeneratedMatcher$1.translate(GeneratedMatcher.java:91)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:112)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:416)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:239)
	at 
org.netbeans.jackpot.transform.ImmutableTreeTranslator.visitPackage(ImmutableTreeTranslator.java:44)
	at org.netbeans.jackpot.builder.PackageDef.accept(PackageDef.java:62)
	at 
org.netbeans.jackpot.transform.Transformer.apply(Transformer.java:63)
	at org.netbeans.jackpot.query.Query.apply(Query.java:70)
	at org.netbeans.jackpot.builder.Engine.runScript(Engine.java:151)
	... 3 more
Comment 1 _ tball 2006-03-21 15:56:54 UTC
There are three problems here:  

. rules that don't end with semi-colons need to be reported better;

. the rule language should be able to accept expressions (no semi-colon) and not
just statements; and

. the javac assertion error needs to be addressed.

The first two problems are now issues 73825 and 73826.  I'll investigate this
third issue ASAP.
Comment 2 _ tball 2006-03-22 04:27:47 UTC
Fixed misleading error message.
Comment 3 Jaroslav Tulach 2006-03-22 13:23:42 UTC
Probably fixed at least I was able to execute:


/** get rid of error manager notify (1) */
$err.notify($t) => org.openide.ErrorManager.getDefault().notify($t)
        :: $t instanceof java.lang.Throwable
            && $err instanceof org.openide.ErrorManager;


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo