File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
repository/src/main/java/tech/ydb/yoj/repository/db Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 22
33import com .google .common .reflect .TypeToken ;
44import lombok .NonNull ;
5- import org . slf4j . LoggerFactory ;
5+ import tech . ydb . yoj . DeprecationWarnings ;
66
77import javax .annotation .CheckForNull ;
88import java .util .List ;
@@ -33,8 +33,10 @@ interface Id<E extends Entity<E>> {
3333 @ CheckForNull
3434 @ Deprecated (forRemoval = true )
3535 default E resolve () {
36- LoggerFactory .getLogger (Entity .Id .class ).warn ("You are using Entity.Id.resolve() which will be removed in YOJ 3.0.0. Please use Table.find(ID)" ,
37- new Throwable ("Entity.Id.resolve() call stack trace" ));
36+ DeprecationWarnings .warnOnce (
37+ "Entity.Id.resolve()" ,
38+ "You are using Entity.Id.resolve() which will be removed in YOJ 3.0.0. Please use Table.find(ID)"
39+ );
3840 return Tx .Current .get ().getRepositoryTransaction ().table (getType ()).find (this );
3941 }
4042
@@ -46,9 +48,10 @@ default E resolve() {
4648 default <EXCEPTION extends Exception > E resolve (
4749 Supplier <? extends EXCEPTION > throwIfAbsent
4850 ) throws EXCEPTION {
49- LoggerFactory .getLogger (Entity .Id .class ).warn ("You are using Entity.Id.resolve(Supplier) which will be removed in YOJ 3.0.0. "
50- + "Please use Table.find(ID, Supplier)" ,
51- new Throwable ("Entity.Id.resolve(Supplier) call stack trace" ));
51+ DeprecationWarnings .warnOnce (
52+ "Entity.Id.resolve()" ,
53+ "You are using Entity.Id.resolve(Supplier) which will be removed in YOJ 3.0.0. Please use Table.find(ID, Supplier)"
54+ );
5255 return Tx .Current .get ().getRepositoryTransaction ().table (getType ()).find (this , throwIfAbsent );
5356 }
5457
You can’t perform that action at this time.
0 commit comments