chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Florent Guillaume (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CMIS-483) URLEncoder for getObjectByPath with folder name like CARÈ CARLA
Date Tue, 06 Dec 2011 14:27:40 GMT

     [ https://issues.apache.org/jira/browse/CMIS-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Florent Guillaume updated CMIS-483:
-----------------------------------

    Description: 
What do you think about this patch?

{noformat}
### Eclipse Workspace Patch 1.0
#P chemistry-opencmis-client-bindings
Index: src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
===================================================================
--- src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(revisione 1124118)
+++ src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(copia locale)
@@ -68,6 +68,7 @@
     private final Cache templateCache;
     private final Cache repositoryLinkCache;
 
+    private final String encoding;
     /**
      * Constructor.
      */
@@ -87,6 +88,8 @@
             objCount = CACHE_SIZE_OBJECTS;
         }
 
+        encoding = (String) session.get(SessionParameter.LOCALE_VARIANT, "UTF-8");
+        
         linkCache = new CacheImpl("Link Cache");
         linkCache.initialize(new String[] {
                 MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "="
+ repCount, // repository
@@ -257,7 +260,7 @@
                     String paramValue = UrlBuilder.normalizeParameter(parameters.get(param.toString()));
                     if (paramValue != null) {
                         try {
-                            result.append(URLEncoder.encode(paramValue, "UTF-8"));
+                            result.append(URLEncoder.encode(paramValue, encoding));
                         } catch (UnsupportedEncodingException e) {
                             result.append(paramValue);
                         }
{noformat}

  was:
What do you think about this patch?

### Eclipse Workspace Patch 1.0
#P chemistry-opencmis-client-bindings
Index: src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
===================================================================
--- src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(revisione 1124118)
+++ src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(copia locale)
@@ -68,6 +68,7 @@
     private final Cache templateCache;
     private final Cache repositoryLinkCache;
 
+    private final String encoding;
     /**
      * Constructor.
      */
@@ -87,6 +88,8 @@
             objCount = CACHE_SIZE_OBJECTS;
         }
 
+        encoding = (String) session.get(SessionParameter.LOCALE_VARIANT, "UTF-8");
+        
         linkCache = new CacheImpl("Link Cache");
         linkCache.initialize(new String[] {
                 MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "="
+ repCount, // repository
@@ -257,7 +260,7 @@
                     String paramValue = UrlBuilder.normalizeParameter(parameters.get(param.toString()));
                     if (paramValue != null) {
                         try {
-                            result.append(URLEncoder.encode(paramValue, "UTF-8"));
+                            result.append(URLEncoder.encode(paramValue, encoding));
                         } catch (UnsupportedEncodingException e) {
                             result.append(paramValue);
                         }

    
> URLEncoder for getObjectByPath with folder name like CARÈ CARLA
> ---------------------------------------------------------------
>
>                 Key: CMIS-483
>                 URL: https://issues.apache.org/jira/browse/CMIS-483
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client-bindings
>    Affects Versions: OpenCMIS 0.5.0
>            Reporter: Marco Spasiano
>              Labels: patch
>
> What do you think about this patch?
> {noformat}
> ### Eclipse Workspace Patch 1.0
> #P chemistry-opencmis-client-bindings
> Index: src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
> ===================================================================
> --- src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(revisione 1124118)
> +++ src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(copia locale)
> @@ -68,6 +68,7 @@
>      private final Cache templateCache;
>      private final Cache repositoryLinkCache;
>  
> +    private final String encoding;
>      /**
>       * Constructor.
>       */
> @@ -87,6 +88,8 @@
>              objCount = CACHE_SIZE_OBJECTS;
>          }
>  
> +        encoding = (String) session.get(SessionParameter.LOCALE_VARIANT, "UTF-8");
> +        
>          linkCache = new CacheImpl("Link Cache");
>          linkCache.initialize(new String[] {
>                  MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY
+ "=" + repCount, // repository
> @@ -257,7 +260,7 @@
>                      String paramValue = UrlBuilder.normalizeParameter(parameters.get(param.toString()));
>                      if (paramValue != null) {
>                          try {
> -                            result.append(URLEncoder.encode(paramValue, "UTF-8"));
> +                            result.append(URLEncoder.encode(paramValue, encoding));
>                          } catch (UnsupportedEncodingException e) {
>                              result.append(paramValue);
>                          }
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message