Skip to content
Permalink
Browse files

Fix JENKINS-12936

  • Loading branch information...
gboissinot committed Feb 29, 2012
1 parent c7d8ee1 commit 9fa3650160483ba454cae1ff4404795c455a3f80
@@ -2,6 +2,7 @@

import hudson.Util;
import org.jenkinsci.lib.envinject.EnvInjectException;
import org.jenkinsci.plugins.envinject.service.PropertiesGetter;
import org.jenkinsci.plugins.envinject.service.PropertiesLoader;
import org.kohsuke.stapler.DataBoundConstructor;

@@ -33,15 +34,21 @@ public String getPropertiesFilePath() {
return propertiesFilePath;
}

@SuppressWarnings("unused")
@SuppressWarnings({"unused", "deprecation"})
public String getPropertiesContent() {

if (propertiesContentMap != null && propertiesContentMap.size() != 0) {
PropertiesGetter propertiesGetter = new PropertiesGetter();
return propertiesGetter.getPropertiesContent(propertiesContentMap);
}

return propertiesContent;
}

@SuppressWarnings("deprecation")
public Map<String, String> getPropertiesContentMap() {

if (propertiesContentMap != null) {
if (propertiesContentMap != null && propertiesContentMap.size() != 0) {
return propertiesContentMap;
}

@@ -9,6 +9,11 @@
public class PropertiesGetter implements Serializable {

public String getPropertiesContent(Map<String, String> propertiesContent) {

if (propertiesContent == null) {
return null;
}

StringBuffer sb = new StringBuffer();
for (Map.Entry<String, String> entry : propertiesContent.entrySet()) {
sb.append(entry.getKey() + "=" + entry.getValue() + "\n");

0 comments on commit 9fa3650

Please sign in to comment.
You can’t perform that action at this time.