src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java
Print this page
rev 472 : 8036030: Update JAX-WS RI integration to latest version
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -37,10 +37,11 @@
import java.util.Collection;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
+import java.util.logging.Level;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
/**
@@ -198,10 +199,11 @@
return ((s1 == null) ? ((s2 == null) ? 0 : -1) : ((s2 == null) ? 1 : s1.compareTo(s2)));
}
}
public static class Collections {
+ private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyUtils.Collections.class);
/**
* TODO javadocs
*
* @param initialBase the combination base that will be present in each combination. May be {@code null} or empty.
* @param options options that should be combined. May be {@code null} or empty.
@@ -243,11 +245,14 @@
return null;
}
} else if (optionSize == 1) {
base.addAll(option);
} else {
- optionProcessingQueue.offer(option);
+ boolean entered = optionProcessingQueue.offer(option);
+ if (!entered) {
+ throw LOGGER.logException(new RuntimePolicyUtilsException(LocalizationMessages.WSP_0096_ERROR_WHILE_COMBINE(option)), false, Level.WARNING);
+ }
finalCombinationsSize *= optionSize;
}
}
// creating final combinations