summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-24 09:28:39 (EST)
committer Winston Prakash2011-12-01 20:47:28 (EST)
commit4f6a15c2a510be47a0d732a3ab4355b42c919fb3 (patch)
tree7afd8014c5074fdd4c329f464bb6fb96dcd05edd
parent701a51c5dd2d996303d7d8ffcb0f5c0361d72820 (diff)
downloadorg.eclipse.hudson.core-4f6a15c2a510be47a0d732a3ab4355b42c919fb3.zip
org.eclipse.hudson.core-4f6a15c2a510be47a0d732a3ab4355b42c919fb3.tar.gz
org.eclipse.hudson.core-4f6a15c2a510be47a0d732a3ab4355b42c919fb3.tar.bz2
HUDSON-9064: avoid UnsupportedOperationException on JBoss5 by using url.openConnection() when there is no proxy configuration
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
-rw-r--r--hudson-core/src/main/java/hudson/ProxyConfiguration.java2
-rw-r--r--hudson-core/src/main/java/hudson/util/CascadingUtil.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/hudson-core/src/main/java/hudson/ProxyConfiguration.java b/hudson-core/src/main/java/hudson/ProxyConfiguration.java
index 83f1d4a..8f45d7a 100644
--- a/hudson-core/src/main/java/hudson/ProxyConfiguration.java
+++ b/hudson-core/src/main/java/hudson/ProxyConfiguration.java
@@ -129,7 +129,7 @@ public final class ProxyConfiguration implements Saveable {
if(proxyConfig == null){
- return url.openConnection(Proxy.NO_PROXY);
+ return url.openConnection();
}
if (proxyConfig.noProxyFor != null){
diff --git a/hudson-core/src/main/java/hudson/util/CascadingUtil.java b/hudson-core/src/main/java/hudson/util/CascadingUtil.java
index 85772e1..fc72a72 100644
--- a/hudson-core/src/main/java/hudson/util/CascadingUtil.java
+++ b/hudson-core/src/main/java/hudson/util/CascadingUtil.java
@@ -445,7 +445,7 @@ public class CascadingUtil {
if (null != cascadingChildrenNames) {
for (String childName : cascadingChildrenNames) {
Job childJob = (Job) Hudson.getInstance().getItem(childName);
- if (StringUtils.equals(job.getName(), childJob.getCascadingProjectName())) {
+ if (null != childJob && StringUtils.equals(job.getName(), childJob.getCascadingProjectName())) {
TriggerProjectProperty childProperty = CascadingUtil.getTriggerProjectProperty(childJob, key);
if (!childProperty.isOverridden()) {
setChildrenTrigger(childJob, descriptor, key, req, json);
@@ -485,7 +485,7 @@ public class CascadingUtil {
for (String childName : cascadingChildrenNames) {
AbstractProject childJob = (AbstractProject) Hudson.getInstance().getItem(childName);
//Check only direct children in order to avoid deep checking for properties overridden properties.
- if (StringUtils.equals(job.getName(), childJob.getCascadingProjectName())) {
+ if (null != childJob && StringUtils.equals(job.getName(), childJob.getCascadingProjectName())) {
CopyOnWriteListProjectProperty childProperty = getCopyOnWriteListProjectProperty(childJob, key);
//If child value is equal to parent - mark this value as unmodified.
if (!projectProperty.allowOverrideValue(childProperty.getValue(), pdProperties)) {