Skip to content

Commit

Permalink
Bugfix for - Missing error message when calling JpaHelper.getReportQu…
Browse files Browse the repository at this point in the history
…ery() with wrong argument (#1911) (#1912)

Fixes #1893

Signed-off-by: Radek Felcman <[email protected]>
(cherry picked from commit 6d59a82)
  • Loading branch information
rfelcman authored Jul 24, 2023
1 parent 0706a2a commit 3be3056
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -91,7 +91,7 @@ public static ReportQuery getReportQuery(Query query) {
return (ReportQuery)dbQuery;
}

throw new IllegalArgumentException(ExceptionLocalization.buildMessage("jpa_helper_invalid_report_query" + query.getClass()));
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("jpa_helper_invalid_report_query", new Object[]{query.getClass()}));
}

/**
Expand All @@ -102,7 +102,7 @@ public static DatabaseQuery getDatabaseQuery(Query query) {
return ((JpaQuery)query).getDatabaseQuery();
}

throw new IllegalArgumentException(ExceptionLocalization.buildMessage("jpa_helper_invalid_query" + query.getClass()));
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("jpa_helper_invalid_query", new Object[]{query.getClass()}));
}

/**
Expand All @@ -119,7 +119,7 @@ public static ReadAllQuery getReadAllQuery(Query query) {
return (ReadAllQuery)dbQuery;
}

throw new IllegalArgumentException(ExceptionLocalization.buildMessage("jpa_helper_invalid_read_all_query" + query.getClass()));
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("jpa_helper_invalid_read_all_query", new Object[]{query.getClass()}));
}

/**
Expand Down

0 comments on commit 3be3056

Please sign in to comment.