Skip to content

Commit dd315d4

Browse files
committed
more concrete return values
1 parent 2749b3d commit dd315d4

File tree

5 files changed

+7
-14
lines changed

5 files changed

+7
-14
lines changed

src/main/java/org/htmlunit/javascript/host/draganddrop/DataTransferItem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ public void jsConstructor() {
8181
* @return the {@code type} property
8282
*/
8383
@JsxGetter
84-
public Object getKind() {
84+
public String getKind() {
8585
return kind_;
8686
}
8787

8888
/**
8989
* @return the {@code type} property
9090
*/
9191
@JsxGetter
92-
public Object getType() {
92+
public String getType() {
9393
return type_;
9494
}
9595

src/main/java/org/htmlunit/javascript/host/event/Event.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ public void setReturnValue(final Object newValue) {
10061006
* @return the return composed property
10071007
*/
10081008
@JsxGetter
1009-
public Object getComposed() {
1009+
public boolean getComposed() {
10101010
return false;
10111011
}
10121012

src/main/java/org/htmlunit/javascript/host/event/HashChangeEvent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void jsConstructor(final String type, final ScriptableObject details) {
8484
* @return the old URL
8585
*/
8686
@JsxGetter
87-
public Object getOldURL() {
87+
public String getOldURL() {
8888
return oldURL_;
8989
}
9090

@@ -93,7 +93,7 @@ public Object getOldURL() {
9393
* @return the new URL
9494
*/
9595
@JsxGetter
96-
public Object getNewURL() {
96+
public String getNewURL() {
9797
return newURL_;
9898
}
9999
}

src/main/java/org/htmlunit/javascript/host/event/UIEvent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ protected void setDetail(final long detail) {
131131
* @return the view from which the event was generated
132132
*/
133133
@JsxGetter
134-
public Object getView() {
134+
public Window getView() {
135135
if (view_ == NO_VIEW) {
136136
return null;
137137
}
138138
if (view_ != null) {
139-
return view_;
139+
return (Window) view_;
140140
}
141141
return getWindow();
142142
}

src/test/java/org/htmlunit/archunit/ArchitectureTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,25 +214,18 @@ public boolean test(final JavaClass javaClass) {
214214
.and().doNotHaveFullName("org.htmlunit.javascript.host.dom.NodeIterator.getFilter()")
215215
.and().doNotHaveFullName("org.htmlunit.javascript.host.dom.Range.getCommonAncestorContainer()")
216216
.and().doNotHaveFullName("org.htmlunit.javascript.host.dom.TreeWalker.getFilter()")
217-
.and().doNotHaveFullName("org.htmlunit.javascript.host.dom.XPathResult.getNumberValue()")
218-
.and().doNotHaveFullName("org.htmlunit.javascript.host.draganddrop.DataTransferItem.getKind()")
219-
.and().doNotHaveFullName("org.htmlunit.javascript.host.draganddrop.DataTransferItem.getType()")
220217
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.BeforeUnloadEvent.getReturnValue()")
221218
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.CustomEvent.getDetail()")
222-
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.Event.getComposed()")
223219
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.Event.getReturnValue()")
224220
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.Event.getSrcElement()")
225221
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.Event.getTarget()")
226-
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.HashChangeEvent.getNewURL()")
227-
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.HashChangeEvent.getOldURL()")
228222
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.InputEvent.getData()")
229223
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.InputEvent.getInputType()")
230224
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.MessageEvent.getData()")
231225
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.MessageEvent.getPorts()")
232226
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.PopStateEvent.getState()")
233227
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.ProgressEvent.getLoaded()")
234228
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.TextEvent.getData()")
235-
.and().doNotHaveFullName("org.htmlunit.javascript.host.event.UIEvent.getView()")
236229
.and().doNotHaveFullName("org.htmlunit.javascript.host.file.FileReader.getResult()")
237230
.and().doNotHaveFullName("org.htmlunit.javascript.host.html.HTMLButtonElement.getValue()")
238231
.and().doNotHaveFullName("org.htmlunit.javascript.host.html.HTMLDataElement.getValue()")

0 commit comments

Comments
 (0)