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

Suppress NPE in JDT LookupEnvironment

Abierto
#1,654 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@ptziegler ya está trabajando en esto.

Desde el 30/9/2026.

  • #1657 de @ptziegler — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
testing-qa

Línea de trabajo

Start with the failing workflow run and trace the test teardown around the reported LookupEnvironment stack trace. Read the test lifecycle code and the AfterEachCallback extension guidance in the issue; done means this expected NPE no longer fails the tests and teardown still runs through the intended callback.

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

Descripción

As seen in https://github.com/eclipse-windowbuilder/windowbuilder/runs/109588061970.

!MESSAGE Designer [1.26.0.202609291849.202609291858]: Cannot read the array length because "signature" is null
!STACK 0
java.lang.NullPointerException: Cannot read the array length because "signature" is null
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromConstantPoolName(LookupEnvironment.java:1918)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromConstantPoolName(LookupEnvironment.java:1937)
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:463)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:1077)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:1058)
	at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:307)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:296)
	at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:116)
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:251)
	at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:252)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3341)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1374)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1646)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:666)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1326)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:791)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateASTCached(ASTParser.java:1248)
	at org.eclipse.jdt.core.dom.ASTParser.lambda$0(ASTParser.java:1126)
	at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles(JavaModelManager.java:5765)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1126)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:874)
	at org.eclipse.wb.internal.core.utils.jdt.core.CodeUtils.parseCompilationUnit(CodeUtils.java:113)
	at org.eclipse.wb.internal.core.utils.jdt.core.CodeUtils.parseCompilationUnit(CodeUtils.java:97)
	at org.eclipse.wb.internal.core.utils.ast.AstEditor.<init>(AstEditor.java:118)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.<init>(JavaInfoParser.java:207)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:148)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:520)
	at org.eclipse.wb.internal.core.editor.DesignPage$3.run(DesignPage.java:438)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)

The failure happened when testing against the 2024-06 Eclipse and the LookupEnvironment class looks completely different now. Even if a similar problem still exists, it would not have a different stack trace. In any case, there is nothing we can really do here, so it should not cause the tests to fail.

As an additional note: Failing while tearing down the test case is likely not a very good idea, because it risks leaving stale resources behind. It should probably be moved to an AfterEachCallback extension.

Lenguaje dominante
Java
Estrellas
97
Forks
34
Merge medio
23 h 46 min
PR fusionados (30 d)
51

Preparar el entorno

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 eclipse-windowbuilder/windowbuilder

Todos los issues de eclipse-windowbuilder/windowbuilder

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.