1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-09 18:15:23 +02:00

[cleanup] fix compiler warnings

This commit is contained in:
Javier Montalvo Orus 2006-12-15 14:12:04 +00:00
parent bbbac20e9b
commit 8aebe43581
14 changed files with 36 additions and 24 deletions

View file

@ -14,10 +14,6 @@ import java.util.Enumeration;
import java.util.Iterator; import java.util.Iterator;
import java.util.Vector; import java.util.Vector;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard; import org.eclipse.jface.wizard.Wizard;
import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.IHost;
@ -128,9 +124,7 @@ public class ServiceDiscoveryWizard extends Wizard {
RSEUIPlugin.getDefault().getSystemRegistry().expandHost(conn); RSEUIPlugin.getDefault().getSystemRegistry().expandHost(conn);
} }
} catch (Exception e) { } catch (Exception e) {
if (conn != null) {
RSEUIPlugin.getDefault().getSystemRegistry().deleteHost(conn); RSEUIPlugin.getDefault().getSystemRegistry().deleteHost(conn);
}
} finally { } finally {
systemRefreshAllAction.run(); systemRefreshAllAction.run();
} }

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.protocol; package org.eclipse.tm.discovery.protocol;
@ -64,6 +64,7 @@ public class ProtocolFactory {
public static String[] getQueryList(String protocolName) throws CoreException public static String[] getQueryList(String protocolName) throws CoreException
{ {
IProtocol protocol = null; IProtocol protocol = null;
String[] queries = null;
IConfigurationElement[] ce = ep.getConfigurationElements(); IConfigurationElement[] ce = ep.getConfigurationElements();
for (int i = 0; i < ce.length; i++) { for (int i = 0; i < ce.length; i++) {
@ -75,11 +76,12 @@ public class ProtocolFactory {
} }
} }
String[] queries = protocol.getQueries(); if(protocol != null)
{
queries = protocol.getQueries();
if(queries==null) if(queries==null)
queries = new String[]{}; queries = new String[]{};
}
return queries; return queries;
} }

View file

