Skip to content
Snippets Groups Projects
Commit b710b887 authored by alfredo's avatar alfredo
Browse files

quick fix

parent 310ed41f
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import java.net.InetSocketAddress;
import java.net.URL;
import java.security.KeyStore;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
......@@ -86,7 +87,7 @@ public class Domain {
Helper.setConnectionSettings(con, "GET");
// leggo risposta
int status = con.getResponseCode();
// int status = con.getResponseCode(); //da problemi e non viene usato
// controllare ToDo
String content = Helper.getResponseFromConnection(con);
con.disconnect();
......@@ -127,27 +128,26 @@ public class Domain {
}
for (int i = 0; i < s1.length; i++) {
String remZip = s1[i].substring(0, s1[i].length() - 4);
if(remZip.toLowerCase().contains("-debian9-BB")){
String a = null;
ArrayList<String> moduli = new ArrayList<String>();
if(remZip.toLowerCase().contains("-debian9-bb")){
String[] curr = remZip.split("-");
String a = curr[0];
String b = curr[1];
try {
// inserimento modulo non arduino
DBC.fillModules(a, b, s1[i]);
} catch (SQLException | JSONException e) {
e.printStackTrace();
}
a = curr[0];
moduli.add(curr[1]);
}
if(remZip.toLowerCase().contains("_arduino1wifi")){
String[] curr = remZip.split("_");
String a = curr[0];
a = curr[0];
moduli.add("Arduino1");
}
if(a != null)
try {
// inserimento modulo arduino
DBC.fillModules(a, "Arduino1", s1[i]);
// inserimento moduli
for(String b : moduli)
DBC.fillModules(a, b, s1[i]);
} catch (SQLException | JSONException e) {
e.printStackTrace();
}
}
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment