[Building Sakai] empty sakai.properties issues (2.9.0)

Aaron Zeckoski azeckoski at unicon.net
Tue Apr 9 08:58:48 PDT 2013


I added this into trunk but it is not part of 2.9:
https://jira.sakaiproject.org/browse/KNL-1032

Before adding that, it was pretty much impossible to know the
difference between the unset (not in the props file) and empty
(blah.key=) cases as they both resulted in null.

You can see the old behavior in the 2.9 version of
kernel-impl/src/main/java/org/sakaiproject/component/impl/BasicConfigurationService.java
- public String[] getStrings(String name);
The return value is set to null and in the case where no count
variable was defined or it was set to 0, you would get a null return
(since it would not make it inside the if statement).

-AZ


On Tue, Apr 9, 2013 at 11:36 AM, Thomas, Gregory J <gjthomas at iupui.edu> wrote:
> I'm not sure if anyone else has ran into this issue yet, but during the 2.9
> upgrade process IU is doing, I've found on a few of occasions that if you
> have property with nothing defined as a value, the code will treat it as a
> null instead of empty.
>
> For example, in the Site Info > Manage Access > Global Access section, we
> don't want the drop down to restrict roles with site.upd, we want all roles
> in the site to be available.
> (https://jira.sakaiproject.org/browse/SAK-18462)  Tried to use this in
> sakai.properties:
>
> siteinfo.prohibited_permission_for_joiner_role=
>
> Using the debugger in SiteAction with the getJoinerRoles function, we have
> this code:
>
> /** related to SAK-18462, this is a list of permissions that the joinable
> roles shouldn't have ***/
> String[] prohibitPermissionForJoinerRole =
> ServerConfigurationService.getStrings("siteinfo.prohibited_permission_for_joiner_role");
> if (prohibitPermissionForJoinerRole == null) {
> prohibitPermissionForJoinerRole = new String[]{"site.upd"};
> }
>
> The prohibitPermissionForJoinerRole variable claims it is a null, while
> really it should be empty and has been treated that way in the past.  I've
> ran across a few others for localized IU properties that are causing issues.
> I'm not sure if others have experienced this with empty properties and don't
> have an answer on what might be causing it (new version of tomcat, new
> version of java/jvm, etc etc).
>
> Thanks,
> Greg
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
> with a subject of "unsubscribe"



-- 
Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile


More information about the sakai-dev mailing list