perfsonar-dev - perfsonar: r5049 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration
Subject: perfsonar development work
List archive
perfsonar: r5049 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration
Chronological Thread
- From:
- To:
- Subject: perfsonar: r5049 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration
- Date: Tue, 10 Mar 2009 09:48:13 -0400
Author: roman
Date: 2009-03-10 09:48:12 -0400 (Tue, 10 Mar 2009)
New Revision: 5049
Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/MessageHandler.java
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/ProtocolMappings.java
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/Service.java
Log:
some exception throwing removed (updated methods return null)
Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/MessageHandler.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/MessageHandler.java
2009-03-10 13:40:19 UTC (rev 5048)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/MessageHandler.java
2009-03-10 13:48:12 UTC (rev 5049)
@@ -24,9 +24,9 @@
public MessageHandler() {
- super();
- name = Configuration.MESSAGE_HANDLER;
- messages = new HashMap<String,Message>();
+ super();
+ name = Configuration.MESSAGE_HANDLER;
+ messages = new HashMap<String,Message>();
}
@@ -38,12 +38,7 @@
}
public Message getMessage(String type) throws PerfSONARException {
- Message message = (Message)messages.get(type);
- if (message == null)
- throw new PerfSONARException(
- "error/configuration",
- "Could not find a message " + type + " in the
configuration");
- return message;
+ return ((Message)messages.get(type));
}
public Map getMessages() {
Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/ProtocolMappings.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/ProtocolMappings.java
2009-03-10 13:40:19 UTC (rev 5048)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/ProtocolMappings.java
2009-03-10 13:48:12 UTC (rev 5049)
@@ -18,17 +18,17 @@
// ----------------------------------------------------------- Variables
- private Map<String,ElementConf> elements = null;
+ private Map<String,ElementConf> elements = null;
// -----------------------------------------------------------
Constructor
- public ProtocolMappings() {
+ public ProtocolMappings() {
super();
name = Configuration.PROTOCOL_MAPPINGS;
- elements = new HashMap<String,ElementConf>();
- }
+ elements = new HashMap<String,ElementConf>();
+ }
// ----------------------------------------------------------- Methods
@@ -39,12 +39,7 @@
}
public ElementConf getElement(String name) throws PerfSONARException {
- ElementConf element = (ElementConf)elements.get(name);
- if (element == null)
- throw new PerfSONARException(
- "error/configuration",
- "Could not find protocol element " + name + " in the
configuration");
- return element;
+ return ((ElementConf)elements.get(name));
}
public Map getElements() {
Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/Service.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/Service.java
2009-03-10 13:40:19 UTC (rev 5048)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration/Service.java
2009-03-10 13:48:12 UTC (rev 5049)
@@ -24,8 +24,8 @@
public Service() {
- super();
- childs = new HashMap<String,Entry>();
+ super();
+ childs = new HashMap<String,Entry>();
}
@@ -37,12 +37,7 @@
}
public Entry getEntry(String name) throws PerfSONARException {
- Entry entry = (Entry)childs.get(name);
- if (entry == null)
- throw new PerfSONARException(
- "error/configuration",
- "Could not find an entry " + name + " in the configuration");
- return entry;
+ return ((Entry)childs.get(name));
}
public Map getEntries() {
- perfsonar: r5049 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/configuration, svnlog, 03/10/2009
Archive powered by MHonArc 2.6.16.