Skip to content

Commit 9ee1dc7

Browse files
committed
Deprecate JpaSystemException(PersistenceException) constructor to prepare for removal in Spring 5
Issue: SPR-13827
1 parent 9e2c34d commit 9ee1dc7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -415,7 +415,7 @@ public static DataAccessException convertJpaAccessExceptionIfPossible(RuntimeExc
415415

416416
// If we have another kind of PersistenceException, throw it.
417417
if (ex instanceof PersistenceException) {
418-
return new JpaSystemException((PersistenceException) ex);
418+
return new JpaSystemException(ex);
419419
}
420420

421421
// If we get here, we have an exception that resulted from user code,

spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
3232
@SuppressWarnings("serial")
3333
public class JpaSystemException extends UncategorizedDataAccessException {
3434

35+
@Deprecated
3536
public JpaSystemException(PersistenceException ex) {
3637
super(ex.getMessage(), ex);
3738
}

0 commit comments

Comments
 (0)