-Add default to interface. Add fix for the test branch
-Change default behavior
This commit is contained in:
Родитель
7bffc8d3a7
Коммит
992a67f719
|
@ -33,3 +33,6 @@ hs_err_pid*
|
|||
/target/
|
||||
/Azure.Functions.Cli/*
|
||||
/azure-functions-java-worker/
|
||||
|
||||
#IDE
|
||||
*.iml
|
|
@ -19,7 +19,7 @@ $atchetypeVersion = $matches[1]
|
|||
Write-Host "atchetypeVersion: " $atchetypeVersion
|
||||
|
||||
# Clone and install function maven plugin
|
||||
git clone https://github.com/Microsoft/azure-maven-plugins.git -b develop
|
||||
git clone https://github.com/Microsoft/azure-maven-plugins.git -b master
|
||||
Push-Location -Path "./azure-maven-plugins" -StackName libraryDir
|
||||
Write-Host "Build and install azure-functions-maven-plugins"
|
||||
cmd.exe /c '.\..\mvnBuildSkipTests.bat'
|
||||
|
|
|
@ -39,5 +39,7 @@ public interface ExecutionContext {
|
|||
* Returns the trace context.
|
||||
* @return the trace context
|
||||
*/
|
||||
TraceContext getTraceContext();
|
||||
default TraceContext getTraceContext() {
|
||||
return new TraceContext(){};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
package com.microsoft.azure.functions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -19,17 +20,23 @@ public interface TraceContext {
|
|||
*
|
||||
* @return the TraceparentString from the Activity.
|
||||
*/
|
||||
String getTraceparent();
|
||||
default String getTraceparent() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Tracestate which is Activity.Current?.Id from host.
|
||||
* @return the Tracestate which is Activity.Current?.Id from host.
|
||||
*/
|
||||
String getTracestate();
|
||||
default String getTracestate() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the attributes which correspond to the tags.
|
||||
* @return the attributes which correspond to the tags.
|
||||
*/
|
||||
Map<String, String> getAttributes();
|
||||
}
|
||||
default Map<String, String> getAttributes() {
|
||||
return Collections.<String, String>emptyMap();
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче