diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2019-06-19 14:25:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-19 14:25:37 +0000 |
commit | c97312e92297e3d0fb07b835d95fa8090b7deaa3 (patch) | |
tree | 290150912909215559409bd2dcd17796cdd9ed49 | |
parent | 8b0db1349f7367f94586d237f2fa2a500e9beec7 (diff) | |
parent | 1cdad9b78056103a4ca1d1b71d996489787ed702 (diff) |
Merge "Change getCanonicalName to getName in models"
21 files changed, 34 insertions, 27 deletions
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java b/models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java index 708bfddfb..cd8b08bfa 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 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. @@ -50,7 +51,7 @@ public class PfValidationMessage { Assertions.argumentNotNull(message, "message may not be null"); this.observedKey = observedKey; - this.observedClass = observedClass.getCanonicalName(); + this.observedClass = observedClass.getName(); this.validationResult = validationResult; this.message = message; } diff --git a/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java b/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java index 120ddbff9..64612238b 100644 --- a/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java +++ b/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java @@ -290,13 +290,13 @@ public class ValidatedTest { // check first item PfValidationMessage msg = it.next(); - assertEquals(MyValid.class.getName().replace('$', '.'), msg.getObservedClass()); + assertEquals(MyValid.class.getName(), msg.getObservedClass()); assertEquals(MY_TO_STRING, msg.getObservedKey().toString()); assertTrue(msg.getMessage().contains("index.0 invalid-wrong value")); // check null value msg = it.next(); - assertEquals(MyValid.class.getName().replace('$', '.'), msg.getObservedClass()); + assertEquals(MyValid.class.getName(), msg.getObservedClass()); assertEquals(MY_TO_STRING, msg.getObservedKey().toString()); assertTrue(msg.getMessage().contains("index.2 invalid-wrong value")); @@ -327,13 +327,13 @@ public class ValidatedTest { // check first item PfValidationMessage msg = it.next(); - assertEquals(MyConcept.class.getName().replace('$', '.'), msg.getObservedClass()); + assertEquals(MyConcept.class.getName(), msg.getObservedClass()); assertEquals(MY_TO_STRING, msg.getObservedKey().toString()); assertTrue(msg.getMessage().contains("index.0 invalid-wrong value")); // check null value msg = it.next(); - assertEquals(MyConcept.class.getName().replace('$', '.'), msg.getObservedClass()); + assertEquals(MyConcept.class.getName(), msg.getObservedClass()); assertEquals(MY_TO_STRING, msg.getObservedKey().toString()); assertTrue(msg.getMessage().contains("index.2 invalid-wrong value")); diff --git a/models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java b/models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java index ef0d8d609..d536e406f 100644 --- a/models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java +++ b/models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java @@ -88,7 +88,7 @@ public class ValidationTest { assertEquals(PfValidationResult.ValidationResult.INVALID, result.getMessageList().get(3).getValidationResult()); assertEquals(SOME_MESSAGE, result.getMessageList().get(3).getMessage()); - assertEquals(PfConceptKey.class.getCanonicalName(), result.getMessageList().get(3).getObservedClass()); + assertEquals(PfConceptKey.class.getName(), result.getMessageList().get(3).getObservedClass()); assertEquals(PfConceptKey.getNullKey(), result.getMessageList().get(3).getObservedKey()); } } diff --git a/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java b/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java index c44d05fe2..b5739a610 100644 --- a/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java +++ b/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 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. @@ -330,7 +331,7 @@ public class DefaultPfDao implements PfDao { t.copyTo(clonedT); return clonedT; } catch (final Exception e) { - LOGGER.warn("Could not clone object of class \"" + someClass.getCanonicalName() + "\"", e); + LOGGER.warn("Could not clone object of class \"" + someClass.getName() + "\"", e); return null; } } else { @@ -355,7 +356,7 @@ public class DefaultPfDao implements PfDao { t.copyTo(clonedT); return clonedT; } catch (final Exception e) { - LOGGER.warn("Could not clone object of class \"" + someClass.getCanonicalName() + "\"", e); + LOGGER.warn("Could not clone object of class \"" + someClass.getName() + "\"", e); return null; } } else { diff --git a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java index e7a505d1f..70505aa2d 100644 --- a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java +++ b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java @@ -93,7 +93,7 @@ public class EntityTest { public void testEntityTestAllOpsJpa() throws PfModelException { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("DaoTest"); Properties jdbcProperties = new Properties(); @@ -119,7 +119,7 @@ public class EntityTest { @Test public void testEntityTestBadVals() throws PfModelException { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("DaoTest"); pfDao = new PfDaoFactory().createPfDao(daoParameters); diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java index 61d9ed45c..0b61991f1 100644 --- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java +++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java @@ -124,7 +124,7 @@ public class ControlLoopPolicyTest { } public void dump(Object obj) { - logger.debug("Dumping ", obj.getClass().getCanonicalName()); + logger.debug("Dumping ", obj.getClass().getName()); logger.debug("{}", obj); } } diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java index d90f5418d..3d4cb37dd 100644 --- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java +++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java @@ -154,7 +154,7 @@ public class ControlLoopGuardTest { } public void dump(Object obj) { - logger.debug("Dumping {}", obj.getClass().getCanonicalName()); + logger.debug("Dumping {}", obj.getClass().getName()); logger.debug("{}", obj); } } diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroup.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroup.java index 1e77c099d..36d5cc18e 100644 --- a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroup.java +++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroup.java @@ -285,7 +285,7 @@ public class JpaPdpGroup extends PfConcept implements PfAuthorative<PdpGroup> { return 0; } if (getClass() != otherConcept.getClass()) { - return this.getClass().getCanonicalName().compareTo(otherConcept.getClass().getCanonicalName()); + return this.getClass().getName().compareTo(otherConcept.getClass().getName()); } final JpaPdpGroup other = (JpaPdpGroup) otherConcept; diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java index 5cbbaaa8f..824c0a4fe 100644 --- a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java @@ -76,7 +76,7 @@ public class PdpProviderTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProviderFactory.java b/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProviderFactory.java index 86551b341..4ba70fbe1 100644 --- a/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProviderFactory.java +++ b/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProviderFactory.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 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. @@ -59,7 +60,7 @@ public class PolicyModelsProviderFactory { // It is, now check if it is a PolicyModelsProvider if (!PolicyModelsProvider.class.isAssignableFrom(implementationClass)) { - String errorMessage = "the class \"" + implementationClass.getCanonicalName() + String errorMessage = "the class \"" + implementationClass.getName() + "\" is not an implementation of the \"PolicyModelsProvider\" interface"; LOGGER.warn(errorMessage); throw new PfModelException(Response.Status.BAD_REQUEST, errorMessage); diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProviderParameters.java b/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProviderParameters.java index 65aa72eb2..fa4d66348 100644 --- a/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProviderParameters.java +++ b/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProviderParameters.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 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. @@ -51,7 +52,7 @@ import org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl; @Data public class PolicyModelsProviderParameters implements ParameterGroup { - private static final String DEFAULT_IMPLEMENTATION = DatabasePolicyModelsProviderImpl.class.getCanonicalName(); + private static final String DEFAULT_IMPLEMENTATION = DatabasePolicyModelsProviderImpl.class.getName(); private String name; private String implementation = DEFAULT_IMPLEMENTATION; diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java b/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java index af1a6ca3b..565eb9afc 100644 --- a/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java +++ b/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 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. @@ -94,7 +95,7 @@ public class DatabasePolicyModelsProviderImpl implements PolicyModelsProvider { // Parameters for the DAO final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit(parameters.getPersistenceUnit()); // Decode the password using Base64 diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderTest.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderTest.java index e05c1067e..e30cea940 100644 --- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderTest.java +++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderTest.java @@ -55,7 +55,7 @@ public class DummyPolicyModelsProviderTest { @Test public void testProvider() throws Exception { PolicyModelsProviderParameters parameters = new PolicyModelsProviderParameters(); - parameters.setImplementation(DummyPolicyModelsProviderImpl.class.getCanonicalName()); + parameters.setImplementation(DummyPolicyModelsProviderImpl.class.getName()); parameters.setDatabaseUrl("jdbc:dummy"); parameters.setPersistenceUnit("dummy"); @@ -74,7 +74,7 @@ public class DummyPolicyModelsProviderTest { @Test public void testProviderMethods() throws Exception { PolicyModelsProviderParameters parameters = new PolicyModelsProviderParameters(); - parameters.setImplementation(DummyPolicyModelsProviderImpl.class.getCanonicalName()); + parameters.setImplementation(DummyPolicyModelsProviderImpl.class.getName()); parameters.setDatabaseUrl("jdbc:dummy"); parameters.setPersistenceUnit("dummy"); diff --git a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/DmaapSimCommandLineArguments.java b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/DmaapSimCommandLineArguments.java index c0db8a7ed..cf559f712 100644 --- a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/DmaapSimCommandLineArguments.java +++ b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/DmaapSimCommandLineArguments.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 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. @@ -124,7 +125,7 @@ public class DmaapSimCommandLineArguments { } if (commandLine.hasOption('h')) { - return help(Main.class.getCanonicalName()); + return help(Main.class.getName()); } if (commandLine.hasOption('v')) { diff --git a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorCommandLineArguments.java b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorCommandLineArguments.java index fb517e221..50d2bd2ad 100644 --- a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorCommandLineArguments.java +++ b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorCommandLineArguments.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 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. @@ -139,7 +140,7 @@ public class PdpSimulatorCommandLineArguments { } if (commandLine.hasOption('h')) { - return help(Main.class.getCanonicalName()); + return help(Main.class.getName()); } if (commandLine.hasOption('v')) { diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java index 6c87d7681..8b9003be0 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java @@ -73,7 +73,7 @@ public class AuthorativeToscaProviderPolicyTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java index c2b387952..8bed1e4a1 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java @@ -88,7 +88,7 @@ public class AuthorativeToscaProviderPolicyTypeTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java index 59605ed5b..cc510b74f 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java @@ -70,7 +70,7 @@ public class LegacyProvider4LegacyGuardTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java index dfbba4497..4dd998ee9 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java @@ -65,7 +65,7 @@ public class LegacyProvider4LegacyOperationalTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java index 5e7e8fd5c..a3e3ba518 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java @@ -67,7 +67,7 @@ public class SimpleToscaProviderTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java index aa4fc952c..20ba756e9 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java @@ -205,7 +205,7 @@ public class MonitoringPolicyTypeSerializationTest { firstDataTypeFirstProperty.getDescription()); assertTrue(firstDataTypeFirstProperty.getConstraints().size() == 1); assertEquals("org.onap.policy.models.tosca.simple.concepts.JpaToscaConstraintValidValues", - firstDataTypeFirstProperty.getConstraints().iterator().next().getClass().getCanonicalName()); + firstDataTypeFirstProperty.getConstraints().iterator().next().getClass().getName()); assertTrue(((JpaToscaConstraintValidValues) (firstDataTypeFirstProperty.getConstraints().iterator().next())) .getValidValues().size() == 2); |