Skip to content

Commit 2283df1

Browse files
committed
Code review suggestions
1 parent 09db974 commit 2283df1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/NHibernate/Dialect/Schema/PostgreSQLMetadata.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,21 @@ private static string NormalizeTypeNames(string typeName)
157157
return "int8";
158158
}
159159

160-
if (typeName.StartsWith("character"))
160+
if (typeName.StartsWith("character", StringComparison.Ordinal))
161161
{
162162
return typeName.Replace("character varying", "varchar").Replace("character", "char");
163163
}
164164

165-
if (typeName.EndsWith("with time zone"))
165+
if (typeName.EndsWith(" with time zone", StringComparison.Ordinal))
166166
{
167167
return typeName.StartsWith("timestamp")
168-
? typeName.Replace("with time zone", "").Replace("timestamp", "timestamptz").Trim()
169-
: typeName.Replace("with time zone", "").Replace("time", "timetz").Trim();
168+
? typeName.Replace(" with time zone", string.Empty).Replace("timestamp", "timestamptz")
169+
: typeName.Replace(" with time zone", string.Empty).Replace("time", "timetz");
170170
}
171171

172-
if (typeName.EndsWith("without time zone"))
172+
if (typeName.EndsWith(" without time zone", StringComparison.Ordinal))
173173
{
174-
return typeName.Replace("without time zone", "").Trim();
174+
return typeName.Replace(" without time zone", string.Empty);
175175
}
176176

177177
return typeName;

0 commit comments

Comments
 (0)