Groovy web console

subscribe to the feed Subscribe
to this
site

groovy default param null case

Published 2 months ago by Ben
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def staticDeploymentConfig = ["foo": null]
def assetPath = staticDeploymentConfig?.asset_path

def testDefaultParam(String app_assets_path = "/usr/src/app/.next/static") {
println app_assets_path
}

testDefaultParam(assetPath)