11/*************
2- * cil
3- **************/
2+ * cil
3+ **************/
44
55/*
6- * This class is used to write the Dip information into the
7- * Bookkeeping Data Base
6+ * This class is used to write the Dip information into the
7+ * Bookkeeping Data Base
88 */
99package alice .dip ;
1010
@@ -23,9 +23,9 @@ public BKwriter() {
2323 // path = getClass().getClassLoader().getResource(".").getPath();
2424
2525 httpClient = HttpClient .newBuilder ()
26- .version (HttpClient .Version .HTTP_2 )
27- .connectTimeout (Duration .ofSeconds (10 ))
28- .build ();
26+ .version (HttpClient .Version .HTTP_2 )
27+ .connectTimeout (Duration .ofSeconds (10 ))
28+ .build ();
2929
3030 }
3131
@@ -35,7 +35,7 @@ public void X_InsertLHC(LhcInfoObj lhc) {
3535
3636 if (ok ) {
3737 AliDip2BK .log (3 , "BKwriter.InserFill" ,
38- "INSERT FILL ... BUT Fill No=" + lhc .fillNo + " is in BK ... trying to update record" );
38+ "INSERT FILL ... BUT Fill No=" + lhc .fillNo + " is in BK ... trying to update record" );
3939 XUpdateFill (lhc );
4040 return ;
4141 }
@@ -58,10 +58,10 @@ public void X_InsertLHC(LhcInfoObj lhc) {
5858 furl += "?token=" + AliDip2BK .BKP_TOKEN ;
5959 }
6060 HttpRequest request = HttpRequest .newBuilder ()
61- .uri (URI .create (furl ))
62- .header ("Content-Type" , "application/json" )
63- .method ("POST" , HttpRequest .BodyPublishers .ofString (mydata ))
64- .build ();
61+ .uri (URI .create (furl ))
62+ .header ("Content-Type" , "application/json" )
63+ .method ("POST" , HttpRequest .BodyPublishers .ofString (mydata ))
64+ .build ();
6565
6666 HttpResponse <String > response ;
6767
@@ -86,9 +86,9 @@ public boolean XTestFillNo(LhcInfoObj lhc) {
8686 }
8787
8888 HttpRequest request = HttpRequest .newBuilder ()
89- .uri (URI .create (furl ))
90- .GET () // default
91- .build ();
89+ .uri (URI .create (furl ))
90+ .GET () // default
91+ .build ();
9292
9393 HttpResponse <String > response ;
9494 try {
@@ -127,9 +127,9 @@ public boolean TestRunNo(int N) {
127127 }
128128
129129 HttpRequest request = HttpRequest .newBuilder ()
130- .uri (URI .create (furl ))
131- .GET () // default
132- .build ();
130+ .uri (URI .create (furl ))
131+ .GET () // default
132+ .build ();
133133
134134 HttpResponse <String > response ;
135135 try {
@@ -147,7 +147,7 @@ public boolean TestRunNo(int N) {
147147
148148 } else {
149149 AliDip2BK .log (3 , "BKwriter.TestRunNo" ,
150- " Reguest error =" + response .statusCode () + " Mesage=" + response .body ());
150+ " Reguest error =" + response .statusCode () + " Mesage=" + response .body ());
151151 return false ;
152152 }
153153 } catch (Exception e ) {
@@ -257,10 +257,10 @@ public void UpdateRun(RunInfoObj runObj) {
257257 }
258258
259259 HttpRequest request = HttpRequest .newBuilder ()
260- .uri (URI .create (furl ))
261- .header ("Content-Type" , "application/json" )
262- .method ("PATCH" , HttpRequest .BodyPublishers .ofString (mydata ))
263- .build ();
260+ .uri (URI .create (furl ))
261+ .header ("Content-Type" , "application/json" )
262+ .method ("PATCH" , HttpRequest .BodyPublishers .ofString (mydata ))
263+ .build ();
264264
265265 HttpResponse <String > response ;
266266 try {
@@ -270,7 +270,7 @@ public void UpdateRun(RunInfoObj runObj) {
270270 AliDip2BK .log (2 , "BKwriter.UpdateRun" , "Succesful Update for RUN=" + runObj .RunNo );
271271 } else {
272272 AliDip2BK .log (3 , "BKwriter.UpdateRun" ,
273- "ERROR for RUN=" + runObj .RunNo + " Code=" + +response .statusCode () + " Message=" + response .body ());
273+ "ERROR for RUN=" + runObj .RunNo + " Code=" + +response .statusCode () + " Message=" + response .body ());
274274 }
275275
276276 } catch (Exception e ) {
@@ -340,10 +340,10 @@ public void XUpdateFill(LhcInfoObj cfill) {
340340 }
341341
342342 HttpRequest request = HttpRequest .newBuilder ()
343- .uri (URI .create (furl ))
344- .header ("Content-Type" , "application/json" )
345- .method ("PATCH" , HttpRequest .BodyPublishers .ofString (mydata ))
346- .build ();
343+ .uri (URI .create (furl ))
344+ .header ("Content-Type" , "application/json" )
345+ .method ("PATCH" , HttpRequest .BodyPublishers .ofString (mydata ))
346+ .build ();
347347
348348 HttpResponse <String > response ;
349349 try {
@@ -353,7 +353,7 @@ public void XUpdateFill(LhcInfoObj cfill) {
353353 AliDip2BK .log (2 , "BKwriter.UpdateFILL" , "Succesful Update for FILL=" + cfill .fillNo );
354354 } else {
355355 AliDip2BK .log (3 , "BKwriter.UpdateFILL" ,
356- "ERROR for FILL=" + cfill .fillNo + " Code=" + +response .statusCode () + " Message=" + response .body ());
356+ "ERROR for FILL=" + cfill .fillNo + " Code=" + +response .statusCode () + " Message=" + response .body ());
357357 }
358358
359359 } catch (Exception e ) {
0 commit comments