-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, reusing state refinements from an abstract superclass in a concrete class is not fully implemented, and gives an error like the one below.

Example for abstract class java.net.URLConnection:
@ExternalRefinementsFor("java.net.URLConnection")
@StateSet({"setup", "connected"})
public interface URLConnectionRefinements {
@StateRefinement(to="setup(this)")
public void URLConnection(URL url);
@StateRefinement(from="setup(this)")
public void setDoInput(boolean doinput);
@StateRefinement(from="setup(this)", to="connected(this)")
public void connect();
@StateRefinement(from="connected(this)")
public Object getContent();
}Extended in class URLExt:
class URLExt extends URLConnection{
public URLExt(URL url){
super(url);
}
@Override
public void connect() throws IOException {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'connect'");
}
}```
Tested in:
```java
class Testurl {
void test() throws URISyntaxException, IOException {
URLExt u = new URLExt(new URI("http://example.com").toURL());
u.setDoInput(false); // should not be an error but it is
u.getContent(); // should be an error
}
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request