Skip to content

Commit 5d7e1eb

Browse files
authored
Merge pull request mybatis#3342 from hazendaz/formatting
Formatting
2 parents 04f511f + 5abb46b commit 5d7e1eb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/main/java/org/apache/ibatis/builder/xml/XMLMapperBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ private Discriminator processDiscriminatorElement(XNode context, Class<?> result
289289
Map<String, String> discriminatorMap = new HashMap<>();
290290
for (XNode caseChild : context.getChildren()) {
291291
String value = caseChild.getStringAttribute("value");
292-
String resultMap = caseChild.getStringAttribute("resultMap", () -> processNestedResultMappings(caseChild, resultMappings, resultType));
292+
String resultMap = caseChild.getStringAttribute("resultMap",
293+
() -> processNestedResultMappings(caseChild, resultMappings, resultType));
293294
discriminatorMap.put(value, resultMap);
294295
}
295296
return builderAssistant.buildDiscriminator(resultType, column, javaTypeClass, jdbcTypeEnum, typeHandlerClass,

src/test/java/org/apache/ibatis/type/TypeAliasRegistryTest.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2024 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.
@@ -80,17 +80,16 @@ void shouldFetchCharType() {
8080
void shouldNotBeAbleToRegisterAliasWithEmptyString() {
8181
TypeAliasRegistry typeAliasRegistry = new TypeAliasRegistry();
8282

83-
assertThatThrownBy(() -> typeAliasRegistry.registerAlias("foo", ""))
84-
.isInstanceOf(TypeException.class)
85-
.hasMessageContaining("Error registering type alias foo for");
83+
assertThatThrownBy(() -> typeAliasRegistry.registerAlias("foo", "")).isInstanceOf(TypeException.class)
84+
.hasMessageContaining("Error registering type alias foo for");
8685
}
8786

8887
@Test
8988
void shouldNotBeAbleToResolveNotExistsAlias() {
9089
TypeAliasRegistry typeAliasRegistry = new TypeAliasRegistry();
9190

92-
assertThatThrownBy(() -> typeAliasRegistry.resolveAlias("abc"))
93-
.isInstanceOf(TypeException.class)
94-
.hasMessageContaining("Could not resolve type alias 'abc'. Cause: java.lang.ClassNotFoundException: Cannot find class: abc");
91+
assertThatThrownBy(() -> typeAliasRegistry.resolveAlias("abc")).isInstanceOf(TypeException.class)
92+
.hasMessageContaining(
93+
"Could not resolve type alias 'abc'. Cause: java.lang.ClassNotFoundException: Cannot find class: abc");
9594
}
9695
}

0 commit comments

Comments
 (0)