Skip to content

Commit f03b6b6

Browse files
committed
Remove unnecessary unbox/rebox
1 parent 8fa2e76 commit f03b6b6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/java/org/mybatis/dynamic/sql/render/GuaranteedTableAliasCalculator.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2020 the original author or authors.
2+
* Copyright 2016-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,9 +35,12 @@ private GuaranteedTableAliasCalculator(Map<SqlTable, String> aliases) {
3535

3636
@Override
3737
public Optional<String> aliasForColumn(SqlTable table) {
38-
return super.aliasForColumn(table)
39-
.map(Optional::of)
40-
.orElseGet(() -> Optional.of(table.tableNameAtRuntime()));
38+
Optional<String> alias = super.aliasForColumn(table);
39+
if (alias.isPresent()) {
40+
return alias;
41+
} else {
42+
return Optional.of(table.tableNameAtRuntime());
43+
}
4144
}
4245

4346
public static TableAliasCalculator of(Map<SqlTable, String> aliases) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy