You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by mb...@apache.org on 2022/08/13 16:39:13 UTC
[db-jdo] branch tck-compiler-warnings updated: JDO-817 removing compiler warnings: method close w/o throws clause in Query and Extent
This is an automated email from the ASF dual-hosted git repository.
mbo pushed a commit to branch tck-compiler-warnings
in repository https://gitbox.apache.org/repos/asf/db-jdo.git
The following commit(s) were added to refs/heads/tck-compiler-warnings by this push:
new 3064d3bf JDO-817 removing compiler warnings: method close w/o throws clause in Query and Extent
3064d3bf is described below
commit 3064d3bf576227e01bb36c9f2429320f9ebd0f66
Author: Michael Bouschen <Mi...@akquinet.de>
AuthorDate: Sat Aug 13 18:39:03 2022 +0200
JDO-817 removing compiler warnings: method close w/o throws clause in Query and Extent
---
README.md | 4 ++--
api/src/main/java/javax/jdo/Extent.java | 3 +--
api/src/main/java/javax/jdo/Query.java | 3 +--
parent-pom/pom.xml | 2 +-
tck/src/main/resources/conf/jdo-signatures.txt | 4 ++--
5 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index b56a5ec3..8de9d216 100644
--- a/README.md
+++ b/README.md
@@ -157,8 +157,8 @@ There is a profile called `warnings` that configures the maven-compiler-plugin t
Please note, the tck enables the profile `jdori` per default and this default is disabled when specifying the profile
`warnings`. So if you want to run the tck with the jdori with warnings enabled please use the following:
- mvn -Pwarings,jdori clean install
+ mvn -Pwarnings,jdori clean install
You can pass different compiler arguments using the -D option:
- mvn -Pwarings,jdori -DcompilerArgument=-Xlint:all clean install
+ mvn -Pwarnings,jdori -DcompilerArgument=-Xlint:all clean install
diff --git a/api/src/main/java/javax/jdo/Extent.java b/api/src/main/java/javax/jdo/Extent.java
index 9f9bd105..fb745789 100644
--- a/api/src/main/java/javax/jdo/Extent.java
+++ b/api/src/main/java/javax/jdo/Extent.java
@@ -86,9 +86,8 @@ public interface Extent<E> extends Iterable<E>, AutoCloseable {
/**
* Don't use this method directly; use <code>closeAll()</code> instead. It is intended for use with try-with-resources.
- * @throws Exception if this resource cannot be closed
*/
- void close() throws Exception;
+ void close();
/** Get the fetch plan associated with this Extent.
* @return the fetch plan
diff --git a/api/src/main/java/javax/jdo/Query.java b/api/src/main/java/javax/jdo/Query.java
index c66784f1..1786d36a 100644
--- a/api/src/main/java/javax/jdo/Query.java
+++ b/api/src/main/java/javax/jdo/Query.java
@@ -375,9 +375,8 @@ public interface Query<T> extends AutoCloseable, Serializable {
/**
* Don't use this method directly; use <code>closeAll()</code> instead. It is intended for use with try-with-resources.
- * @throws Exception if this resource cannot be closed
*/
- void close() throws Exception;
+ void close();
/**
* Set the grouping expressions, optionally including a "having"
diff --git a/parent-pom/pom.xml b/parent-pom/pom.xml
index ceea77c6..1bb1de63 100644
--- a/parent-pom/pom.xml
+++ b/parent-pom/pom.xml
@@ -341,7 +341,7 @@
<id>warnings</id>
<properties>
<showWarnings>true</showWarnings>
- <compilerArgument>-Xlint:all,-try,-rawtypes</compilerArgument>
+ <compilerArgument>-Xlint:all,-rawtypes</compilerArgument>
</properties>
</profile>
</profiles>
diff --git a/tck/src/main/resources/conf/jdo-signatures.txt b/tck/src/main/resources/conf/jdo-signatures.txt
index ec4566ce..33a1c083 100644
--- a/tck/src/main/resources/conf/jdo-signatures.txt
+++ b/tck/src/main/resources/conf/jdo-signatures.txt
@@ -304,7 +304,7 @@ public interface javax.jdo.Extent extends java.lang.Iterable, java.lang.AutoClos
abstract javax.jdo.PersistenceManager getPersistenceManager();
abstract void closeAll();
abstract void close(java.util.Iterator it);
- abstract void close() throws java.lang.Exception;
+ abstract void close();
abstract javax.jdo.FetchPlan getFetchPlan();
}
@@ -908,7 +908,7 @@ public interface javax.jdo.Query extends java.lang.AutoCloseable, java.io.Serial
abstract javax.jdo.PersistenceManager getPersistenceManager();
abstract void close(Object queryResult);
abstract void closeAll();
- abstract void close() throws java.lang.Exception;
+ abstract void close();
abstract void setGrouping(String group);
abstract void setUnique(boolean unique);
abstract void setResult(String data);