~thomas-voss/jenkins.pbuilder.plugin/trunk

« back to all changes in this revision

Viewing changes to src/main/java/com/ubuntu/builder/HelloWorldBuilder.java

  • Committer: Thomas Voß
  • Date: 2012-04-27 14:01:03 UTC
  • mfrom: (12.1.1 jenkins.pbuilder.plugin)
  • Revision ID: thomas.voss@canonical.com-20120427140103-vnp9amry3tq3hn92
Merged in fix for null pointer deref.

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        String psb = pbuilderSetupBranch;
144
144
        String mb = mainBranch;
145
145
        String pb = packagingBranch;
146
 
        String tb = targetBranch;
 
146
    String tb = targetBranch;
147
147
        
148
148
        if(psb.startsWith("$") && envVars != null) {
149
149
            psb = envVars.get(psb.replace("$", ""));
157
157
            pb = envVars.get(pb.replace("$", ""));
158
158
        }          
159
159
 
160
 
        if(tb.startsWith("$") && envVars != null) {
 
160
        if((tb != null) && tb.startsWith("$") && envVars != null) {
161
161
            tb = envVars.get(tb.replace("$", ""));
162
 
        }          
 
162
        } else
 
163
    if(tb == null) {
 
164
        tb = "";
 
165
    }
163
166
          
164
167
        listener.getLogger().println("PBuilder config branch: " + psb);    
165
168
        listener.getLogger().println("Main branch: " + mb);
166
169
        listener.getLogger().println("Packaging branch: " + pb);
167
 
        listener.getLogger().println("Target branch: " + pb);
 
170
        listener.getLogger().println("Target branch: " + tb);
168
171
        listener.getLogger().println("Work directory: " + workDirectory);
169
172
        listener.getLogger().println("Results directory: " + resultsDirectory);
170
173