Remove unnecessary toString() call.

There were few explicit `toString()` calls that are not needed, since `toString()` will be called by default.

Original pull request #2431
This commit is contained in:
Diego Krupitza
2022-02-07 12:15:27 +01:00
committed by Jens Schauder
parent 242adf5365
commit 71c40f1f00
3 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2021 the original author or authors.
* Copyright 2016-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -278,7 +278,7 @@ public class QueryByExamplePredicateBuilder {
StringBuilder sb = new StringBuilder();
if (parent != null) {
sb.append(parent.toString());
sb.append(parent);
sb.append(" -");
sb.append(name);
sb.append("-> ");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2021 the original author or authors.
* Copyright 2013-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -700,11 +700,11 @@ class StringQuery implements DeclaredQuery {
switch (type) {
case STARTING_WITH:
return String.format("%s%%", value.toString());
return String.format("%s%%", value);
case ENDING_WITH:
return String.format("%%%s", value.toString());
return String.format("%%%s", value);
case CONTAINING:
return String.format("%%%s%%", value.toString());
return String.format("%%%s%%", value);
case LIKE:
default:
return value;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2021 the original author or authors.
* Copyright 2011-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -179,7 +179,7 @@ public class ClasspathScanningPersistenceUnitPostProcessor
mappingFileUris.add(resourcePathInClasspath);
} catch (IOException e) {
throw new IllegalStateException(String.format("Couldn't get URI for %s!", resource.toString()), e);
throw new IllegalStateException(String.format("Couldn't get URI for %s!", resource), e);
}
}