Skip to content

Commit d6232ec

Browse files
committed
code style
1 parent 7961f94 commit d6232ec

3 files changed

Lines changed: 9 additions & 50 deletions

File tree

src/main/java/org/htmlunit/html/impl/SimpleRange.java

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,6 @@ public void collapse(final boolean toStart) {
210210
}
211211
}
212212

213-
// /**
214-
// * {@inheritDoc}
215-
// */
216-
// @Override
217-
// public short compareBoundaryPoints(final short how, final Range sourceRange) throws DOMException {
218-
// throw new RuntimeException("Not implemented!");
219-
// }
220-
221213
/**
222214
* Removes the contents of this range from the containing document or
223215
* document fragment without returning a reference to the removed
@@ -281,14 +273,6 @@ else if (endContainer_.getChildNodes().getLength() > endOffset_) {
281273
}
282274
}
283275

284-
// /**
285-
// * {@inheritDoc}
286-
// */
287-
// @Override
288-
// public void detach() throws DOMException {
289-
// throw new RuntimeException("Not implemented!");
290-
// }
291-
292276
/**
293277
* Moves the contents of a Range from the containing document or document
294278
* fragment to a new DocumentFragment.
@@ -438,22 +422,6 @@ public void setEnd(final DomNode refNode, final int offset) {
438422
endContainer_ = refNode;
439423
endOffset_ = offset;
440424
}
441-
//
442-
// /**
443-
// * {@inheritDoc}
444-
// */
445-
// @Override
446-
// public void setEndAfter(final Node refNode) throws RangeException, DOMException {
447-
// throw new RuntimeException("Not implemented!");
448-
// }
449-
//
450-
// /**
451-
// * {@inheritDoc}
452-
// */
453-
// @Override
454-
// public void setEndBefore(final Node refNode) throws RangeException, DOMException {
455-
// throw new RuntimeException("Not implemented!");
456-
// }
457425

458426
/**
459427
* Sets the attributes describing the start.
@@ -465,22 +433,6 @@ public void setStart(final DomNode refNode, final int offset) {
465433
startOffset_ = offset;
466434
}
467435

468-
// /**
469-
// * {@inheritDoc}
470-
// */
471-
// @Override
472-
// public void setStartAfter(final Node refNode) throws RangeException, DOMException {
473-
// throw new RuntimeException("Not implemented!");
474-
// }
475-
//
476-
// /**
477-
// * {@inheritDoc}
478-
// */
479-
// @Override
480-
// public void setStartBefore(final Node refNode) throws RangeException, DOMException {
481-
// throw new RuntimeException("Not implemented!");
482-
// }
483-
484436
/**
485437
* Reparents the contents of the Range to the given node and inserts the
486438
* node at the position of the start of the Range.

src/main/java/org/htmlunit/javascript/host/dom/Range.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,7 @@ public Object extractContents() {
351351
}
352352

353353
/**
354-
* Returns a W3C {@link org.w3c.dom.ranges.Range} version of this object.
355-
* @return a W3C {@link org.w3c.dom.ranges.Range} version of this object
354+
* @return a {@link SimpleRange} version of this object
356355
*/
357356
public SimpleRange getSimpleRange() {
358357
return new SimpleRange(startContainer_.getDomNodeOrNull(), startOffset_,

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ public void check(final JavaMethod method, final ConditionEvents events) {
247247
.doNotHaveFullyQualifiedName("org.htmlunit.SgmlPage")
248248
.should().dependOnClassesThat().haveFullyQualifiedName("org.w3c.dom.traversal.DocumentTraversal");
249249

250+
/**
251+
* Make sure to not use javax.imageio.
252+
*/
253+
@ArchTest
254+
public static final ArchRule androidRanges = noClasses()
255+
.should().dependOnClassesThat().resideInAnyPackage("org.w3c.dom.ranges..");
256+
257+
250258
/**
251259
* Make sure to not use javax.imageio.
252260
*/

0 commit comments

Comments
 (0)