Skip to content

Commit

Permalink
more concrete return values
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Nov 20, 2024
1 parent 2749b3d commit dd315d4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ public void jsConstructor() {
* @return the {@code type} property
*/
@JsxGetter
public Object getKind() {
public String getKind() {
return kind_;
}

/**
* @return the {@code type} property
*/
@JsxGetter
public Object getType() {
public String getType() {
return type_;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ public void setReturnValue(final Object newValue) {
* @return the return composed property
*/
@JsxGetter
public Object getComposed() {
public boolean getComposed() {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void jsConstructor(final String type, final ScriptableObject details) {
* @return the old URL
*/
@JsxGetter
public Object getOldURL() {
public String getOldURL() {
return oldURL_;
}

Expand All @@ -93,7 +93,7 @@ public Object getOldURL() {
* @return the new URL
*/
@JsxGetter
public Object getNewURL() {
public String getNewURL() {
return newURL_;
}
}
4 changes: 2 additions & 2 deletions src/main/java/org/htmlunit/javascript/host/event/UIEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ protected void setDetail(final long detail) {
* @return the view from which the event was generated
*/
@JsxGetter
public Object getView() {
public Window getView() {
if (view_ == NO_VIEW) {
return null;
}
if (view_ != null) {
return view_;
return (Window) view_;
}
return getWindow();
}
Expand Down
7 changes: 0 additions & 7 deletions src/test/java/org/htmlunit/archunit/ArchitectureTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,25 +214,18 @@ public boolean test(final JavaClass javaClass) {
.and().doNotHaveFullName("org.htmlunit.javascript.host.dom.NodeIterator.getFilter()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.dom.Range.getCommonAncestorContainer()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.dom.TreeWalker.getFilter()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.dom.XPathResult.getNumberValue()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.draganddrop.DataTransferItem.getKind()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.draganddrop.DataTransferItem.getType()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.BeforeUnloadEvent.getReturnValue()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.CustomEvent.getDetail()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.Event.getComposed()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.Event.getReturnValue()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.Event.getSrcElement()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.Event.getTarget()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.HashChangeEvent.getNewURL()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.HashChangeEvent.getOldURL()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.InputEvent.getData()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.InputEvent.getInputType()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.MessageEvent.getData()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.MessageEvent.getPorts()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.PopStateEvent.getState()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.ProgressEvent.getLoaded()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.TextEvent.getData()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.UIEvent.getView()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.file.FileReader.getResult()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.html.HTMLButtonElement.getValue()")
.and().doNotHaveFullName("org.htmlunit.javascript.host.html.HTMLDataElement.getValue()")
Expand Down

0 comments on commit dd315d4

Please sign in to comment.