Skip to content

Commit

Permalink
Merge branch '6.1' into 6.2
Browse files Browse the repository at this point in the history
# Conflicts:
#	loader/build.xml
#	loader/pom.xml
  • Loading branch information
michaeloffner committed Oct 17, 2024
2 parents b73f097 + bd30f54 commit 49c3709
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/lucee/runtime/CFMLFactoryImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public void releaseLuceePageContext(PageContext pc, boolean unregisterFromThread
ThreadLocalPageContext.getLog(config, "application").error("release page context", e);
}
if (tmpRegister) ThreadLocalPageContext.register(beforePC);
if (unregisterFromThread) ThreadLocalPageContext.release();
else if (unregisterFromThread) ThreadLocalPageContext.release();

runningPcs.remove(Integer.valueOf(pc.getId()));
if (parent != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static Config getConfig() {
/**
* release the pagecontext for the current thread
*/
public static void release() {// print.ds(Thread.currentThread().getName());
public static void release() {
pcThreadLocal.set(null);
pcThreadLocalInheritable.set(null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,14 @@ public void onSessionEnd(CFMLFactory factory, String applicationName, String cfi
if (scope instanceof JSession) app = ((JSession) scope).getComponent();
if (app == null || !app.containsKey(ON_SESSION_END)) return;
PageContextImpl pc = null;
PageContext existing = ThreadLocalPageContext.get();
try {
pc = createPageContext(factory, app, applicationName, cfid, ON_SESSION_END, true, -1);
call(app, pc, ON_SESSION_END, new Object[] { pc.sessionScope(false), pc.applicationScope() }, true);
}
finally {
if (pc != null) {
factory.releaseLuceePageContext(pc, true);
}
factory.releaseLuceePageContext(pc, true);
if (existing != null) ThreadLocalPageContext.register(existing);
}
}
catch (Throwable t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Object invoke() throws PageException, InstantiationException, IllegalAcce
try {
return ((BiFunction<Object, Object, Object>) getResult().getValue()).apply(null, args);
}
catch (IncompatibleClassChangeError | IllegalStateException e) {
catch (LinkageError | IllegalStateException e) {
if (!Clazz.allowReflection()) throw e;
LogUtil.log("direct", e);
DynamicInvoker di = DynamicInvoker.getExistingInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ else if ("equals".equals(methodName.getString()) && args.length == 1) {
try {
return ((BiFunction<Object, Object, Object>) getResult().getValue()).apply(o, args);
}
catch (IncompatibleClassChangeError | ClassCastException e) { // java.lang.ClassCastException
catch (LinkageError | ClassCastException e) { // java.lang.ClassCastException
if (!Clazz.allowReflection()) throw e;
LogUtil.log("dynamic", e);
DynamicInvoker di = DynamicInvoker.getExistingInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ public class KeyConstants {
public static final Key _this = KeyImpl._const("this");
public static final Key _thistag = KeyImpl._const("thistag");
public static final Key _thread = KeyImpl._const("thread");
public static final Key _THREAD = KeyImpl._const("THREAD");
public static final Key _time = KeyImpl._const("time");
public static final Key _timers = KeyImpl._const("timers");
public static final Key _timespan = KeyImpl._const("timespan");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.objectweb.asm.commons.GeneratorAdapter;
import org.objectweb.asm.commons.Method;

import lucee.aprint;
import lucee.commons.io.log.LogUtil;
import lucee.commons.lang.ClassException;
import lucee.commons.lang.StringUtil;
Expand Down Expand Up @@ -579,14 +578,11 @@ static Type _writeOutFirstBIF(BytecodeContext bc, BIF bif, int mode, boolean las
if (vt.index != -1) names[vt.index] = null;
index++;
// if (!Types.toType(bc, vt.type).equals(argTypes[index]))
// throw new TransformerException(bc, "argument type missmatch[" + vt.type + "->" + Types.toType(bc,
// vt.type) + "!=" + argTypes[index] + "]", line);
if (!Types.toType(bc, vt.type).equals(argTypes[index]))
aprint.e("argument type missmatch[" + vt.type + "->" + Types.toType(bc, vt.type) + "!=" + argTypes[index] + "]");
// aprint.e("argument type missmatch[" + vt.type + "->" + Types.toType(bc, vt.type) + "!=" +
// argTypes[index] + "]");
if (vt.value == null) ASMConstants.NULL(bc.getAdapter());
else vt.value.writeOut(bc, Types.isPrimitiveType(argTypes[index]) ? MODE_VALUE : MODE_REF);
}

for (int y = 0; y < names.length; y++) {
if (names[y] != null) {
TransformerException bce = new TransformerException(bc, "argument [" + names[y] + "] is not allowed for function [" + bif.getFlf().getName() + "]",
Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.2.0.109-SNAPSHOT"/>
<property name="version" value="6.2.0.110-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.2.0.109-SNAPSHOT</version>
<version>6.2.0.110-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down
2 changes: 2 additions & 0 deletions test/tickets/LDEV3116.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="thread" {

it( title="without child thread", body= function(){
thread name="test_without" action="run" {
thread.testing = 'bloh';
[1].each(function(key){
var test = key;
}, false);

thread.testing = 'blah';
}
thread action="join" name="test_without";
systemOutput(cfthread.test_without,1,1);
expect( cfthread.test_without ).notToHaveKey( "error", cfthread.test_without.error.stacktrace?: '???' );
expect( cfthread.test_without.testing ).toBe( "blah" );
} );
Expand Down

0 comments on commit 49c3709

Please sign in to comment.