Skip to content
Snippets Groups Projects
Commit 8a546dcf authored by Arnaud Jelmoni's avatar Arnaud Jelmoni
Browse files

Remove warning

parent 923fbf61
Branches
No related tags found
No related merge requests found
Pipeline #371 failed
......@@ -355,7 +355,7 @@ public class SnapManager extends DeviceImpl/* WithShutdownRunnable */ implements
public void launch_snap_shot(int argin) throws DevFailed {
LOGGER.info("Entering launch_snap_shot()");
if (get_state().equals(DevState.RUNNING)) {
DevFailedUtils.throwDevFailed("STATE_ERROR", "snapshot alreadly in progress");
throw DevFailedUtils.newDevFailed("STATE_ERROR", "snapshot alreadly in progress");
}
set_state(DevState.RUNNING);
Future<Integer> snapshotResult = executorService.submit(new SnapshotTask(argin));
......
......@@ -89,27 +89,6 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
private static final Logger LOGGER = LoggerFactory.getLogger(SnapManagerClass.class);
// --------- Start of properties data members ----------
/**
* Computer identifier on wich is settled the database HDB. The identifier
* can be the computer name or its IP address. <br>
* <b>Default value : </b> localhost.
*/
private String dbHost;
/**
* Database name.<br>
* <b>Default value : </b> hdb
*/
private String dbName;
/**
* Database schema name.<br>
* <b>Default value : </b> snap
*/
private String dbSchema;
// --------- End of properties data members ----------
/**
* SnapManagerClass class instance (it is a singleton).
*/
......@@ -172,9 +151,6 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
super(name);
LOGGER.info("Entering SnapManagerClass constructor");
// write_class_property();
get_class_property();
LOGGER.info("Leaving SnapManagerClass constructor");
}
......@@ -185,6 +161,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
// description : Create the command object(s) and store them in the
// command list
// ===================================================================
@SuppressWarnings("unchecked")
@Override
public void command_factory() {
command_list.addElement(new CreateNewContextClass("CreateNewContext", Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG,
......@@ -235,6 +212,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
// Method: attribute_factory(Vector att_list)
//
// =============================================================================
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void attribute_factory(final Vector att_list) throws DevFailed {
// Attribute : version
......@@ -252,6 +230,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
// argument : in : String[] devlist : The device name list
//
// ===================================================================
@SuppressWarnings("unchecked")
@Override
public void device_factory(final String[] devlist) throws DevFailed {
......@@ -287,94 +266,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
*/
// ===================================================================
public DbDatum get_class_property(final String name) throws DevFailed {
// for (int i = 0; i < cl_prop.length; i++) {
// if (cl_prop[i].name.equals(name)) {
// return cl_prop[i];
// }
// }
final DbDatum[] classProps = get_db_class().get_property(new String[] { name });
return classProps[0];
}
// ===================================================================
/**
* Read the class properties from database.
*/
// ===================================================================
public void get_class_property() throws DevFailed {
// Initialize your default values here.
// ------------------------------------------
// // Read class properties from database.(Automatic code generation)
// //-------------------------------------------------------------
// if ( Util._UseDb == false )
// return;
// String[] propnames = {
// };
//
// // Call database and extract values
// //--------------------------------------------
// cl_prop = get_db_class().get_property(propnames);
// int i = -1;
//
// // End of Automatic code generation
// -------------------------------------------------------------
// -------------------------------------------------------------
// if (Util._UseDb == false) {
// return;
// }
// String[] propnames = { "DbHost", "DbName", "DbSchema" };
//
// // Call database and extract values
// // --------------------------------------------
// cl_prop = get_db_class().get_property(propnames);
// int i = -1;
// // Extract DbHost value
// if (cl_prop[++i].is_empty() == false) {
// dbHost = cl_prop[i].extractString();
// }
//
// // Extract DbName value
// if (cl_prop[++i].is_empty() == false) {
// dbName = cl_prop[i].extractString();
// }
//
// // Extract DbSchema value
// if (cl_prop[++i].is_empty() == false) {
// dbSchema = cl_prop[i].extractString();
// }
// End of Automatic code generation
// -------------------------------------------------------------
}
// ===================================================================
/**
* Set class description as property in database
*/
// ===================================================================
// private void write_class_property() throws DevFailed {
// // First time, check if database used
// // --------------------------------------------
// if (Util._UseDb == false) {
// return;
// }
//
// // Prepeare DbDatum
// // --------------------------------------------
// final DbDatum[] data = new DbDatum[2];
// data[0] = new DbDatum("ProjectTitle");
// data[0].insert("Tango Device Server");
//
// data[1] = new DbDatum("Description");
// data[1].insert("This DServer provides the connections points and methods to the SnapShot service.");
//
// // Call database and and values
// // --------------------------------------------
// get_db_class().put_property(data);
// }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment