An external spec cannot refine methods its class inherits
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- compilers, testing-qa
Línea de trabajo
Start by reading the external-refinement method lookup that emits “Could not find method” for pack() and setUndecorated(boolean); the issue does not name its source files or tests. Reproduce the example against the reported main revision, then trace how lookup handles methods inherited from java.awt.Window and java.awt.Frame. Done when an external spec can name those inherited methods and the protocol example is verified as intended.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
@StateSet({"displayable", "notDisplayable"})
@ExternalRefinementsFor("javax.swing.JFrame")
public interface JFrameRefinementsExpert {
@StateRefinement(to = "notDisplayable(this)") void JFrame(String title);
@StateRefinement(to = "displayable(this)") void pack();
@StateRefinement(from = "notDisplayable(this)") void setUndecorated(boolean undecorated);
}
public class Repro {
void show() {
JFrame f = new JFrame("x");
f.pack();
f.setUndecorated(true); // throws IllegalComponentStateException: The frame is displayable.
}
}
On main 321a7321:
Warning: Could not find method 'void pack()' for 'javax.swing.JFrame'
Warning: Could not find method 'void setUndecorated(boolean)' for 'javax.swing.JFrame'
Correct! Passed Verification.
pack is declared in java.awt.Window and setUndecorated in java.awt.Frame; a spec can only name methods its own class declares. A protocol that spans a hierarchy (here: displayable, from Window, guarding a Frame method) then has to be split into one interface per declaring class, sharing states by simple name (which also depends on registration order, see the related issue). Expected: an external spec can name inherited methods, applying to calls on receivers of that class.
- Lenguaje dominante
- Java
- Estrellas
- 67
- Forks
- 36
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 29
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de liquid-java/liquidjava
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
liquid-java/liquidjava#388 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
liquid-java/liquidjava#373 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
liquid-java/liquidjava#321 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
liquid-java/liquidjava#390 ·
Los mantenedores suelen responder en 1 día
-
Verifier crashes on `!` (or another unary operator) applied to a call whose type cannot be resolvedAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
liquid-java/liquidjava#389 ·
Los mantenedores suelen responder en 1 día
Todos los issues de liquid-java/liquidjava
Issues similares
-
BoxAttachmentMulti parsing leaks IOException / ArrayIndexOutOfBoundsException on malformed content instead of IllegalArgumentExceptionPosiblemente ocupada @Kshot3000 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ergoplatform/ergo-appkit#272 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
utopia-rise/godot-jvm#1004 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
spring-projects/spring-grpc#442 ·