Unnecessary warnings in the ruby syntax (using jruby). How to avoid them?

Hello guys,

I have started using IDEA a few weeks ago to develop in JRuby. In general I've found IDEA better than Aptana RadRails, but I am having some minor problems with Jruby syntax warnings.

In my code I have the following:

Java::com.etc.etc

The line works perfectly at runtime but I receive a warning saying that "Cannot find 'com' for the type 'java'". The line is correct. Is there anyway to stop this warning without disabling other warnings? The same happens with require 'java'.

Also there is something strange with the classes that belong to "thread.rb" module. Like "Mutex", "Queue", "SizeQueue", etc. Whenever one of these classes are mentioned in the code, I get, for instance, "cannot find 'Mutex' ". This happens including or not including the require "thread". Any ideas also in how to avoid this particular warning? The code also works correct.

In general I've found the warnings and suggestions of IDEA much more useful than the ones with Aptana. But I cannot find a solution for these two little problems.

Thanks,

GA

3 comments
Comment actions Permalink

Hello gacilu,


In my code I have the following:


Java::com.etc.etc


The line works perfectly at runtime but I receive a warning saying that "Cannot find 'com' for the type 'java'". The line is correct. Is there anyway to stop this warning without disabling other warnings? The same happens with require 'java'.

We already have an issue on this problem: http://www.jetbrains.net/jira/browse/RUBY-1678. Feel free to vote and track progress on it.


Also there is something strange with the classes that belong to "thread.rb" module. Like "Mutex", "Queue", "SizeQueue", etc. Whenever one of these classes are mentioned in the code, I get, for instance, "cannot find 'Mutex' ". This happens including or not including the require "thread". Any ideas also in how to avoid this particular warning? The code also works correct.

What version of JRuby do you use?
Thanks,
Oleg

0
Comment actions Permalink

Thanks for your answer.

I use jruby 1.1.6. Is there any known problem?

Thanks,

GA

0
Comment actions Permalink

It's strange the class "Thread" does not produce the warning. All the others do: Mutex, Queue, SizedQueue and Kernel at least.

0

Please sign in to leave a comment.