Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2010-09-09 21:26:07 +0000
committerslewis2010-09-09 21:26:07 +0000
commitb195bb15d4c00d85919b2e1da07760cc5cf9ab07 (patch)
tree649cf135514a423350d3c2a4bdad3016e42efb31 /providers
parent9893ca7eee108b3c89d0a9aa0149fc07d1af787a (diff)
downloadorg.eclipse.ecf-b195bb15d4c00d85919b2e1da07760cc5cf9ab07.tar.gz
org.eclipse.ecf-b195bb15d4c00d85919b2e1da07760cc5cf9ab07.tar.xz
org.eclipse.ecf-b195bb15d4c00d85919b2e1da07760cc5cf9ab07.zip
Removed NLS references.
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF5
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/Messages.java39
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/ContainerInstantiator.java3
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java10
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java12
5 files changed, 13 insertions, 56 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF
index 29b81daf3..2911b0135 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ecf.provider.jmdns;singleton:=true
-Bundle-Version: 4.0.0.qualifier
+Bundle-Version: 4.0.100.qualifier
Bundle-Activator: org.eclipse.ecf.internal.provider.jmdns.JMDNSPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -16,8 +16,7 @@ Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
Export-Package: org.eclipse.ecf.internal.provider.jmdns;x-internal:=true,
org.eclipse.ecf.provider.jmdns.container,
org.eclipse.ecf.provider.jmdns.identity
-Import-Package: org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
+Import-Package: org.osgi.framework;version="1.3.0",
org.osgi.service.log;version="1.3.0",
org.osgi.util.tracker;version="1.3.2"
Bundle-ActivationPolicy: lazy
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/Messages.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/Messages.java
deleted file mode 100644
index ffa0b9dc9..000000000
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/Messages.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2007 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.provider.jmdns;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public final class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.provider.jmdns.messages"; //$NON-NLS-1$
- public static String ContainerInstantiator_EXCEPTION_CONTAINER_CREATE;
- public static String ContainerInstantiator_EXCEPTION_GETTING_INETADDRESS;
- public static String JMDNSDiscoveryContainer_EXCEPTION_ALREADY_CONNECTED;
- public static String JMDNSDiscoveryContainer_EXCEPTION_CONTAINER_DISPOSED;
- public static String JMDNSDiscoveryContainer_EXCEPTION_CREATE_JMDNS_INSTANCE;
- public static String JMDNSDiscoveryContainer_EXCEPTION_REGISTER_SERVICE;
- public static String JMDNSDiscoveryContainer_SERVICE_NAME_NOT_NULL;
- public static String JMDNSNamespace_EXCEPTION_ID_PARAM_2_WRONG_TYPE;
- public static String JMDNSNamespace_EXCEPTION_ID_WRONG_PARAM_COUNT;
- public static String JMDNSNamespace_EXCEPTION_TYPE_PARAM_NOT_STRING;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //
- }
-}
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/ContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/ContainerInstantiator.java
index 81bfe2c9c..6fc8b3ce3 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/ContainerInstantiator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/ContainerInstantiator.java
@@ -14,7 +14,6 @@ import org.eclipse.ecf.core.*;
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.core.provider.IContainerInstantiator;
import org.eclipse.ecf.discovery.IDiscoveryContainerAdapter;
-import org.eclipse.ecf.internal.provider.jmdns.Messages;
public class ContainerInstantiator implements IContainerInstantiator {
@@ -26,7 +25,7 @@ public class ContainerInstantiator implements IContainerInstantiator {
final AbstractContainer container = new JMDNSDiscoveryContainer();
return container;
} catch (final IDCreateException e) {
- final ContainerCreateException excep = new ContainerCreateException(Messages.ContainerInstantiator_EXCEPTION_CONTAINER_CREATE);
+ final ContainerCreateException excep = new ContainerCreateException("Jmdns container create failed", e); //$NON-NLS-1$
excep.setStackTrace(e.getStackTrace());
throw excep;
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
index a7e43339d..439f5632c 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
@@ -90,9 +90,9 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
public void connect(final ID targetID1, final IConnectContext joinContext) throws ContainerConnectException {
synchronized (lock) {
if (disposed)
- throw new ContainerConnectException(Messages.JMDNSDiscoveryContainer_EXCEPTION_CONTAINER_DISPOSED);
+ throw new ContainerConnectException("Container has been disposed"); //$NON-NLS-1$
if (this.targetID != null)
- throw new ContainerConnectException(Messages.JMDNSDiscoveryContainer_EXCEPTION_ALREADY_CONNECTED);
+ throw new ContainerConnectException("Already connected"); //$NON-NLS-1$
this.targetID = (targetID1 == null) ? getConfig().getID() : targetID1;
fireContainerEvent(new ContainerConnectingEvent(this.getID(), this.targetID, joinContext));
initializeQueue();
@@ -105,7 +105,7 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
jmdns.close();
jmdns = null;
}
- throw new ContainerConnectException(Messages.JMDNSDiscoveryContainer_EXCEPTION_CREATE_JMDNS_INSTANCE, e);
+ throw new ContainerConnectException("Cannot create JmDNS instance", e); //$NON-NLS-1$
}
fireContainerEvent(new ContainerConnectedEvent(this.getID(), this.targetID));
}
@@ -249,7 +249,7 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
try {
jmdns.registerService(svcInfo);
} catch (final IOException e) {
- throw new ECFRuntimeException(Messages.JMDNSDiscoveryContainer_EXCEPTION_REGISTER_SERVICE, e);
+ throw new ECFRuntimeException("Exception registering service", e); //$NON-NLS-1$
}
}
@@ -370,7 +370,7 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
private void checkServiceInfo(final ServiceInfo serviceInfo) {
final String serviceName = serviceInfo.getName();
if (serviceName == null)
- throw new ECFRuntimeException(Messages.JMDNSDiscoveryContainer_SERVICE_NAME_NOT_NULL);
+ throw new ECFRuntimeException("Service name cannot be null"); //$NON-NLS-1$
}
IServiceInfo createIServiceInfoFromServiceInfo(final ServiceInfo serviceInfo) throws Exception {
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java
index e6b97f0a3..5c2691495 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java
@@ -14,8 +14,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import org.eclipse.ecf.core.identity.*;
import org.eclipse.ecf.discovery.identity.IServiceTypeID;
-import org.eclipse.ecf.internal.provider.jmdns.Messages;
-import org.eclipse.osgi.util.NLS;
public class JMDNSNamespace extends Namespace {
@@ -51,17 +49,17 @@ public class JMDNSNamespace extends Namespace {
type = init;
else {
if (parameters == null || parameters.length < 1 || parameters.length > 2) {
- throw new IDCreateException(Messages.JMDNSNamespace_EXCEPTION_ID_WRONG_PARAM_COUNT);
+ throw new IDCreateException("Parameters cannot be null and must be of length 1 or 2"); //$NON-NLS-1$
}
if (parameters[0] instanceof IServiceTypeID) {
type = ((IServiceTypeID) parameters[0]).getName();
} else if (parameters[0] instanceof String) {
type = (String) parameters[0];
} else
- throw new IDCreateException(Messages.JMDNSNamespace_EXCEPTION_TYPE_PARAM_NOT_STRING);
+ throw new IDCreateException("Service type id parameter has to be of type String or IServiceTypeID"); //$NON-NLS-1$
}
} catch (final Exception e) {
- throw new IDCreateException(NLS.bind("{0} createInstance()", getName()), e); //$NON-NLS-1$
+ throw new IDCreateException(getName() + " createInstance()", e); //$NON-NLS-1$
}
final JMDNSServiceTypeID stid = new JMDNSServiceTypeID(this, type);
if (parameters.length == 1) {
@@ -71,12 +69,12 @@ public class JMDNSNamespace extends Namespace {
final URI uri = new URI((String) parameters[1]);
return new JMDNSServiceID(this, stid, uri);
} catch (URISyntaxException e) {
- throw new IDCreateException(Messages.JMDNSNamespace_EXCEPTION_ID_PARAM_2_WRONG_TYPE);
+ throw new IDCreateException("Second parameter as String must follow URI syntax"); //$NON-NLS-1$
}
} else if (parameters[1] instanceof URI) {
return new JMDNSServiceID(this, stid, (URI) parameters[1]);
} else {
- throw new IDCreateException(Messages.JMDNSNamespace_EXCEPTION_ID_PARAM_2_WRONG_TYPE);
+ throw new IDCreateException("Second parameter must be of either String or URI type"); //$NON-NLS-1$
}
}

Back to the top