author=ashuk
r=edburns

Files modified

M util/classes/org/mozilla/util/Assert.java
M webclient/classes_spec/org/mozilla/webclient/BrowserControlCanvas.java
M webclient/classes_spec/org/mozilla/webclient/BrowserControlFactory.java
M webclient/classes_spec/org/mozilla/webclient/BrowserControlImpl.java
M webclient/classes_spec/org/mozilla/webclient/test/EMWindow.java
M webclient/classes_spec/org/mozilla/webclient/test/RandomHTMLInputStream.java
M webclient/classes_spec/org/mozilla/webclient/test/UniversalDialog.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/BookmarksImpl.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/CurrentPageImpl.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/HistoryImpl.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/NavigationImpl.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/PreferencesImpl.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/RDFEnumeration.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/RDFTreeNode.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/WCMouseListenerImpl.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/WindowControlImpl.java


This fix changes the name of the Assert.assert methd to Assert.assert_it
in all the Blackwood modules which use this Assertion facility from
java/util. This is necessary for getting Blackwood to work with JDK1.4
since assert is a keyword in JDK1.4 onwards.
This commit is contained in:
ashuk%eng.sun.com 2001-05-29 18:36:13 +00:00
Родитель bc9dcf60de
Коммит 0e30fa38c3
18 изменённых файлов: 101 добавлений и 101 удалений

Просмотреть файл