@ -48,6 +48,7 @@ public class DeviceItemProvider
IItemPropertySource { IItemPropertySource {
/** /**
* This constructs an instance from a factory and a notifier. * This constructs an instance from a factory and a notifier.
* @param adapterFactory
* *
* @generated * @generated
*/ */

View file

@ -46,6 +46,7 @@ public class NetworkItemProvider
IItemPropertySource { IItemPropertySource {
/** /**
* This constructs an instance from a factory and a notifier. * This constructs an instance from a factory and a notifier.
* @param adapterFactory
* *
* @generated * @generated
*/ */

View file

@ -47,6 +47,7 @@ public class PairItemProvider
{ {
/** /**
* This constructs an instance from a factory and a notifier. * This constructs an instance from a factory and a notifier.
* @param adapterFactory
* *
* @generated * @generated
*/ */

View file

@ -45,6 +45,7 @@ public class ServiceItemProvider
IItemPropertySource{ IItemPropertySource{
/** /**
* This constructs an instance from a factory and a notifier. * This constructs an instance from a factory and a notifier.
* @param adapterFactory
* *
* @generated * @generated
*/ */

View file

@ -46,6 +46,7 @@ public class ServiceTypeItemProvider
{ {
/** /**
* This constructs an instance from a factory and a notifier. * This constructs an instance from a factory and a notifier.
* @param adapterFactory
* *
* @generated * @generated
*/ */

View file

@ -15,13 +15,13 @@ Contributors:
<extension point="org.eclipse.emf.ecore.generated_package"> <extension point="org.eclipse.emf.ecore.generated_package">
<package <package
uri = "http://www.eclipse.org/tm/discovery" uri = "http://www.eclipse.org/tm/discovery"
class = "org.eclipse.tm.discovery.model.DiscoveryPackage" /> class = "org.eclipse.tm.discovery.model.ModelPackage" />
</extension> </extension>
<extension point="org.eclipse.emf.ecore.extension_parser"> <extension point="org.eclipse.emf.ecore.extension_parser">
<parser <parser
type="discovery" type="discovery"
class="org.eclipse.tm.discovery.model.util.DiscoveryResourceFactoryImpl" /> class="org.eclipse.tm.discovery.model.util.ModelResourceFactoryImpl" />
</extension> </extension>
</plugin> </plugin>

View file

@ -389,6 +389,10 @@ public interface ModelPackage extends EPackage {
* *
* @generated * @generated
*/ */
interface Literals { interface Literals {
/** /**
* The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.DeviceImpl <em>Device</em>}' class. * The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.DeviceImpl <em>Device</em>}' class.
@ -397,6 +401,7 @@ public interface ModelPackage extends EPackage {
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getDevice() * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getDevice()
* @generated * @generated
*/ */
EClass DEVICE = eINSTANCE.getDevice(); EClass DEVICE = eINSTANCE.getDevice();
/** /**

View file

@ -29,6 +29,7 @@ import org.eclipse.tm.discovery.model.*;
public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory { public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory {
/** /**
* Creates the default factory implementation. * Creates the default factory implementation.
* @return model factory
* *
* @generated * @generated
*/ */
@ -125,6 +126,7 @@ public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory {
/** /**
* *
* @return model package
* @deprecated * @deprecated
* @generated * @generated
*/ */

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.model.impl; package org.eclipse.tm.discovery.model.impl;
@ -103,6 +103,7 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
* those of another. * those of another.
* <p>Invocation of this method will not affect any packages that have * <p>Invocation of this method will not affect any packages that have
* already been initialized. * already been initialized.
* @return the model package
* *
* @see #eNS_URI * @see #eNS_URI
* @see #createPackageContents() * @see #createPackageContents()

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.model.util; package org.eclipse.tm.discovery.model.util;
@ -51,6 +51,7 @@ public class ModelSwitch {
/** /**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* @param theEObject
* *
* @return the first non-null result returned by a <code>caseXXX</code> call. * @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated * @generated

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.protocol.dnssd; package org.eclipse.tm.discovery.protocol.dnssd;
@ -369,8 +369,8 @@ public class DNSSDProtocol implements IProtocol {
private void handlePTRRecord(ByteArrayInputStream packetInputStream, Device device, String name) { private void handlePTRRecord(ByteArrayInputStream packetInputStream, Device device, String name) {
Service service = null; Service service = ModelFactory.eINSTANCE.createService();
ServiceType serviceType = null; ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
//skip dataLength //skip dataLength
packetInputStream.skip(2); packetInputStream.skip(2);
@ -442,8 +442,8 @@ public class DNSSDProtocol implements IProtocol {
private void handleSRVRecord(ByteArrayInputStream packetInputStream, Device device, String name) { private void handleSRVRecord(ByteArrayInputStream packetInputStream, Device device, String name) {
Service service = null; Service service = ModelFactory.eINSTANCE.createService();
ServiceType serviceType = null; ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
//data of the packet, without bytes for priority-weight-port //data of the packet, without bytes for priority-weight-port
int dataLength = (packetInputStream.read() << 8 | packetInputStream.read()) - 6; int dataLength = (packetInputStream.read() << 8 | packetInputStream.read()) - 6;
@ -541,8 +541,8 @@ public class DNSSDProtocol implements IProtocol {
} }
private void handleTXTRecord(ByteArrayInputStream packetInputStream, Device device, String recordName) { private void handleTXTRecord(ByteArrayInputStream packetInputStream, Device device, String recordName) {
ServiceType serviceType = null; ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
Service service = null;; Service service = ModelFactory.eINSTANCE.createService();
int dataLength = packetInputStream.read() << 8 | packetInputStream.read(); int dataLength = packetInputStream.read() << 8 | packetInputStream.read();
byte [] data = new byte[dataLength]; byte [] data = new byte[dataLength];

View file

@ -451,7 +451,9 @@ public class ServiceDiscoveryWizardDisplayPage extends WizardPage {
//update model when pressing return //update model when pressing return
updatePairs(item.getText(0),item.getText(1)); updatePairs(item.getText(0),item.getText(1));
text.dispose ();
e.doit = false;
break;
case SWT.TRAVERSE_ESCAPE: case SWT.TRAVERSE_ESCAPE:
text.dispose (); text.dispose ();
e.doit = false; e.doit = false;