CMMN, DB : bug fix for exception 59/23859/1
authorgreatim <jaewon81.lim@samsung.com>
Fri, 4 Jul 2014 05:05:05 +0000 (14:05 +0900)
committergreatim <jaewon81.lim@samsung.com>
Fri, 4 Jul 2014 05:05:05 +0000 (14:05 +0900)
when receive ack message of control message, receive buffer is too small.
when newly added feature page is displayed, corresposding DB table is not exist so SQLExcpetion is occurred

Change-Id: I92b3aef82c763deb5f99b26618873fde359268fb
Signed-off-by: greatim <jaewon81.lim@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/database/SqlConnectionManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/communicator/Communicator30.java
package/changelog
package/pkginfo.manifest

index 8ed6ff0..63eac5a 100644 (file)
@@ -6,6 +6,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
+import java.sql.SQLSyntaxErrorException;
 import java.sql.SQLWarning;
 import java.sql.Statement;
 import java.util.ArrayList;
@@ -493,6 +494,10 @@ public class SqlConnectionManager {
                                        }
                                }
                        }
+               } catch (SQLSyntaxErrorException e) {
+                       String message = e.getMessage();
+                       String state = e.getSQLState();
+                       DA_LOG.warning(message + " : state(" + state + ")");
                } catch (SQLException e) {
                        e.printStackTrace();
                } finally {
index 09d3693..42ae018 100755 (executable)
@@ -37,6 +37,7 @@ import static org.tizen.dynamicanalyzer.constant.CommonConstants.LONG_SIZE;
 
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
@@ -539,7 +540,7 @@ public class Communicator30 extends BaseCommunicator {
                                        rt.setApplyTime(ToolbarArea.getInstance().getTime());
                                        AnalyzerManager.getProject().addConfigHistory(rt);
                                } else {
-                                       rt.setApplyTime(0);     // set time of configuration to zero
+                                       rt.setApplyTime(0); // set time of configuration to zero
                                }
 
                                GlobalInformation.setCurrentConfiguration(rt);
@@ -627,8 +628,15 @@ public class Communicator30 extends BaseCommunicator {
                        byte[] cbuf = new byte[DACommunicator.READ_BUFFER_SIZE * 2];
                        blocked = true;
                        DA_LOG.debug("blocked");
-                       readsize = controlSock.getInputStream().read(cbuf);
+                       ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                       do {
+                               readsize = controlSock.getInputStream().read(cbuf);
+                               baos.write(cbuf, 0, readsize);
+                       } while (readsize == DACommunicator.READ_BUFFER_SIZE * 2);
                        blocked = false;
+                       
+                       readsize = baos.size();
+                       cbuf = baos.toByteArray();
                        if (PRINT_CONTROL_LOG_TOFILE && printWriter != null) {
                                printWriter.printf("recv :");
                                for (int k = 0; k < readsize; k++)
index 39f83bf..90ba6b2 100644 (file)
@@ -1,3 +1,7 @@
+* 2.1.39
+- bug fix for exception when specific application is selected in app combo
+- bug fix for exception when new feature is on and feature page is newly displayed
+== Jaewon Lim <jaewon81.lim@samsung.com> 2014-07-04
 * 2.1.38
 - Refactoring: OpenGL, Network, Chart
 - Bug fix: failure in leak detection of range analysis
index 047b975..2a4e36f 100644 (file)
@@ -1,5 +1,5 @@
 Source:dynamic-analyzer
-Version:2.1.38
+Version:2.1.39
 Maintainer:Jaewon Lim <jaewon81.lim@samsung.com>, Juyoung Kim <j0.kim@samsung.com>
 
 Package:dynamic-analyzer-product