Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Deprecation warnings with Java OpenJDK 24 - sun.misc.Unsafe usage in Firebase Admin SDK

Abierto
#1,100 1 comentario 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java

Línea de trabajo

Comienza reproduciendo la inicialización de Firebase Admin Authentication con OpenJDK 24 e inspecciona la dependencia Guava AbstractFuture$UnsafeAtomicHelper mencionada en el informe. Determina si la advertencia puede resolverse mediante la dependencia del SDK o si requiere indicaciones de compatibilidad; se considera terminado cuando la configuración compatible está documentada o las advertencias dejan de aparecer.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

api: core
[READ] Step 1: Are you in the right place?
  • For issues or feature requests related to the code in this repository
    file a Github issue.
    • If this is a feature request make sure the issue title starts with "FR:".
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.
[REQUIRED] Step 2: Describe your environment
  • Operating System version: macOS Sequoia 15.5
  • Firebase SDK version: 9.5.0
  • Library version: 9.5.0
  • Firebase Product: Firebase Admin
  • Java version: OpenJDK 24
[REQUIRED] Step 3: Describe the problem

Create a Java application using Firebase Admin Authentication
Use Java OpenJDK 24 as the runtime
Run the application
Observe deprecation warnings in the console output

What happened?
When running a Firebase Admin Authentication application with Java OpenJDK 24, the following deprecation warnings are displayed:
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called
WARNING: Please consider reporting this to the maintainers of class com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
This appears to be related to the Firebase Admin SDK's dependency on Guava's AbstractFuture$UnsafeAtomicHelper class, which uses the deprecated sun.misc.Unsafe::objectFieldOffset method.
Expected behavior:
The Firebase Admin SDK should work without deprecation warnings on supported Java versions, or provide guidance on compatible Java versions.
Relevant Code:
java// Basic Firebase Admin initialization that triggers the warnings
FirebaseOptions options = FirebaseOptions.builder()
.setCredentials(GoogleCredentials.getApplicationDefault())
.build();

FirebaseApp.initializeApp(options);

// Any subsequent Firebase Admin operations will show the warnings
Additional context:

The warnings appear to be coming from the Guava library dependency used by Firebase Admin SDK
This may impact future compatibility when Java removes the deprecated sun.misc.Unsafe methods
The application functions correctly despite the warnings

Lenguaje dominante
Java
Estrellas
620
Forks
305
Merge medio
4 d 9 h
PR fusionados (30 d)
4

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de firebase/firebase-admin-java

Todos los issues de firebase/firebase-admin-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.