Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

1.5 + warning

1 réponse
Avatar
LR
Salut,

Voici mon code :
public static Session currentSession() throws HibernateException
{
Session s = (Session)session.get();
// Ouvre une nouvelle Session, si ce Thread n'en a aucune
if ( s == null )
{
s = sessionFactory.openSession();
session.set( s );
}
return s;
}

Voici le warning :
Type safety: The method set(Object) belongs to the raw type ThreadLocal.
References to generic type ThreadLocal<T> should be parameterized

Quelqu'un pourrait m'expliquer ou me donner les références pour m'instruire
svp ?
Merci d'avance
Lilian

1 réponse

Avatar
Xavier MOGHRABI
LR wrote:

Salut,

Voici mon code :
public static Session currentSession() throws HibernateException
{
Session s = (Session)session.get();
// Ouvre une nouvelle Session, si ce Thread n'en a aucune
if ( s == null )
{
s = sessionFactory.openSession();
session.set( s );
}
return s;
}

Voici le warning :
Type safety: The method set(Object) belongs to the raw type ThreadLocal.
References to generic type ThreadLocal<T> should be parameterized

Quelqu'un pourrait m'expliquer ou me donner les références pour
m'instruire svp ?


jète un coup d'oeil à ça :
http://hibernate.org/42.html

--
Xavier MOGHRABI - Consortium ObjecWeb
Email : xavier.moghrabi at inrialpes.fr
Phone : +33 4 76 61 52 35