Author: svasilyev
Date: 2008-02-15 11:23:59 -0500 (Fri, 15 Feb 2008)
New Revision: 6349
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
Log:
Changes to avoid potential NPE
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2008-02-15
13:48:26 UTC (rev 6348)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2008-02-15
16:23:59 UTC (rev 6349)
@@ -11,10 +11,10 @@
package org.jboss.tools.vpe.ui.test;
import junit.framework.TestCase;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.ILogListener;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -22,7 +22,6 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.common.model.util.ClassLoaderUtil;
-import org.jboss.tools.jst.firstrun.JBossASAdapterInitializer;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.VpeEditorPart;
@@ -39,15 +38,18 @@
/**
* Editor in which we open visual page
*/
- private final static String EDITOR_ID =
"org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor";
+ private final static String EDITOR_ID =
"org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor"; //$NON-NLS-1$
/**
* Collects exceptions
*/
private Throwable exception;
- // check warning log
- private Boolean checkWarning;
+ /**
+ * check warning log
+ * @default false
+ */
+ private boolean checkWarning = false;
//FIX for JBIDE-1628
static {
@@ -77,7 +79,7 @@
super.setUp();
Platform.addLogListener(this);
- String jbossPath = System.getProperty("jbosstools.test.jboss.home.4.2",
"C:\\java\\jboss-4.2.2.GA");
+// String jbossPath = System.getProperty("jbosstools.test.jboss.home.4.2",
"C:\\java\\jboss-4.2.2.GA");
// JBossASAdapterInitializer.initJBossAS(jbossPath, new NullProgressMonitor());
closeEditors();
}
@@ -111,7 +113,7 @@
setException(status.getException());
break;
case IStatus.WARNING:
- if (getCheckWarning())
+ if (isCheckWarning())
setException(status.getException());
break;
default:
@@ -236,7 +238,7 @@
/**
* @return the checkWarning
*/
- protected Boolean getCheckWarning() {
+ protected boolean isCheckWarning() {
return checkWarning;
}
@@ -244,7 +246,7 @@
* @param checkWarning
* the checkWarning to set
*/
- protected void setCheckWarning(Boolean checkWarning) {
+ protected void setCheckWarning(boolean checkWarning) {
this.checkWarning = checkWarning;
}
Show replies by date