You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2017/03/24 07:29:05 UTC

[1/2] struts git commit: Adds missing headers with license

Repository: struts
Updated Branches:
  refs/heads/master 748da3f8c -> 3d3bee021


Adds missing headers with license


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/98467c27
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/98467c27
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/98467c27

Branch: refs/heads/master
Commit: 98467c2753a81b45fe174492e3b779860c47a4b0
Parents: 748da3f
Author: Lukasz Lenart <lu...@apache.org>
Authored: Thu Mar 23 15:27:55 2017 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Thu Mar 23 15:27:55 2017 +0100

----------------------------------------------------------------------
 .../ConversionPropertiesProcessor.java          | 15 ++++++++++++
 .../DefaultConversionPropertiesProcessor.java   | 24 +++++++++++++++-----
 2 files changed, 33 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/98467c27/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionPropertiesProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionPropertiesProcessor.java b/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionPropertiesProcessor.java
index 8d0bab8..6f5bd38 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionPropertiesProcessor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionPropertiesProcessor.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2002-2006,2009 The Apache Software Foundation.
+ *
+ * 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.
+ */
 package com.opensymphony.xwork2.conversion;
 
 /**

http://git-wip-us.apache.org/repos/asf/struts/blob/98467c27/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
index 762496f..f658967 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2002-2006,2009 The Apache Software Foundation.
+ *
+ * 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.
+ */
 package com.opensymphony.xwork2.conversion.impl;
 
 import com.opensymphony.xwork2.XWorkException;
@@ -16,9 +31,6 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
 
-/**
- * TODO lukaszlenart: add a comment
- */
 public class DefaultConversionPropertiesProcessor implements ConversionPropertiesProcessor {
 
     private static final Logger LOG = LogManager.getLogger(DefaultConversionPropertiesProcessor.class);
@@ -59,11 +71,11 @@ public class DefaultConversionPropertiesProcessor implements ConversionPropertie
                     String key = (String) entry.getKey();
 
                     try {
-                        TypeConverter _typeConverter = converterCreator.createTypeConverter((String) entry.getValue());
+                        TypeConverter typeConverter = converterCreator.createTypeConverter((String) entry.getValue());
                         if (LOG.isDebugEnabled()) {
-                            LOG.debug("\t{}:{} [treated as TypeConverter {}]", key, entry.getValue(), _typeConverter);
+                            LOG.debug("\t{}:{} [treated as TypeConverter {}]", key, entry.getValue(), typeConverter);
                         }
-                        converterHolder.addDefaultMapping(key, _typeConverter);
+                        converterHolder.addDefaultMapping(key, typeConverter);
                     } catch (Exception e) {
                         LOG.error("Conversion registration error", e);
                     }


[2/2] struts git commit: Process default conversion as required

Posted by lu...@apache.org.
Process default conversion as required


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/3d3bee02
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/3d3bee02
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/3d3bee02

Branch: refs/heads/master
Commit: 3d3bee02182e061c4aeb9f8d1ac1ccc5fc2c52bf
Parents: 98467c2
Author: Lukasz Lenart <lu...@apache.org>
Authored: Thu Mar 23 15:28:58 2017 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Thu Mar 23 15:28:58 2017 +0100

----------------------------------------------------------------------
 .../com/opensymphony/xwork2/conversion/impl/XWorkConverter.java   | 3 +--
 core/src/main/resources/struts-default-conversion.properties      | 1 +
 core/src/main/resources/xwork-default-conversion.properties       | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/3d3bee02/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
index bdf74c2..4257411 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
@@ -173,8 +173,7 @@ public class XWorkConverter extends DefaultTypeConverter {
 
     @Inject
     public void setConversionPropertiesProcessor(ConversionPropertiesProcessor propertiesProcessor) {
-        // note: this file is deprecated
-        propertiesProcessor.process("xwork-default-conversion.properties");
+        propertiesProcessor.processRequired("struts-default-conversion.properties");
         propertiesProcessor.process("xwork-conversion.properties");
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/3d3bee02/core/src/main/resources/struts-default-conversion.properties
----------------------------------------------------------------------
diff --git a/core/src/main/resources/struts-default-conversion.properties b/core/src/main/resources/struts-default-conversion.properties
new file mode 100644
index 0000000..43d0fe9
--- /dev/null
+++ b/core/src/main/resources/struts-default-conversion.properties
@@ -0,0 +1 @@
+java.io.File=org.apache.struts2.conversion.UploadedFileConverter

http://git-wip-us.apache.org/repos/asf/struts/blob/3d3bee02/core/src/main/resources/xwork-default-conversion.properties
----------------------------------------------------------------------
diff --git a/core/src/main/resources/xwork-default-conversion.properties b/core/src/main/resources/xwork-default-conversion.properties
deleted file mode 100644
index 43d0fe9..0000000
--- a/core/src/main/resources/xwork-default-conversion.properties
+++ /dev/null
@@ -1 +0,0 @@
-java.io.File=org.apache.struts2.conversion.UploadedFileConverter