Author: desruisseaux
Date: Thu Jun 26 07:51:56 2014
New Revision: 1605686
URL: http://svn.apache.org/r1605686
Log:
Merged the NullPointerException fix.
Modified:
sis/branches/JDK7/ (props changed)
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
Merged /sis/branches/JDK8:r1605594-1605685
Modified:
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java?rev=1605686&r1=1605685&r2=1605686&view=diff
==============================================================================
---
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
[UTF-8] (original)
+++
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
[UTF-8] Thu Jun 26 07:51:56 2014
@@ -316,7 +316,11 @@ public class DefaultMaintenanceInformati
@Deprecated
@XmlElement(name = "updateScope")
public Collection<ScopeCode> getUpdateScopes() {
- return new LegacyProperties<ScopeCode,Scope>(getMaintenanceScopes()) {
+ final Collection<Scope> scopes = getMaintenanceScopes();
+ if (scopes == null) {
+ return null; // May happen at marshalling time.
+ }
+ return new LegacyProperties<ScopeCode,Scope>(scopes) {
@Override protected Scope wrap(final ScopeCode code) {
return new DefaultScope(code);
}
@@ -368,7 +372,11 @@ public class DefaultMaintenanceInformati
@Deprecated
@XmlElement(name = "updateScopeDescription")
public Collection<ScopeDescription> getUpdateScopeDescriptions() {
- return new
LegacyProperties<ScopeDescription,Scope>(getMaintenanceScopes()) {
+ final Collection<Scope> scopes = getMaintenanceScopes();
+ if (scopes == null) {
+ return null; // May happen at marshalling time.
+ }
+ return new LegacyProperties<ScopeDescription,Scope>(scopes) {
private boolean warningOccurred;
@Override protected Scope wrap(final ScopeDescription code) {