diff options
author | Rob Stryker | 2015-02-05 14:59:46 +0000 |
---|---|---|
committer | Mike Rennie | 2015-02-05 14:59:46 +0000 |
commit | 608b1481160755e3e8dacceca5f7a1782195f6cc (patch) | |
tree | 4c326e9062f5104b65e82dee4aed09de9f4b67f0 | |
parent | eccd2fea8b3928a5989600740e26eccc71a8df49 (diff) | |
download | eclipse.platform-608b1481160755e3e8dacceca5f7a1782195f6cc.tar.gz eclipse.platform-608b1481160755e3e8dacceca5f7a1782195f6cc.tar.xz eclipse.platform-608b1481160755e3e8dacceca5f7a1782195f6cc.zip |
Bug 459188 - InternalAntRunner tries to set null user property
Change-Id: I54e85208199ab3a25503916feee3a397cf7cc12b
Signed-off-by: Rob Stryker <rob.stryker@jboss.com>
2 files changed, 10 insertions, 6 deletions
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java index c1921b951..4393c4ad8 100644 --- a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java +++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * IBM Corporation - derived implementation * Blake Meike (blakem@world.std.com)- patch for bug 31691 and bug 34488 + * Rob Stryker - Bug 459188 - InternalAntRunner tries to set null user property *******************************************************************************/ package org.eclipse.ant.internal.core.ant; @@ -264,7 +265,8 @@ public class InternalAntRunner { // do nothing } } - project.setUserProperty(entry.getKey(), value); + if (value != null) + project.setUserProperty(entry.getKey(), value); } // may have properties set (always have the Ant process ID) // using the Arguments and not the Properties page @@ -1493,4 +1495,4 @@ public class InternalAntRunner { public void setCustomClasspath(URL[] classpath) { customClasspath = classpath; } -}
\ No newline at end of file +} diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java index 22dd0635f..58da9de93 100644 --- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java +++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2015 IBM Corporation and others. * Portions Copyright 2000-2005 The Apache Software Foundation * All rights reserved. This program and the accompanying materials are made * available under the terms of the Apache Software License v2.0 which @@ -8,6 +8,7 @@ * * Contributors: * IBM Corporation - derived implementation + * Rob Stryker - Bug 459188 - InternalAntRunner tries to set null user property *******************************************************************************/ package org.eclipse.ant.internal.launching.remote; @@ -1016,7 +1017,8 @@ public class InternalAntRunner { setBuiltInProperties(project); if (userProperties != null) { for (Entry<String, String> entry : userProperties.entrySet()) { - project.setUserProperty(entry.getKey(), entry.getValue()); + if (entry.getValue() != null) + project.setUserProperty(entry.getKey(), entry.getValue()); } } } @@ -1219,4 +1221,4 @@ public class InternalAntRunner { InputHandlerSetter setter = new InputHandlerSetter(); setter.setInputHandler(project, inputHandlerClassname); } -}
\ No newline at end of file +} |