-
-
Notifications
You must be signed in to change notification settings - Fork 921
-
-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with object form constructor by reflection. #2595
Comments
Perhaps you can tell me what you're trying to accomplish? The JavaObject group of classes are largely not recommended and are being phased out. If you need to get at a specific constructor, there are other ways to do it (or we can add better ways). |
I was trying to avoid this warning:
|
…nt matching ... towards fixing jruby#2595
…nt matching ... towards fixing jruby#2595
there's a fix for this on jruby-1_7 adeb887 it's not 100% perfect (generic) but also avoids a similar (BigInteger ambiguous method) warning that has been irritating on JRuby-OpenSSL for a while ... |
* jruby-1_7: (24 commits) calculate 'sofisticated' type preference when ambiguous callables found (fixes jruby#2595) in case there's an exact parameter match - do not proceed with argument matching do not do equals on Class objects (just compare by identity) + remove unused imports re-factored candidate matching loops - for more readability and less implicit iterator use cleanup the constructor search - keeping redundant ~ 'intended' code as comments a slight Java integration (mostly bootstrap internals) cleanup update CallableSelector's (Map) cache internals - so we can easily refactor further move Java.method_missing into native loadPaths list generics - easier to guess for JavaEmbedUtils consumers add a factory onto ClassValue since we're be instantiating the same (based on opt) one JRubyMethod with 2 names is enough to have more base-class sharing between JavaCallable method/constructor impl + minor tweaks move getArity/getParameterTypes into base class as finals + help used methods to JIT guess name-class hash-map size without internal resizing (currently <= 48 elements) after several concurrency fixes in Java integration - un-comment a multi-threaded test non need to cast intValue to (int) move (and tune) error logic from CallableSelector into the invoker impl where it's used align JavaField's value/static_value conversions and return values + test functionality correct (Java) equals/hashCode semantics for JavaAccessibleObject + minor tweaks Try turning off sudo:false to fix build issues. ... Conflicts: .travis.yml core/src/main/java/org/jruby/RubyObject.java core/src/main/java/org/jruby/java/proxies/MapJavaProxy.java core/src/main/java/org/jruby/javasupport/JavaCallable.java core/src/main/java/org/jruby/javasupport/JavaEmbedUtils.java core/src/main/java/org/jruby/javasupport/JavaSupport.java core/src/main/java/org/jruby/runtime/Helpers.java core/src/main/java/org/jruby/util/CodegenUtils.java core/src/main/ruby/jruby/java.rb core/src/test/java/org/jruby/test/TestCodeCache.java test/test_higher_javasupport.rb
Hello,
According to this documentation: https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby#constructors
I think this should work:
Am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered: