This is a weird one. And not terribly interesting, but a blog is supposed to be a log of what I'm doing, and this is what I'm currently looking at.
Here's some code:
component {
public void function f(){
var t1 = false;
thread name="t1" action="run" {
// nowt
}
}
}
o = new C();
md = getMetadata(o);
writeDump([o,md]);
This outputs:
array | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 |
|
Note the highlighted bit. WTF? Well I can guess what it's for, it's some internal thing that ColdFusion is doing to be able to kick off the thread. If I take the thread reference out, this goes away.
I'm not that enamoured with this. I don't care if CF needs to create methods under the hood to run stuff, but it should not bleed out into my code / environment.
This came up in a real-world situation. I'm writing some code which has an outwards-facing API, and I'm using the auto-generated API docs that CF generates if one browses to a CFC, eg this:
So this is a bit crap. I don't want Adobe's rubbish cluttering up my API. Also, note, that this has been created as a public method, which I really don't think is correct even if Adobe must bleed their code out into mine. And, yes, I can actually run it!
Sloppy shit.
As is becoming a thematic refrain on this blog "Railo doesn't behave this way", IE: it does not create spurious methods inside my CFCs.
I've raised a bug for this: 3589407.
Back to my day job.
--
Adam