Comments (8)
It seems that this can be resolved by working through permutations of the argument's base classes in the case of a NoSuchMethodException. This can explode exponentially in the performance impact (In the case of an actual missing method when using 3 arguments with 10 base classes each, it will incur 1000 lookups before actually giving up), but normal use shouldn't cause any of these kinds of issues. In any case memoization can curtail most expense in repeated calls.
from ublu.
It's also notable that the JavaCallHelper won't work when a method is declared in an interface or superclass, because it uses getDeclaredMethod instead of getMethod.
from ublu.
from ublu.
prrimarg doesn't work, because it still manages it as a String, and doesn't find the method that takes a CharSequence, as String.contains requires (CharSequence is an interface that String implements). I can make these changes, I was just opening the issue somewhere so I wouldn't forget.
from ublu.
from ublu.
Anyway, please fix calljava if you are inspired to do so and can do so without breaking existing code. Try to avoid a performance hit. I want to use calljava more and more to create extensions rather than expand the base system.
from ublu.
It shouldn't break existing code. It should not cause a performance hit, because the classes will be checked as-is first before checking interfaces and superclasses, so if there is an exact match, it should operate in constant time as before. With memoization, the individual call worst-case is polynomial time, but the amortized time would reduce to constant, but this only really helps for long-running programs and in loops.
Either way, existing working uses should continue to work as expected with no performance impact, and cases that returned a NoSuchMethodException will be fixed with a one-time performance impact per session.
from ublu.
from ublu.
Related Issues (15)
- It is impossible to reference an ftp session via a local tuple HOT 6
- ftp can not -get a filename from a tuple, making it much less useful in scripts HOT 9
- eval does not handle longs, and wraps on signed 32-bit integer boundary HOT 1
- Add -escape and -unescape dash-commands for string command HOT 1
- rs command needs attention HOT 2
- Screenshots HOT 2
- Threads fail to access tuples if there was a local tuple in the call stack with the same name HOT 17
- subsystem command does not populate subsystem attributes without a refresh HOT 4
- gensh allowing variable input to glob HOT 11
- msgq fetches all messages 1000 times HOT 3
- Missing nested include causes system exit
- server command coverage in test suite
- More convenient handling of SSL/TLS
- ftp command tries to fetch full path HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ublu.