File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
sal-service/src/main/java/org/ow2/proactive/sal/service/service Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -64,22 +64,20 @@ private void validateNode(ClusterNodeDefinition node) {
6464 }
6565 }
6666
67- public static String stripQuotes (String value ) {
68- if (value == null || value .isEmpty ())
69- return value ;
70-
71- int start = 0 ;
72- int end = value .length ();
67+ private static String stripQuotes (String value ) {
68+ if (value == null )
69+ return null ;
70+ value = value .trim ();
7371
74- if ( value .charAt ( 0 ) == '"' || value .charAt ( 0 ) == '\'' ) {
75- start ++ ;
72+ while (! value .isEmpty () && ( value . startsWith ( " \" " ) || value .startsWith ( "'" )) ) {
73+ value = value . substring ( 1 ). trim () ;
7674 }
77- if ( value . length () > 1 &&
78- ( value .charAt ( value .length () - 1 ) == '"' || value .charAt ( value . length () - 1 ) == '\'' )) {
79- end -- ;
75+
76+ while (! value .isEmpty () && ( value .endsWith ( " \" " ) || value .endsWith ( "'" ) )) {
77+ value = value . substring ( 0 , value . length () - 1 ). trim () ;
8078 }
8179
82- return value . substring ( start , end ) ;
80+ return value ;
8381 }
8482
8583 public static String getContainerizationFlavor (String envVarsScript ) {
You can’t perform that action at this time.
0 commit comments