bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1793432 [5/5] - in /bval/branches/bv2.x: ./ bval-core/src/main/java/org/apache/bval/ bval-core/src/main/java/org/apache/bval/model/ bval-core/src/main/java/org/apache/bval/routines/ bval-core/src/main/java/org/apache/bval/util/ bval-core/s...
Date Tue, 02 May 2017 04:53:22 GMT
Modified: bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLFeaturesCapable.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLFeaturesCapable.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLFeaturesCapable.java
(original)
+++ bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLFeaturesCapable.java
Tue May  2 04:53:20 2017
@@ -22,6 +22,7 @@ import org.apache.bval.model.FeaturesCap
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Optional;
 
 /**
  * Description: <br/>
@@ -44,36 +45,31 @@ public class XMLFeaturesCapable implemen
     }
 
     public void putFeature(String key, Object value) {
-        XMLMetaFeature anno = findFeature(key);
-        if (features == null)
-            features = new ArrayList<XMLMetaFeature>();
-        if (anno == null) {
-            features.add(new XMLMetaFeature(key, value));
+        if (features == null) {
+            features = new ArrayList<>();
+        }
+        Optional<XMLMetaFeature> anno = findFeature(key);
+        if (anno.isPresent()) {
+            anno.get().setValue(value);
         } else {
-            anno.setValue(value);
+            features.add(new XMLMetaFeature(key, value));
         }
     }
 
     public void removeFeature(String key) {
-        XMLMetaFeature anno = findFeature(key);
-        if (anno != null) {
-            getFeatures().remove(anno);
+        Optional<XMLMetaFeature> anno = findFeature(key);
+        if (anno.isPresent()) {
+            getFeatures().remove(anno.get());
         }
     }
 
     public Object getFeature(String key) {
-        XMLMetaFeature anno = findFeature(key);
-        return anno == null ? null : anno.getValue();
+        return findFeature(key).map(XMLMetaFeature::getValue).orElse(null);
     }
 
-    private XMLMetaFeature findFeature(String key) {
-        if (features == null)
-            return null;
-        for (XMLMetaFeature anno : features) {
-            if (key.equals(anno.getKey()))
-                return anno;
-        }
-        return null;
+    private Optional<XMLMetaFeature> findFeature(String key) {
+        return features == null ? Optional.empty()
+            : features.stream().filter(anno -> key.equals(anno.getKey())).findFirst();
     }
 
     public List<XMLMetaValidatorReference> getValidators() {
@@ -85,8 +81,9 @@ public class XMLFeaturesCapable implemen
     }
 
     public void addValidator(String validatorId) {
-        if (validators == null)
-            validators = new ArrayList<XMLMetaValidatorReference>();
+        if (validators == null) {
+            validators = new ArrayList<>();
+        }
         validators.add(new XMLMetaValidatorReference(validatorId));
     }
 

Modified: bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBean.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBean.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBean.java (original)
+++ bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBean.java Tue
May  2 04:53:20 2017
@@ -22,6 +22,7 @@ import com.thoughtworks.xstream.annotati
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Optional;
 
 /**
  * Description: <br/>
@@ -75,41 +76,37 @@ public class XMLMetaBean extends XMLFeat
     }
 
     public void addProperty(XMLMetaProperty property) {
-        if (properties == null)
-            properties = new ArrayList<XMLMetaProperty>();
+        if (properties == null) {
+            properties = new ArrayList<>();
+        }
         properties.add(property);
     }
 
     public void putProperty(XMLMetaProperty property) {
         if (property.getName() != null) {
-            XMLMetaProperty prop = findProperty(property.getName());
-            if (prop != null) {
-                properties.remove(prop);
+            Optional<XMLMetaProperty> prop = findProperty(property.getName());
+            if (prop.isPresent()) {
+                properties.remove(prop.get());
             }
         }
         addProperty(property);
     }
 
     public XMLMetaProperty removeProperty(String name) {
-        XMLMetaProperty prop = findProperty(name);
-        if (prop != null) {
-            properties.remove(prop);
+        Optional<XMLMetaProperty> prop = findProperty(name);
+        if (prop.isPresent()) {
+            properties.remove(prop.get());
         }
-        return prop;
+        return prop.orElse(null);
     }
 
     public XMLMetaProperty getProperty(String name) {
-        return findProperty(name);
+        return findProperty(name).orElse(null);
     }
 
-    private XMLMetaProperty findProperty(String name) {
-        if (properties == null)
-            return null;
-        for (XMLMetaProperty prop : properties) {
-            if (name.equals(prop.getName()))
-                return prop;
-        }
-        return null;
+    private Optional<XMLMetaProperty> findProperty(String name) {
+        return properties == null ? Optional.empty()
+            : properties.stream().filter(prop -> name.equals(prop.getName())).findFirst();
     }
 
     public List<XMLMetaBeanReference> getBeanRefs() {
@@ -121,41 +118,39 @@ public class XMLMetaBean extends XMLFeat
     }
 
     public void addBeanRef(XMLMetaBeanReference beanRelation) {
-        if (beanRelations == null)
-            beanRelations = new ArrayList<XMLMetaBeanReference>();
+        if (beanRelations == null) {
+            beanRelations = new ArrayList<>();
+        }
         beanRelations.add(beanRelation);
     }
 
     public void putBeanRef(XMLMetaBeanReference beanRelation) {
         if (beanRelation.getName() != null) {
-            XMLMetaBeanReference relation = findBeanRef(beanRelation.getName());
-            if (relation != null) {
-                beanRelations.remove(relation);
+            Optional<XMLMetaBeanReference> relation = findBeanRef(beanRelation.getName());
+            if (relation.isPresent()) {
+                beanRelations.remove(relation.get());
             }
         }
         addBeanRef(beanRelation);
     }
 
     public XMLMetaBeanReference removeBeanRef(String name) {
-        XMLMetaBeanReference relation = findBeanRef(name);
-        if (relation != null) {
-            beanRelations.remove(relation);
+        Optional<XMLMetaBeanReference> relation = findBeanRef(name);
+        if (relation.isPresent()) {
+            beanRelations.remove(relation.get());
         }
-        return relation;
+        return relation.orElse(null);
     }
 
     public XMLMetaBeanReference getBeanRef(String name) {
-        return findBeanRef(name);
+        return findBeanRef(name).orElse(null);
     }
 
-    private XMLMetaBeanReference findBeanRef(String name) {
-        if (beanRelations == null)
-            return null;
-        for (XMLMetaBeanReference relation : beanRelations) {
-            if (name.equals(relation.getName()))
-                return relation;
+    private Optional<XMLMetaBeanReference> findBeanRef(String name) {
+        if (beanRelations == null) {
+            return Optional.empty();
         }
-        return null;
+        return beanRelations.stream().filter(relation -> name.equals(relation.getName())).findFirst();
     }
 
 }

Modified: bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanBuilder.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanBuilder.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanBuilder.java
(original)
+++ bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanBuilder.java
Tue May  2 04:53:20 2017
@@ -24,6 +24,7 @@ import org.apache.bval.model.MetaBean;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.stream.Stream;
 
 /**
  * Description: <br>
@@ -39,11 +40,11 @@ public class XMLMetaBeanBuilder extends
     }
 
     public XMLMetaBeanBuilder() {
-        setFactories(new MetaBeanFactory[] { new IntrospectorMetaBeanFactory(), new XMLMetaBeanFactory()
});
+        setFactories(new IntrospectorMetaBeanFactory(), new XMLMetaBeanFactory());
     }
 
     @Override
-    public void setFactories(MetaBeanFactory[] factories) {
+    public void setFactories(MetaBeanFactory... factories) {
         super.setFactories(factories);
         updateXmlFactory();
     }
@@ -114,13 +115,14 @@ public class XMLMetaBeanBuilder extends
     public Map<String, MetaBean> enrichCopies(Map<String, MetaBean> all, XMLMetaBeanInfos...
infosArray)
         throws Exception {
         assertXmlFactory();
-        final Map<String, MetaBean> copies = new HashMap<String, MetaBean>(all.size());
+        final Map<String, MetaBean> copies = new HashMap<>(all.size());
         boolean nothing = true;
         XMLMetaBeanFactory.XMLResult carrier = new XMLMetaBeanFactory.XMLResult();
         for (XMLMetaBeanInfos xmlMetaBeanInfos : infosArray) {
             carrier.xmlInfos = xmlMetaBeanInfos;
-            if (xmlMetaBeanInfos == null)
+            if (xmlMetaBeanInfos == null) {
                 continue;
+            }
             try {
                 for (XMLMetaBean xmlMeta : xmlMetaBeanInfos.getBeans()) {
                     nothing = false;
@@ -141,8 +143,9 @@ public class XMLMetaBeanBuilder extends
                 xmlFactory.handleLoadException(xmlMetaBeanInfos, e);
             }
         }
-        if (nothing)
+        if (nothing) {
             return all;
+        }
         for (Map.Entry<String, MetaBean> entry : all.entrySet()) {
             /*
              * alle unveraenderten werden AUCH KOPIERT (nur zwar nur, wegen
@@ -150,7 +153,7 @@ public class XMLMetaBeanBuilder extends
              */
             if (!copies.containsKey(entry.getKey())) {
                 if (entry.getValue().hasRelationships()) {
-                    copies.put(entry.getKey(), (MetaBean) entry.getValue().copy());
+                    copies.put(entry.getKey(), entry.getValue().copy());
                 } else { // no relationship: do not clone()
                     copies.put(entry.getKey(), entry.getValue());
                 }
@@ -164,13 +167,8 @@ public class XMLMetaBeanBuilder extends
     }
 
     private void updateXmlFactory() {
-        for (MetaBeanFactory each : getFactories()) {
-            if (each instanceof XMLMetaBeanFactory) { // use the first one!
-                xmlFactory = (XMLMetaBeanFactory) each;
-                return;
-            }
-        }
-        xmlFactory = null; // none
+        xmlFactory = Stream.of(getFactories()).filter(XMLMetaBeanFactory.class::isInstance)
+            .map(XMLMetaBeanFactory.class::cast).findFirst().orElse(null);
     }
 
     public XMLMetaBeanFactory getXmlFactory() {

Modified: bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java
(original)
+++ bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java
Tue May  2 04:53:20 2017
@@ -41,8 +41,7 @@ public class XMLMetaBeanFactory implemen
     private static final Logger logger = Logger.getLogger(XMLMetaBeanFactory.class.getName());
 
     // use LinkedHashMap to keep sequence of loaders
-    private final Map<XMLMetaBeanLoader, XMLMetaBeanInfos> resources =
-        new LinkedHashMap<XMLMetaBeanLoader, XMLMetaBeanInfos>();
+    private final Map<XMLMetaBeanLoader, XMLMetaBeanInfos> resources = new LinkedHashMap<>();
 
     private StandardValidation standardValidation = StandardValidation.getInstance();
 
@@ -72,8 +71,9 @@ public class XMLMetaBeanFactory implemen
 
     @Override
     public void buildMetaBean(final MetaBean metaBean) throws Exception {
-        if (metaBean.getId() == null)
+        if (metaBean.getId() == null) {
             return;
+        }
         visitXMLBeanMeta(metaBean.getId(), new Visitor() {
             @Override
             public void visit(XMLMetaBean xmlMeta, XMLMetaBeanInfos xmlInfos) throws Exception
{
@@ -112,9 +112,6 @@ public class XMLMetaBeanFactory implemen
         if (result.xmlMeta.getName() != null) {
             meta.setName(result.xmlMeta.getName());
         }
-        /*        if (meta.getBeanClass() == null && result.xmlMeta.getImpl() !=
null) {
-            meta.setBeanClass(findLocalClass(result.xmlMeta.getImpl()));
-        }*/
         result.xmlMeta.mergeFeaturesInto(meta);
         enrichValidations(meta, result.xmlMeta, result, false);
         if (result.xmlMeta.getProperties() != null) {
@@ -136,7 +133,7 @@ public class XMLMetaBeanFactory implemen
             // obsolete code? remove from here --->
             String[] func = prop.getFeature(JAVASCRIPT_VALIDATION_FUNCTIONS);
             List<String> jsValidators =
-                new ArrayList<String>(xmlProp.getValidators().size() + (func == null
? 0 : func.length));
+                new ArrayList<>(xmlProp.getValidators().size() + (func == null ? 0
: func.length));
             if (func != null && func.length > 0) {
                 jsValidators.addAll(Arrays.asList(func));
             } // <--- to here
@@ -158,9 +155,8 @@ public class XMLMetaBeanFactory implemen
             if (!jsValidators.isEmpty()) {
                 prop.putFeature(JAVASCRIPT_VALIDATION_FUNCTIONS, jsValidators.toArray(new
String[jsValidators.size()]));
             }
-            if (useStandard && standardValidation != null) {
-                if (!prop.hasValidation(standardValidation))
-                    prop.addValidation(standardValidation);
+            if (useStandard && standardValidation != null && !prop.hasValidation(standardValidation))
{
+                prop.addValidation(standardValidation);
             }
         } else if (addStandard && standardValidation != null && !prop.hasValidation(standardValidation))
{
             prop.addValidation(standardValidation);

Modified: bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java
(original)
+++ bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java
Tue May  2 04:53:20 2017
@@ -28,6 +28,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 /**
  * Description: root element of a xml-beanInfos document<br/>
@@ -89,23 +91,21 @@ public class XMLMetaBeanInfos {
     }
 
     public XMLMetaBean getBean(String id) {
-        if (beans == null)
+        if (beans == null) {
             return null;
-        if (beanLookup == null)
+        }
+        if (beanLookup == null) {
             initBeanLookup();
+        }
         return beanLookup.get(id);
     }
 
     private void initBeanLookup() {
-        final HashMap<String, XMLMetaBean> map = new HashMap<String, XMLMetaBean>(beans.size());
-        for (XMLMetaBean bean : beans) {
-            map.put(bean.getId(), bean);
-        }
-        beanLookup = new ConcurrentHashMap<String, XMLMetaBean>(map);
+        beanLookup = beans.stream().collect(Collectors.toConcurrentMap(XMLMetaBean::getId,
Function.identity()));
     }
 
     private void initValidationLookup() throws Exception {
-        final HashMap<String, XMLMetaValidator> map = new HashMap<String, XMLMetaValidator>(validators.size());
+        final Map<String, XMLMetaValidator> map = new HashMap<>(validators.size());
         for (XMLMetaValidator xv : validators) {
             if (xv.getJava() != null) {
                 Validation validation = (Validation) Reflection.toClass(xv.getJava()).newInstance();
@@ -113,26 +113,30 @@ public class XMLMetaBeanInfos {
                 map.put(xv.getId(), xv);
             }
         }
-        validationLookup = new ConcurrentHashMap<String, XMLMetaValidator>(map);
+        validationLookup = new ConcurrentHashMap<>(map);
     }
 
     public void addBean(XMLMetaBean bean) {
-        if (beans == null)
-            beans = new ArrayList<XMLMetaBean>();
+        if (beans == null) {
+            beans = new ArrayList<>();
+        }
         beans.add(bean);
     }
 
     public XMLMetaValidator getValidator(String id) throws Exception {
-        if (validators == null)
+        if (validators == null) {
             return null;
-        if (validationLookup == null)
+        }
+        if (validationLookup == null) {
             initValidationLookup();
+        }
         return validationLookup.get(id);
     }
 
     public void addValidator(XMLMetaValidator validator) {
-        if (validators == null)
-            validators = new ArrayList<XMLMetaValidator>();
+        if (validators == null) {
+            validators = new ArrayList<>();
+        }
         validators.add(validator);
     }
 }

Modified: bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanManager.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanManager.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanManager.java
(original)
+++ bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanManager.java
Tue May  2 04:53:20 2017
@@ -74,8 +74,7 @@ public class XMLMetaBeanManager extends
         Map<String, MetaBean> cached = findAll();
         try {
             Map<String, MetaBean> patched = ((XMLMetaBeanBuilder) builder).enrichCopies(cached,
infos);
-            for (Object entry : patched.values()) {
-                MetaBean meta = (MetaBean) entry;
+            for (MetaBean meta : patched.values()) {
                 computeRelationships(meta, patched);
             }
             return patched;
@@ -102,8 +101,7 @@ public class XMLMetaBeanManager extends
                     }
                 }
                 Map<String, MetaBean> map = cache.findAll();
-                for (Object oentry : map.values()) {
-                    MetaBean meta = (MetaBean) oentry;
+                for (MetaBean meta : map.values()) {
                     computeRelationships(meta, map);
                 }
                 complete = true;
@@ -120,7 +118,7 @@ public class XMLMetaBeanManager extends
 
     protected void computeRelationships(MetaBean beanInfo, Map<String, MetaBean> cached)
{
         for (MetaProperty prop : beanInfo.getProperties()) {
-            String beanRef = (String) prop.getFeature(REF_BEAN_ID);
+            String beanRef = prop.getFeature(REF_BEAN_ID);
             if (beanRef != null) {
                 prop.setMetaBean(cached.get(beanRef));
             }

Modified: bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanURLLoader.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanURLLoader.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanURLLoader.java
(original)
+++ bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanURLLoader.java
Tue May  2 04:53:20 2017
@@ -27,20 +27,18 @@ public class XMLMetaBeanURLLoader implem
     private final URL url;
 
     public XMLMetaBeanURLLoader(URL url) {
-        if (url == null)
+        if (url == null) {
             throw new NullPointerException("URL required");
+        }
         this.url = url;
     }
 
     @Override
     public XMLMetaBeanInfos load() throws IOException {
-        InputStream stream = url.openStream();
-        try {
+        try (InputStream stream = url.openStream()) {
             XMLMetaBeanInfos beanInfos = (XMLMetaBeanInfos) XMLMapper.getInstance().getXStream().fromXML(stream);
             beanInfos.setId(url.toExternalForm());
             return beanInfos;
-        } finally {
-            stream.close();
         }
     }
 }

Modified: bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaElement.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaElement.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaElement.java
(original)
+++ bval/branches/bv2.x/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaElement.java
Tue May  2 04:53:20 2017
@@ -130,7 +130,7 @@ public class XMLMetaElement extends XMLF
             prop.putFeature(HIDDEN, getHidden().booleanValue());
         }
         if (getMandatory() != null) {
-            prop.putFeature(MANDATORY, getMandatory().equals("true"));
+            prop.putFeature(MANDATORY, Boolean.valueOf(getMandatory()));
         }
         if (getMaxLength() != null) {
             prop.putFeature(MAX_LENGTH, getMaxLength());

Modified: bval/branches/bv2.x/bval-xstream/src/test/java/org/apache/bval/routines/StandardValidationTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/bval-xstream/src/test/java/org/apache/bval/routines/StandardValidationTest.java?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/bval-xstream/src/test/java/org/apache/bval/routines/StandardValidationTest.java
(original)
+++ bval/branches/bv2.x/bval-xstream/src/test/java/org/apache/bval/routines/StandardValidationTest.java
Tue May  2 04:53:20 2017
@@ -38,8 +38,8 @@ import org.junit.Test;
  */
 public class StandardValidationTest implements ValidationListener {
     private StandardValidation validation;
-    private BeanValidationContext<StandardValidationTest> context;
-    private List<String> reasons = new ArrayList<String>();
+    private BeanValidationContext<StandardValidationTest, Object, Boolean> context;
+    private List<String> reasons = new ArrayList<>();
     private MetaProperty metaProperty;
     private String stringValue;
     private Date dateValue;
@@ -48,7 +48,7 @@ public class StandardValidationTest impl
     @Before
     public void setUp() throws Exception {
         validation = new StandardValidation();
-        context = new BeanValidationContext<StandardValidationTest>(this);
+        context = new BeanValidationContext<>(this);
         metaProperty = new MetaProperty();
         context.setBean(this, null);
         context.setMetaProperty(metaProperty);

Modified: bval/branches/bv2.x/pom.xml
URL: http://svn.apache.org/viewvc/bval/branches/bv2.x/pom.xml?rev=1793432&r1=1793431&r2=1793432&view=diff
==============================================================================
--- bval/branches/bv2.x/pom.xml (original)
+++ bval/branches/bv2.x/pom.xml Tue May  2 04:53:20 2017
@@ -42,7 +42,9 @@
     <properties>
         <site.deploy.url>sftp://people.apache.org/home/${user.name}/public_html/bval/${project.version}/staging-site</site.deploy.url>
         <commons.weaver.version>1.3</commons.weaver.version>
-        <privilizer.policy>DYNAMIC</privilizer.policy>
+<!-- temporarily disable privilizer due to Java 8 incompatibility -->
+<!--         <privilizer.policy>DYNAMIC</privilizer.policy> -->
+        <privilizer.policy>NEVER</privilizer.policy>
     </properties>
 
     <inceptionYear>2010</inceptionYear>
@@ -257,10 +259,10 @@
                 <configuration>
                     <show>package</show>
                     <quiet>true</quiet>
-                    <source>1.6</source>
+                    <source>1.8</source>
                     <links>
-                        <link>http://docs.oracle.com/javase/6/docs/api</link>
-                        <link>http://docs.oracle.com/javaee/7/api</link>
+                        <link>http://docs.oracle.com/javase/8/docs/api</link>
+<!--                         <link>http://docs.oracle.com/javaee/7/api</link>
-->
                     </links>
                 </configuration>
                 <reportSets>
@@ -391,8 +393,8 @@
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-compiler-plugin</artifactId>
                     <configuration>
-                        <source>1.6</source>
-                        <target>1.6</target>
+                        <source>1.8</source>
+                        <target>1.8</target>
                         <encoding>${project.build.sourceEncoding}</encoding>
                     </configuration>
                 </plugin>
@@ -406,9 +408,9 @@
                             </manifest>
                             <manifestEntries>
                                 <Implementation-Build>${buildNumber}</Implementation-Build>
-                                <Specification-Title>JSR-349 Bean Validation</Specification-Title>
+                                <Specification-Title>JSR-380 Bean Validation</Specification-Title>
                                 <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
-                                <Specification-Version>1.1</Specification-Version>
+                                <Specification-Version>2.0</Specification-Version>
                             </manifestEntries>
                         </archive>
                     </configuration>
@@ -424,8 +426,8 @@
                         <verbose>false</verbose>
                         <maxmemory>512m</maxmemory>
                         <links>
-                            <link>http://docs.oracle.com/javase/6/docs/api</link>
-                            <link>http://docs.oracle.com/javaee/7/api</link>
+                            <link>http://docs.oracle.com/javase/8/docs/api</link>
+<!--                             <link>http://docs.oracle.com/javaee/7/api</link>
-->
                         </links>
                     </configuration>
                 </plugin>
@@ -459,7 +461,7 @@
                 <plugin>
                     <groupId>org.apache.felix</groupId>
                     <artifactId>maven-bundle-plugin</artifactId>
-                    <version>2.0.1</version>
+                    <version>3.3.0</version>
                     <extensions>true</extensions>
                     <configuration>
                         <instructions>
@@ -626,7 +628,7 @@
                                     <version>[2.2.1,)</version>
                                 </requireMavenVersion>
                                 <requireJavaVersion>
-                                    <version>[1.6,)</version>
+                                    <version>[1.8,)</version>
                                 </requireJavaVersion>
                             </rules>
                         </configuration>



Mime
View raw message