If I do not use javaCast, the array remove() function (which is not in the
docs by the way…?!?),
Except for here:
https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#remove-java.lang.Object-
And here:
https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#remove-int-
the result is a boolean False.
With the javacast, it returns the number that was removed from the array
and they seedGroup array has been reduced by one element.
Is this something that is going to be amended?
What do you perceive needs amending here? You’re calling methods on the
underlying Java implementation of Lucee’s “array”, which inherits from
java.util.AbstractList and in turn java.util.AbstractCollection.
It’s ubiquitous knowledge (innit?) that Lucee object implementations are
extensions of underlying Java classes, so if you’re calling an
“undocumented” method, then it’s likely to be one of the underlying Java
methods. Only if it’s not a method of the underlying Java implementation
would a method be “undocumented”.
That said, there’s a discussion to be had (and perhaps a separate one) as
to whether calling Java methods as opposed to “member functions” is,
strictly speaking, “supported”: it’s implementation detail that
lucee.runtime.type.ArrayImpl ultimately extends java.util.AbstractList
(etc), and indeed it’s even implementation detail that
lucee.runtime.type.ArrayImpl is “a thing” in the first place. It’s unclear
whether it’s a defined “contract” that this level of implementation is
intended to be understood by CFML developers/code, and therefore whether
one ought to be using methods like remove() in the first place. It could be
legit (if unlikely) that Lucee decides to shift away
from java.util.AbstractList, in which event your code will stop working.
Perhaps what needs to happen is for the Lucee Docs project to be augmented
to have placeholder pages for things like scopes, types, etc, so people can
document them, including what the level of officially sanctioned usage
is. It might be worth you raising a Jira ticket to get this implemented, if
you think it’s a shortcoming.On Tuesday, 17 November 2015 02:14:50 UTC, Mattijs Spierings wrote: