gdbtrace : remove occurrences of literals
authorJean-Christian Kouame <jean-christian.kouame@ericsson.com>
Mon, 16 Nov 2015 20:19:41 +0000 (15:19 -0500)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Mon, 16 Nov 2015 21:09:12 +0000 (16:09 -0500)
Change-Id: I337dc2efba794ec3a8b12adec65c76a6c2d1a1e4
Signed-off-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/60551
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
gdbtrace/org.eclipse.tracecompass.gdbtrace.core/src/org/eclipse/tracecompass/internal/gdbtrace/core/trace/DsfGdbAdaptor.java

index a29855f6f1b8ef183b15a7ac3ad3094e35bde8a8..307311b081aa6eb4bc790bdeb95d44f186ee8aed 100644 (file)
@@ -117,6 +117,10 @@ import org.eclipse.ui.ide.IDE;
 public class DsfGdbAdaptor {
 
     private static final Object SESSION_LOCK = new Object();
+    private static final String INTERRUPTION_EXCEPTION = "Interruption exception"; //$NON-NLS-1$
+    private static final String GDB_EXCEPTION = "GDB exception"; //$NON-NLS-1$
+    private static final String REQUEST_REJECTED_EXCEPTION = "Request rejected exception"; //$NON-NLS-1$
+    private static final String TIMEOUT = "Timeout"; //$NON-NLS-1$
 
     private GdbTrace fGdbTrace;
 
@@ -243,13 +247,13 @@ public class DsfGdbAdaptor {
                                     break;
                                 }
                             } catch (InterruptedException e) {
-                                GdbTraceCorePlugin.logError("Interruption exception", e); //$NON-NLS-1$
+                                GdbTraceCorePlugin.logError(INTERRUPTION_EXCEPTION, e);
                             } catch (ExecutionException e) {
-                                GdbTraceCorePlugin.logError("GDB exception", e); //$NON-NLS-1$
+                                GdbTraceCorePlugin.logError(GDB_EXCEPTION, e);
                             } catch (RejectedExecutionException e) {
-                                GdbTraceCorePlugin.logError("Request rejected exception", e); //$NON-NLS-1$
+                                GdbTraceCorePlugin.logError(REQUEST_REJECTED_EXCEPTION, e);
                             } catch (TimeoutException e) {
-                                GdbTraceCorePlugin.logError("Timeout", e); //$NON-NLS-1$
+                                GdbTraceCorePlugin.logError(TIMEOUT, e);
                             } finally {
                                 tracker.dispose();
                             }
@@ -475,13 +479,13 @@ public class DsfGdbAdaptor {
                 selectRecordQuery.get(); // blocks
             }
         } catch (InterruptedException e) {
-            GdbTraceCorePlugin.logError("Interruption exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(INTERRUPTION_EXCEPTION, e);
         } catch (ExecutionException e) {
-            GdbTraceCorePlugin.logError("GDB exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(GDB_EXCEPTION, e);
         } catch (RejectedExecutionException e) {
-            GdbTraceCorePlugin.logError("Request rejected exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(REQUEST_REJECTED_EXCEPTION, e);
         } catch (TimeoutException e) {
-            GdbTraceCorePlugin.logError("Timeout", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(TIMEOUT, e);
         } finally {
             tracker.dispose();
         }
@@ -539,13 +543,13 @@ public class DsfGdbAdaptor {
 
             frameNum = data.getNumberOfCollectedFrame();
         } catch (InterruptedException e) {
-            GdbTraceCorePlugin.logError("Interruption exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(INTERRUPTION_EXCEPTION, e);
         } catch (ExecutionException e) {
-            GdbTraceCorePlugin.logError("GDB exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(GDB_EXCEPTION, e);
         } catch (RejectedExecutionException e) {
-            GdbTraceCorePlugin.logError("Request rejected exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(REQUEST_REJECTED_EXCEPTION, e);
         } catch (TimeoutException e) {
-            GdbTraceCorePlugin.logError("Timeout", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(TIMEOUT, e);
         } finally {
             tracker.dispose();
         }
@@ -624,16 +628,16 @@ public class DsfGdbAdaptor {
             }
         } catch (InterruptedException e) {
             status = false;
-            GdbTraceCorePlugin.logError("Interruption exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(INTERRUPTION_EXCEPTION, e);
         } catch (ExecutionException e) {
             status = false;
-            GdbTraceCorePlugin.logError("GDB exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(GDB_EXCEPTION, e);
         } catch (RejectedExecutionException e) {
             status = false;
-            GdbTraceCorePlugin.logError("Request rejected exception", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(REQUEST_REJECTED_EXCEPTION, e);
         } catch (TimeoutException e) {
             status = false;
-            GdbTraceCorePlugin.logError("Timeout", e); //$NON-NLS-1$
+            GdbTraceCorePlugin.logError(TIMEOUT, e);
         } finally {
             tracker.dispose();
         }
@@ -725,13 +729,13 @@ public class DsfGdbAdaptor {
             return ev;
 
         } catch (InterruptedException e) {
-            return createExceptionEvent(rank, "Interruption exception"); //$NON-NLS-1$
+            return createExceptionEvent(rank, INTERRUPTION_EXCEPTION);
         } catch (java.util.concurrent.ExecutionException e) {
-            return createExceptionEvent(rank, "GDB exception"); //$NON-NLS-1$
+            return createExceptionEvent(rank, GDB_EXCEPTION);
         } catch (RejectedExecutionException e) {
-            return createExceptionEvent(rank, "Request rejected exception"); //$NON-NLS-1$
+            return createExceptionEvent(rank, REQUEST_REJECTED_EXCEPTION);
         } catch (TimeoutException e) {
-            return createExceptionEvent(rank, "Timeout"); //$NON-NLS-1$
+            return createExceptionEvent(rank, TIMEOUT);
         }
 
         finally {
This page took 0.026905 seconds and 5 git commands to generate.