@@ -226,7 +226,6 @@ public Response createRepository(Repository jsonRepository) {
226
226
})
227
227
@ PermissionRequired (Permissions .Constants .SYSTEM_CONFIGURATION )
228
228
public Response updateRepository (Repository jsonRepository ) {
229
- System .out .println ("repo update" );
230
229
final Validator validator = super .getValidator ();
231
230
failOnValidationError (validator .validateProperty (jsonRepository , "identifier" ),
232
231
validator .validateProperty (jsonRepository , "url" )
@@ -235,30 +234,24 @@ public Response updateRepository(Repository jsonRepository) {
235
234
try (QueryManager qm = new QueryManager ()) {
236
235
Repository repository = qm .getObjectByUuid (Repository .class , jsonRepository .getUuid ());
237
236
if (repository != null ) {
238
- System .out .println ("repo update inner" );
239
237
final String url = StringUtils .trimToNull (jsonRepository .getUrl ());
240
238
String msg = "password" ;
241
239
try {
242
- System .out .println ("repo password decrypt" );
243
240
// The password is not passed to the front-end, so it should only be overwritten if it is not null or not set to default value coming from ui
244
241
final String updatedPassword = jsonRepository .getPassword ()!=null && !jsonRepository .getPassword ().equals (ENCRYPTED_PLACEHOLDER )
245
242
? DataEncryption .encryptAsString (jsonRepository .getPassword ())
246
243
: repository .getPassword ();
247
244
248
245
// The bearerToken is not passed to the front-end, so it should only be overwritten if it is not null or not set to default value coming from ui
249
- System .out .println ("repo bearer decrypt" );
250
246
msg = "bearerToken" ;
251
247
final String updatedBearerToken = jsonRepository .getBearerToken ()!=null && !jsonRepository .getBearerToken ().equals (ENCRYPTED_PLACEHOLDER )
252
248
? DataEncryption .encryptAsString (jsonRepository .getBearerToken ())
253
249
: repository .getBearerToken ();
254
250
255
- System .out .println ("repo update real" );
256
251
repository = qm .updateRepository (jsonRepository .getUuid (), repository .getIdentifier (), url ,
257
252
jsonRepository .isInternal (), jsonRepository .isAuthenticationRequired (), jsonRepository .getUsername (), updatedPassword , updatedBearerToken , jsonRepository .isEnabled ());
258
- System .out .println ("repo update done" );
259
253
return Response .ok (repository ).build ();
260
254
} catch (Exception e ) {
261
- e .printStackTrace (System .out );
262
255
return Response .status (Response .Status .INTERNAL_SERVER_ERROR ).entity ("The specified repository %s could not be encrypted." .formatted (msg )).build ();
263
256
}
264
257
} else {
0 commit comments