AT&T 1712 and 1802 release code
[so.git] / common / src / main / java / org / openecomp / mso / client / policy / CommonObjectMapperProvider.java
@@ -1,51 +1,49 @@
-/*-\r
- * ============LICENSE_START=======================================================\r
- * ONAP - SO\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-package org.openecomp.mso.client.policy;\r
-\r
-import javax.ws.rs.ext.ContextResolver;\r
-\r
-import javax.ws.rs.ext.Provider;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude.Include;\r
-import com.fasterxml.jackson.databind.DeserializationFeature;\r
-import com.fasterxml.jackson.databind.MapperFeature;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.fasterxml.jackson.databind.SerializationFeature;\r
-\r
-@Provider\r
-public class CommonObjectMapperProvider implements ContextResolver<ObjectMapper> {\r
-\r
-       final ObjectMapper mapper;\r
-\r
-       public CommonObjectMapperProvider() {\r
-               \r
-               mapper = new ObjectMapper();\r
-               mapper.setSerializationInclusion(Include.NON_NULL);\r
-        mapper.enable(MapperFeature.USE_ANNOTATIONS);\r
-               mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);\r
-               mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);\r
-       }\r
-\r
-       @Override\r
-       public ObjectMapper getContext(Class<?> type) {\r
-               return mapper;\r
-       }\r
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import javax.ws.rs.ext.ContextResolver;
+
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+public class CommonObjectMapperProvider implements ContextResolver<ObjectMapper> {
+
+       final ObjectMapper mapper;
+
+       public CommonObjectMapperProvider() {
+               
+               mapper = new ObjectMapper();
+               mapper.setSerializationInclusion(Include.NON_NULL);
+        mapper.enable(MapperFeature.USE_ANNOTATIONS);
+               mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+               mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);
+               mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+       }
+
+       @Override
+       public ObjectMapper getContext(Class<?> type) {
+               return mapper;
+       }
 }
\ No newline at end of file