Skip to content

Commit 53bf909

Browse files
committed
Review feedback
Remove duplicated eval functionality Fix code smells: Remove unused logger the FnFormatDates smell is an existing smell of a function I modified only marginally
1 parent 38a5868 commit 53bf909

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

exist-core/src/main/java/org/exist/xquery/functions/fn/FnDefaultLanguage.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131

3232
public class FnDefaultLanguage extends BasicFunction {
3333

34-
private static final Logger logger = LogManager.getLogger(FunCurrentDateTime.class);
35-
3634
public static final FunctionSignature FS_DEFAULT_LANGUAGE = FunctionDSL.functionSignature(
3735
new QName("default-language", Function.BUILTIN_FUNCTION_NS),
3836
"Returns the xs:language that is " +
@@ -45,22 +43,10 @@ public FnDefaultLanguage(final XQueryContext context) {
4543
super(context, FS_DEFAULT_LANGUAGE);
4644
}
4745

46+
@Override
4847
public Sequence eval(final Sequence[] args, final Sequence contextSequence) throws XPathException {
49-
if (context.getProfiler().isEnabled()) {
50-
context.getProfiler().start(this);
51-
context.getProfiler().message(this, Profiler.DEPENDENCIES,
52-
"DEPENDENCIES", Dependency.getDependenciesName(this.getDependencies()));
53-
if (contextSequence != null) {
54-
context.getProfiler().message(this, Profiler.START_SEQUENCES,
55-
"CONTEXT SEQUENCE", contextSequence);
56-
}
57-
}
58-
final Sequence result = new StringValue(context.getDefaultLanguage());
59-
if (context.getProfiler().isEnabled()) {
60-
context.getProfiler().end(this, "", result);
61-
}
62-
return result;
6348

49+
return new StringValue(context.getDefaultLanguage());
6450
}
6551

6652
}

0 commit comments

Comments
 (0)