@ -34,7 +34,7 @@ package org.mozilla.util;
*
* Typical usage:
* <BLOCKQUOTE><TT>
* Assert.assert(Assert.enabled && mytest(), "my test failed");
* Assert.assert_it(Assert.enabled && mytest(), "my test failed");
* </TT></BLOCKQUOTE><P>
*
* Such usage prevents <TT>mytest()</TT> from being executed if assertions
@ -45,19 +45,19 @@ package org.mozilla.util;
* If you know that the condition being tested is fast, you may omit the
* <I>enabled</I> flag:
* <BLOCKQUOTE><TT>
* Assert.assert(myValue != null);
* Assert.assert_it(myValue != null);
* </TT></BLOCKQUOTE><P>
*
* Note that even in this second usage, if assertions are disabled,
* the <B>assert()</B> method will do nothing.<P>
* the <B>assert_it()</B> method will do nothing.<P>
*
* Another usage that is more efficient but bulkier:
* <BLOCKQUOTE><TT>
* if (Assert.enabled && Assert.assert(mytest(), "my test failed"));
* if (Assert.enabled && Assert.assert_it(mytest(), "my test failed"));
* </TT></BLOCKQUOTE><P>
*
* Such usage prevents not only <TT>mytest()</TT> from being executed if
* assertions are disabled but also the assert method itself, and some
* assertions are disabled but also the assert_it method itself, and some
* compilers can remove the entire statement if assertions are disabled.<P>
*
* <B>Assert</B> is intended for general condition and invariant testing;
@ -102,7 +102,7 @@ static public void setEnabled(boolean newEnabled) {
* @exception AssertionFailureException if <I>test</I> is false
* @return true
*/
static public boolean assert (boolean test, String message) {
static public boolean assert_it (boolean test, String message) {
if (enabled && !test) {
throw new AssertionFailureException (message);
}
@ -117,7 +117,7 @@ static public boolean assert (boolean test, String message) {
* @exception AssertionFailureException if <I>test</I> is false
* @return true
*/
static public boolean assert (boolean test) {
static public boolean assert_it (boolean test) {
if (enabled && !test) {
throw new AssertionFailureException ();
}

Просмотреть файл

@ -52,7 +52,7 @@ import java.awt.*;
* See concrete subclasses for scope info.
* @version $Id: BrowserControlCanvas.java,v 1.2 2001/05/25 23:09:45 ashuk%eng.sun.com Exp $
* @version $Id: BrowserControlCanvas.java,v 1.3 2001/05/29 18:34:17 ashuk%eng.sun.com Exp $
* @see org.mozilla.webclient.win32.Win32BrowserControlCanvas
@ -146,7 +146,7 @@ public void addNotify ()
try {
Rectangle r = new Rectangle(getBoundsRelativeToWindow());
Assert.assert(null != webShell);
Assert.assert_it(null != webShell);
WindowControl wc = (WindowControl)
webShell.queryInterface(BrowserControl.WINDOW_CONTROL_NAME);

Просмотреть файл

@ -43,7 +43,7 @@ import java.io.FileNotFoundException;
* This is a static class, it is neven instantiated.
*
* @version $Id: BrowserControlFactory.java,v 1.3 2000/04/20 18:15:36 edburns%acm.org Exp $
* @version $Id: BrowserControlFactory.java,v 1.4 2001/05/29 18:34:19 ashuk%eng.sun.com Exp $
*
* @see org.mozilla.webclient.test.EmbeddedMozilla
@ -77,7 +77,7 @@ public class BrowserControlFactory extends Object
public BrowserControlFactory()
{
Assert.assert(false, "This class shouldn't be constructed.");
Assert.assert_it(false, "This class shouldn't be constructed.");
}
//
@ -177,7 +177,7 @@ public static BrowserControl newBrowserControl() throws InstantiationException,
if (!appDataHasBeenSet) {
throw new IllegalStateException("Can't create BrowserControl instance: setAppData() has not been called.");
}
Assert.assert(null != browserControlCanvasClass);
Assert.assert_it(null != browserControlCanvasClass);
BrowserControlCanvas newCanvas = null;
BrowserControl result = null;
@ -225,16 +225,16 @@ public static void main(String [] args)
Assert.setEnabled(true);
Log.setApplicationName("BrowserControlFactory");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: BrowserControlFactory.java,v 1.3 2000/04/20 18:15:36 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: BrowserControlFactory.java,v 1.4 2001/05/29 18:34:19 ashuk%eng.sun.com Exp $");
BrowserControlCanvas canvas = null;
BrowserControl control = null;
try {
BrowserControlFactory.setAppData(args[0]);
control = BrowserControlFactory.newBrowserControl();
Assert.assert(control != null);
Assert.assert_it(control != null);
canvas = (BrowserControlCanvas) control.queryInterface("webclient.BrowserControlCanvas");
Assert.assert(canvas != null);
Assert.assert_it(canvas != null);
}
catch (Exception e) {
System.out.println(e.getMessage());

Просмотреть файл

@ -96,7 +96,7 @@ public BrowserControlImpl(BrowserControlCanvas yourCanvas)
void delete()
{
Assert.assert(null != myCanvas);
Assert.assert_it(null != myCanvas);
// Make sure we're not showing.
if (myCanvas.isShowing()) {
@ -124,7 +124,7 @@ void delete()
currentPage = null;
}
Assert.assert(null != windowControl);
Assert.assert_it(null != windowControl);
((ImplObject)windowControl).delete();
windowControl = null;
@ -148,7 +148,7 @@ static void appInitialize(String verifiedBinDirAbsolutePath) throws Exception
static void appTerminate() throws Exception
{
Assert.assert(null != wrapperFactory);
Assert.assert_it(null != wrapperFactory);
if (null != bookmarks) {
((ImplObject)bookmarks).delete();
@ -223,7 +223,7 @@ public Object queryInterface(String interfaceName) throws ClassNotFoundException
{
ParameterCheck.nonNull(interfaceName);
Assert.assert(null != wrapperFactory);
Assert.assert_it(null != wrapperFactory);
wrapperFactory.throwExceptionIfNotInitialized();
// At some point, it has to come down to hard coded string names,
@ -245,7 +245,7 @@ public Object queryInterface(String interfaceName) throws ClassNotFoundException
return history;
}
if (BROWSER_CONTROL_CANVAS_NAME.equals(interfaceName)) {
Assert.assert(null != myCanvas);
Assert.assert_it(null != myCanvas);
return myCanvas;
}
if (CURRENT_PAGE_NAME.equals(interfaceName)) {
@ -308,7 +308,7 @@ public static void main(String [] args)
Assert.setEnabled(true);
Log.setApplicationName("BrowserControlImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: BrowserControlImpl.java,v 1.5 2001/05/24 21:13:30 ashuk%eng.sun.com Exp $");
Log.setApplicationVersionDate("$Id: BrowserControlImpl.java,v 1.6 2001/05/29 18:34:19 ashuk%eng.sun.com Exp $");
}

Просмотреть файл

@ -57,7 +57,7 @@ import java.io.FileInputStream;
* This is a test application for using the BrowserControl.
*
* @version $Id: EMWindow.java,v 1.31 2001/05/24 21:13:45 ashuk%eng.sun.com Exp $
* @version $Id: EMWindow.java,v 1.32 2001/05/29 18:34:21 ashuk%eng.sun.com Exp $
*
* @see org.mozilla.webclient.BrowserControlFactory
@ -273,7 +273,7 @@ private UniversalDialog uniDialog = null;
System.out.println("Can't create BrowserControl: " +
e.getMessage());
}
Assert.assert(null != browserCanvas);
Assert.assert_it(null != browserCanvas);
browserCanvas.setSize(defaultWidth, defaultHeight);
// Add the control panel and the browserCanvas

Просмотреть файл

@ -102,7 +102,7 @@ public RandomHTMLInputStream(int yourNumReads)
ParameterCheck.greaterThan(yourNumReads, 1);
random = new Random();
Assert.assert(null != random);
Assert.assert_it(null != random);
isClosed = false;
firstRead = true;

Просмотреть файл

@ -95,7 +95,7 @@ public void setParms(String titleMsg,
public void actionPerformed(ActionEvent ae)
{
Assert.assert(null != buttons);
Assert.assert_it(null != buttons);
int i = 0;
for (i = 0; i < buttons.length; i++) {
if (ae.getSource() == buttons[i]) {

Просмотреть файл

@ -143,7 +143,7 @@ public void addBookmark(BookmarkEntry mayBeNullParent,
public TreeModel getBookmarks() throws IllegalStateException
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
if (null == bookmarksTree) {
int nativeBookmarks;
@ -166,7 +166,7 @@ public void removeBookmark(BookmarkEntry bookmark)
{
ParameterCheck.nonNull(bookmark);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
throw new UnimplementedException("\nUnimplementedException -----\n API Function CurrentPage::getPageInfo has not yet been implemented.\n");
}
@ -242,17 +242,17 @@ public static void main(String [] args)
Log.setApplicationName("BookmarksImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: BookmarksImpl.java,v 1.8 2001/04/02 21:13:56 ashuk%eng.sun.com Exp $");
Log.setApplicationVersionDate("$Id: BookmarksImpl.java,v 1.9 2001/05/29 18:36:04 ashuk%eng.sun.com Exp $");
try {
org.mozilla.webclient.BrowserControlFactory.setAppData(args[0]);
org.mozilla.webclient.BrowserControl control =
org.mozilla.webclient.BrowserControlFactory.newBrowserControl();
Assert.assert(control != null);
Assert.assert_it(control != null);
Bookmarks wc = (Bookmarks)
control.queryInterface(org.mozilla.webclient.BrowserControl.WINDOW_CONTROL_NAME);
Assert.assert(wc != null);
Assert.assert_it(wc != null);
}
catch (Exception e) {
System.out.println("got exception: " + e.getMessage());

Просмотреть файл

@ -91,7 +91,7 @@ public CurrentPageImpl(WrapperFactory yourFactory,
public void copyCurrentSelectionToSystemClipboard()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeCopyCurrentSelectionToSystemClipboard(nativeWebShell);
@ -268,7 +268,7 @@ public static void main(String [] args)
Assert.setEnabled(true);
Log.setApplicationName("CurrentPageImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: CurrentPageImpl.java,v 1.17 2001/05/10 16:57:00 ashuk%eng.sun.com Exp $");
Log.setApplicationVersionDate("$Id: CurrentPageImpl.java,v 1.18 2001/05/29 18:36:06 ashuk%eng.sun.com Exp $");
}

Просмотреть файл

@ -119,8 +119,8 @@ public void addDocumentLoadListener(DocumentLoadListener listener)
{
ParameterCheck.nonNull(listener);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert(null != nativeEventThread);
Assert.assert_it(-1 != nativeWebShell);
Assert.assert_it(null != nativeEventThread);
ParameterCheck.nonNull(listener);
WCEventListenerWrapper listenerWrapper =
@ -139,8 +139,8 @@ public void removeDocumentLoadListener(DocumentLoadListener listener)
{
ParameterCheck.nonNull(listener);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert(null != nativeEventThread);
Assert.assert_it(-1 != nativeWebShell);
Assert.assert_it(null != nativeEventThread);
ParameterCheck.nonNull(listener);
WCEventListenerWrapper listenerWrapper =
@ -159,8 +159,8 @@ public void addMouseListener(MouseListener listener)
{
ParameterCheck.nonNull(listener);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert(null != nativeEventThread);
Assert.assert_it(-1 != nativeWebShell);
Assert.assert_it(null != nativeEventThread);
ParameterCheck.nonNull(listener);
// We have to wrap the user provided java.awt.event.MouseListener
@ -192,8 +192,8 @@ public void removeMouseListener(MouseListener listener)
{
ParameterCheck.nonNull(listener);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert(null != nativeEventThread);
Assert.assert_it(-1 != nativeWebShell);
Assert.assert_it(null != nativeEventThread);
ParameterCheck.nonNull(listener);
WCMouseListenerImpl mouseListenerWrapper =
@ -228,17 +228,17 @@ public static void main(String [] args)
Log.setApplicationName("EventRegistrationImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: EventRegistrationImpl.java,v 1.9 2000/08/09 21:47:37 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: EventRegistrationImpl.java,v 1.10 2001/05/29 18:36:07 ashuk%eng.sun.com Exp $");
try {
org.mozilla.webclient.BrowserControlFactory.setAppData(args[0]);
org.mozilla.webclient.BrowserControl control =
org.mozilla.webclient.BrowserControlFactory.newBrowserControl();
Assert.assert(control != null);
Assert.assert_it(control != null);
EventRegistration wc = (EventRegistration)
control.queryInterface(org.mozilla.webclient.BrowserControl.WINDOW_CONTROL_NAME);
Assert.assert(wc != null);
Assert.assert_it(wc != null);
}
catch (Exception e) {
System.out.println("got exception: " + e.getMessage());

Просмотреть файл

@ -77,7 +77,7 @@ public HistoryImpl(WrapperFactory yourFactory,
public void back()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeBack(nativeWebShell);
@ -87,7 +87,7 @@ public void back()
public boolean canBack()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
boolean result = false;
synchronized(myBrowserControl) {
@ -99,7 +99,7 @@ public boolean canBack()
public HistoryEntry [] getBackList()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
HistoryEntry [] result = null;
/* synchronized(myBrowserControl) {
@ -114,7 +114,7 @@ public HistoryEntry [] getBackList()
public void clearHistory()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
/* synchronized(myBrowserControl) {
nativeClearHistory(nativeWebShell);
@ -129,7 +129,7 @@ public void clearHistory()
public void forward()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeForward(nativeWebShell);
@ -139,7 +139,7 @@ public void forward()
public boolean canForward()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
boolean result = false;
synchronized(myBrowserControl) {
@ -152,7 +152,7 @@ public HistoryEntry [] getForwardList()
{
HistoryEntry [] result = null;
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
/* synchronized(myBrowserControl) {
result = nativeGetForwardList(nativeWebShell);
@ -167,7 +167,7 @@ public HistoryEntry [] getHistory()
{
HistoryEntry [] result = null;
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
/* synchronized(myBrowserControl) {
result = nativeGetHistory(nativeWebShell);
@ -182,7 +182,7 @@ public HistoryEntry getHistoryEntry(int historyIndex)
{
ParameterCheck.noLessThan(historyIndex, 0);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
HistoryEntry result = null;
/* synchronized(myBrowserControl) {
@ -197,7 +197,7 @@ public HistoryEntry getHistoryEntry(int historyIndex)
public int getCurrentHistoryIndex()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
int result = -1;
synchronized(myBrowserControl) {
@ -210,7 +210,7 @@ public void setCurrentHistoryIndex(int historyIndex)
{
ParameterCheck.noLessThan(historyIndex, 0);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeSetCurrentHistoryIndex(nativeWebShell, historyIndex);
@ -220,7 +220,7 @@ public void setCurrentHistoryIndex(int historyIndex)
public int getHistoryLength()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
int result = -1;
synchronized(myBrowserControl) {
@ -233,7 +233,7 @@ public String getURLForIndex(int historyIndex)
{
ParameterCheck.noLessThan(historyIndex, 0);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
String result = null;
synchronized(myBrowserControl) {
@ -283,7 +283,7 @@ public static void main(String [] args)
Assert.setEnabled(true);
Log.setApplicationName("HistoryImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: HistoryImpl.java,v 1.4 2000/07/22 02:48:25 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: HistoryImpl.java,v 1.5 2001/05/29 18:36:07 ashuk%eng.sun.com Exp $");
}

Просмотреть файл

@ -200,8 +200,8 @@ public void delete()
public void run()
{
// this.setPriority(Thread.MIN_PRIORITY);
Assert.assert(-1 != nativeWebShell);
Assert.assert(null != windowControl);
Assert.assert_it(-1 != nativeWebShell);
Assert.assert_it(null != windowControl);
nativeInitialize(nativeWebShell);
@ -327,8 +327,8 @@ private void doRemoveListeners()
void addListener(WCEventListenerWrapper newListener)
{
Assert.assert(-1 != nativeWebShell);
Assert.assert(null != windowControl);
Assert.assert_it(-1 != nativeWebShell);
Assert.assert_it(null != windowControl);
synchronized (this) {
if (null == listenersToAdd) {
@ -350,8 +350,8 @@ void addListener(WCEventListenerWrapper newListener)
void removeListener(WCEventListenerWrapper newListener)
{
Assert.assert(-1 != nativeWebShell);
Assert.assert(null != windowControl);
Assert.assert_it(-1 != nativeWebShell);
Assert.assert_it(null != windowControl);
synchronized (this) {
if (null == listenersToRemove) {
@ -388,8 +388,8 @@ void nativeEventOccurred(WebclientEventListener target,
ParameterCheck.nonNull(target);
ParameterCheck.nonNull(targetClassName);
Assert.assert(-1 != nativeWebShell);
Assert.assert(null != windowControl);
Assert.assert_it(-1 != nativeWebShell);
Assert.assert_it(null != windowControl);
WebclientEvent event = null;
@ -397,7 +397,7 @@ void nativeEventOccurred(WebclientEventListener target,
event = new DocumentLoadEvent(this, eventType, eventData);
}
else if (MouseListener.class.getName().equals(targetClassName)) {
Assert.assert(target instanceof WCMouseListenerImpl);
Assert.assert_it(target instanceof WCMouseListenerImpl);
// We create a plain vanilla WebclientEvent, which the
// WCMouseListenerImpl target knows how to deal with.

Просмотреть файл

@ -80,7 +80,7 @@ public void loadURL(String absoluteURL)
{
ParameterCheck.nonNull(absoluteURL);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeLoadURL(nativeWebShell, absoluteURL);
@ -100,7 +100,7 @@ public void loadFromStream(InputStream stream, String uri,
}
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeLoadFromStream(nativeWebShell, stream,
@ -114,7 +114,7 @@ public void refresh(long loadFlags)
{
ParameterCheck.noLessThan(loadFlags, 0);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeRefresh(nativeWebShell, loadFlags);
@ -124,7 +124,7 @@ public void refresh(long loadFlags)
public void stop()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeStop(nativeWebShell);
@ -135,7 +135,7 @@ public void setPrompt(Prompt yourPrompt)
{
ParameterCheck.nonNull(yourPrompt);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeSetPrompt(nativeWebShell, yourPrompt);
@ -173,17 +173,17 @@ public static void main(String [] args)
Log.setApplicationName("NavigationImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: NavigationImpl.java,v 1.4 2001/04/02 21:13:59 ashuk%eng.sun.com Exp $");
Log.setApplicationVersionDate("$Id: NavigationImpl.java,v 1.5 2001/05/29 18:36:10 ashuk%eng.sun.com Exp $");
try {
org.mozilla.webclient.BrowserControlFactory.setAppData(args[0]);
org.mozilla.webclient.BrowserControl control =
org.mozilla.webclient.BrowserControlFactory.newBrowserControl();
Assert.assert(control != null);
Assert.assert_it(control != null);
Navigation wc = (Navigation)
control.queryInterface(org.mozilla.webclient.BrowserControl.WINDOW_CONTROL_NAME);
Assert.assert(wc != null);
Assert.assert_it(wc != null);
}
catch (Exception e) {
System.out.println("got exception: " + e.getMessage());

Просмотреть файл

@ -164,17 +164,17 @@ public static void main(String [] args)
Log.setApplicationName("PreferencesImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: PreferencesImpl.java,v 1.2 2001/04/02 21:13:59 ashuk%eng.sun.com Exp $");
Log.setApplicationVersionDate("$Id: PreferencesImpl.java,v 1.3 2001/05/29 18:36:10 ashuk%eng.sun.com Exp $");
try {
org.mozilla.webclient.BrowserControlFactory.setAppData(args[0]);
org.mozilla.webclient.BrowserControl control =
org.mozilla.webclient.BrowserControlFactory.newBrowserControl();
Assert.assert(control != null);
Assert.assert_it(control != null);
Preferences wc = (Preferences)
control.queryInterface(org.mozilla.webclient.BrowserControl.WINDOW_CONTROL_NAME);
Assert.assert(wc != null);
Assert.assert_it(wc != null);
}
catch (Exception e) {
System.out.println("got exception: " + e.getMessage());

Просмотреть файл

@ -112,13 +112,13 @@ protected void finalize() throws Throwable
public boolean hasMoreElements()
{
Assert.assert(-1 != nativeRDFNode);
Assert.assert_it(-1 != nativeRDFNode);
return nativeHasMoreElements(nativeWebShell, nativeRDFNode);
}
public Object nextElement()
{
Assert.assert(null != parent);
Assert.assert_it(null != parent);
Object result = null;
int nextNativeRDFNode;
@ -160,7 +160,7 @@ public static void main(String [] args)
Log.setApplicationName("RDFEnumeration");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: RDFEnumeration.java,v 1.2 2000/11/03 03:16:50 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: RDFEnumeration.java,v 1.3 2001/05/29 18:36:11 ashuk%eng.sun.com Exp $");
}

Просмотреть файл

@ -152,7 +152,7 @@ public String toString()
public Enumeration children()
{
Assert.assert(-1 != nativeRDFNode);
Assert.assert_it(-1 != nativeRDFNode);
Enumeration enum = null;
enum = new RDFEnumeration(nativeWebShell, this);
@ -167,7 +167,7 @@ public boolean getAllowsChildren()
public TreeNode getChildAt(int childIndex)
{
Assert.assert(-1 != nativeRDFNode);
Assert.assert_it(-1 != nativeRDFNode);
TreeNode result = null;
int childNode;
@ -183,7 +183,7 @@ public TreeNode getChildAt(int childIndex)
public int getChildCount()
{
Assert.assert(-1 != nativeRDFNode);
Assert.assert_it(-1 != nativeRDFNode);
int result = -1;
result = nativeGetChildCount(nativeWebShell, nativeRDFNode);
@ -193,7 +193,7 @@ public int getChildCount()
public int getIndex(TreeNode node)
{
Assert.assert(-1 != nativeRDFNode);
Assert.assert_it(-1 != nativeRDFNode);
int result = -1;
if (node instanceof RDFTreeNode) {
result = nativeGetIndex(nativeWebShell, nativeRDFNode,
@ -205,13 +205,13 @@ public int getIndex(TreeNode node)
public TreeNode getParent()
{
Assert.assert(-1 != nativeRDFNode);
Assert.assert_it(-1 != nativeRDFNode);
return parent;
}
public boolean isLeaf()
{
Assert.assert(-1 != nativeRDFNode);
Assert.assert_it(-1 != nativeRDFNode);
return nativeIsLeaf(nativeWebShell, nativeRDFNode);
}
@ -231,12 +231,12 @@ public void insert(MutableTreeNode child, int index)
if (!(child instanceof RDFTreeNode)) {
throw new IllegalArgumentException("Can't insert non-RDFTreeNode children");
}
Assert.assert(-1 != nativeRDFNode);
Assert.assert_it(-1 != nativeRDFNode);
RDFTreeNode childNode = (RDFTreeNode) child;
if (childNode.isFolder()) {
Assert.assert(-1 == childNode.getNativeRDFNode());
Assert.assert(null != childNode.getProperties());
Assert.assert_it(-1 == childNode.getNativeRDFNode());
Assert.assert_it(null != childNode.getProperties());
int childNativeRDFNode;
// hook up the child to its native peer
@ -247,7 +247,7 @@ public void insert(MutableTreeNode child, int index)
childNode.setNativeRDFNode(childNativeRDFNode);
}
else {
Assert.assert(-1 != childNode.getNativeRDFNode());
Assert.assert_it(-1 != childNode.getNativeRDFNode());
int childNativeRDFNode = childNode.getNativeRDFNode();
// hook up the child to its native peer
@ -345,7 +345,7 @@ public static void main(String [] args)
Log.setApplicationName("RDFTreeNode");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: RDFTreeNode.java,v 1.4 2001/05/11 22:38:16 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: RDFTreeNode.java,v 1.5 2001/05/29 18:36:11 ashuk%eng.sun.com Exp $");
}

Просмотреть файл

@ -209,27 +209,27 @@ public void eventDispatched(WebclientEvent event)
public void mouseClicked(MouseEvent e)
{
Assert.assert(false, "This method should not be called.");
Assert.assert_it(false, "This method should not be called.");
}
public void mouseEntered(MouseEvent e)
{
Assert.assert(false, "This method should not be called.");
Assert.assert_it(false, "This method should not be called.");
}
public void mouseExited(MouseEvent e)
{
Assert.assert(false, "This method should not be called.");
Assert.assert_it(false, "This method should not be called.");
}
public void mousePressed(MouseEvent e)
{
Assert.assert(false, "This method should not be called.");
Assert.assert_it(false, "This method should not be called.");
}
public void mouseReleased(MouseEvent e)
{
Assert.assert(false, "This method should not be called.");
Assert.assert_it(false, "This method should not be called.");
}
} // end of class WCMouseListenerImpl

Просмотреть файл

@ -74,7 +74,7 @@ public WindowControlImpl(WrapperFactory yourFactory,
public void delete()
{
Assert.assert(null != eventThread, "eventThread shouldn't be null at delete time");
Assert.assert_it(null != eventThread, "eventThread shouldn't be null at delete time");
eventThread.delete();
eventThread = null;
nativeWebShell = -1;
@ -107,7 +107,7 @@ public void setBounds(Rectangle newBounds)
{
ParameterCheck.nonNull(newBounds);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
Assert.assert_it(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeSetBounds(nativeWebShell, newBounds.x, newBounds.y,
@ -244,17 +244,17 @@ public static void main(String [] args)
Log.setApplicationName("WindowControlImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: WindowControlImpl.java,v 1.8 2000/09/14 22:00:20 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: WindowControlImpl.java,v 1.9 2001/05/29 18:36:13 ashuk%eng.sun.com Exp $");
try {
org.mozilla.webclient.BrowserControlFactory.setAppData(args[0]);
org.mozilla.webclient.BrowserControl control =
org.mozilla.webclient.BrowserControlFactory.newBrowserControl();
Assert.assert(control != null);
Assert.assert_it(control != null);
WindowControl wc = (WindowControl)
control.queryInterface(org.mozilla.webclient.BrowserControl.WINDOW_CONTROL_NAME);
Assert.assert(wc != null);
Assert.assert_it(wc != null);
}
catch (Exception e) {
System.out.println("got exception: " + e.getMessage());