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 (#1914)

Fixes #1893

Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
  • Loading branch information
rfelcman committed Jul 24, 2023
1 parent d3fe11e commit 7ffb888
Showing 1 changed file with 4 additions and 4 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 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 @@ -87,7 +87,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 @@ -98,7 +98,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 @@ -115,7 +115,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 7ffb888

Please sign in to comment.