Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/src/org/htmlparser/tests/scannersTests
Modified Files:
CompositeTagScannerTest.java
Log Message:
Remove unused variables and other fixes exposed by turning on compiler warnings.
Index: CompositeTagScannerTest.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests/CompositeTagScannerTest.java,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** CompositeTagScannerTest.java 2 Jul 2004 00:49:30 -0000 1.61
--- CompositeTagScannerTest.java 31 Jul 2004 16:42:32 -0000 1.62
***************
*** 48,71 ****
}
- private CompositeTagScanner scanner;
- private String url;
-
public CompositeTagScannerTest(String name) {
super(name);
}
- protected void setUp() {
- scanner =
- new CompositeTagScanner() {
- String [] arr = {
- "SOMETHING"
- };
- public String[] getID() {
- return arr;
- }
-
- };
- }
-
private CustomTag parseCustomTag(int expectedNodeCount) throws ParserException {
parser.setNodeFactory (new PrototypicalNodeFactory (new CustomTag ()));
--- 48,55 ----
***************
*** 606,617 ****
public static class CustomScanner extends CompositeTagScanner {
private static final String MATCH_NAME [] = { "CUSTOM" };
- private boolean selfChildrenAllowed;
public CustomScanner() {
- this(true);
- }
-
- public CustomScanner(boolean selfChildrenAllowed) {
- // super("", selfChildrenAllowed ? new String[] {} : MATCH_NAME);
- this.selfChildrenAllowed = selfChildrenAllowed;
}
--- 590,594 ----
***************
*** 623,635 ****
public static class AnotherScanner extends CompositeTagScanner {
private static final String MATCH_NAME [] = { "ANOTHER" };
- private boolean acceptCustomTagsButDontAcceptCustomEndTags;
public AnotherScanner() {
- // super("", new String[] {"CUSTOM"});
- acceptCustomTagsButDontAcceptCustomEndTags = false;
- }
-
- public AnotherScanner(boolean acceptCustomTagsButDontAcceptCustomEndTags) {
- // super("", new String[] {}, new String[] {"CUSTOM"});
- this.acceptCustomTagsButDontAcceptCustomEndTags = acceptCustomTagsButDontAcceptCustomEndTags;
}
--- 600,604 ----
***************
*** 656,660 ****
* The default scanner for custom tags.
*/
! protected final static CustomScanner mDefaultScanner = new CustomScanner ();
public CustomTag ()
--- 625,629 ----
* The default scanner for custom tags.
*/
! protected final static CustomScanner mCustomScanner = new CustomScanner ();
public CustomTag ()
***************
*** 669,673 ****
else
mEnders = mIds;
! setThisScanner (mDefaultScanner);
}
--- 638,642 ----
else
mEnders = mIds;
! setThisScanner (mCustomScanner);
}
***************
*** 713,717 ****
* The default scanner for custom tags.
*/
! protected final static AnotherScanner mDefaultScanner = new AnotherScanner ();
public AnotherTag (boolean acceptCustomTagsButDontAcceptCustomEndTags)
--- 682,686 ----
* The default scanner for custom tags.
*/
! protected final static AnotherScanner mAnotherScanner = new AnotherScanner ();
public AnotherTag (boolean acceptCustomTagsButDontAcceptCustomEndTags)
***************
*** 727,731 ****
mEndTagEnders = new String[] {"CUSTOM"};
}
! setThisScanner (mDefaultScanner);
}
--- 696,700 ----
mEndTagEnders = new String[] {"CUSTOM"};
}
! setThisScanner (mAnotherScanner);
}
|