Skip to content

Commit

Permalink
Merge pull request #19 from ortus-boxlang/development
Browse files Browse the repository at this point in the history
version bump
  • Loading branch information
lmajano authored Dec 17, 2024
2 parents 106b9db + 81d5589 commit 611acec
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- When calling `getMetadata()` with a `DynamicObject` make sure the class is unwrapped

## [1.14.0] - 2024-12-10

### Fixed

- Pre-seed `clientManagement` setting to `false` to avoid issues with Adobe/Lucee CFML engines

## [1.13.0] - 2024-12-10
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Tue Dec 10 21:15:07 UTC 2024
#Tue Dec 10 21:54:51 UTC 2024
boxlangVersion=1.0.0-snapshot
jdkVersion=21
version=1.14.0
version=1.15.0
group=ortus.boxlang
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
import ortus.boxlang.runtime.bifs.BIF;
import ortus.boxlang.runtime.bifs.BoxBIF;
import ortus.boxlang.runtime.context.IBoxContext;
import ortus.boxlang.runtime.interop.DynamicObject;
import ortus.boxlang.runtime.runnables.IClassRunnable;
import ortus.boxlang.runtime.scopes.ArgumentsScope;
import ortus.boxlang.runtime.scopes.Key;
import ortus.boxlang.runtime.types.Argument;
import ortus.boxlang.runtime.types.Array;
import ortus.boxlang.runtime.types.Function;
import ortus.boxlang.runtime.types.Query;
import ortus.boxlang.runtime.types.QueryColumn;
import ortus.boxlang.runtime.types.Array;
import ortus.boxlang.runtime.types.Struct;

@BoxBIF
Expand Down Expand Up @@ -54,6 +55,15 @@ public GetMetaData() {
public Object _invoke( IBoxContext context, ArgumentsScope arguments ) {
Object value = arguments.get( Key.value );

// DynamicObject instances need to be unwrapped to get the metadata
if ( value instanceof DynamicObject dynamicObject ) {
if ( dynamicObject.hasInstance() ) {
value = dynamicObject.unWrap();
} else {
value = dynamicObject.invokeConstructor( context ).unWrap();
}
}

// Functions have a legacy metadata view that matches CF engines
if ( value instanceof Function fun ) {
return fun.getMetaData();
Expand Down

0 comments on commit 611acec

Please sign in to comment.