From 7a3aa70565e7db1b64f73583db00bbff9431c967 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Sun, 15 Jan 2012 00:34:48 +0100 Subject: [PATCH] Remove to work around DocBook bug It was determined (through painful trial and error) that after the upgrade to DocBook 5 and the gradle-docbook-reference plugin, that elements embedded within elements causes NullPointerExceptions during processing. This change eliminates these elements to work around the problem. This means a slight degradation in presentation for the affected areas of the reference documentation. After some research, it is not clear what other workarounds may be possible that leave the text actually emphasized. --- src/reference/docbook/aop.xml | 9 +++++--- src/reference/docbook/beans-customizing.xml | 2 +- .../docbook/beans-extension-points.xml | 13 ++++++------ src/reference/docbook/beans-scopes.xml | 18 ++++++++-------- src/reference/docbook/beans.xml | 2 +- src/reference/docbook/index.xml | 7 +++---- src/reference/docbook/jdbc.xml | 10 +++++---- src/reference/docbook/spring.tld.xml | 21 ++++++++++--------- src/reference/docbook/swf-sidebar.xml | 3 +-- src/reference/docbook/view.xml | 3 +-- 10 files changed, 46 insertions(+), 42 deletions(-) diff --git a/src/reference/docbook/aop.xml b/src/reference/docbook/aop.xml index b1da39ef5c5..a5e7101114d 100644 --- a/src/reference/docbook/aop.xml +++ b/src/reference/docbook/aop.xml @@ -2572,7 +2572,8 @@ public @interface Idempotent { the value of the proxy-target-class attribute of the <aop:config> element to true: - <aop:config proxy-target-class="true"> + + <aop:config proxy-target-class="true"> <!-- other beans defined here... --> </aop:config> @@ -2581,7 +2582,8 @@ public @interface Idempotent { <aop:aspectj-autoproxy> element to true: - <aop:aspectj-autoproxy proxy-target-class="true"/> + + <aop:aspectj-autoproxy proxy-target-class="true"/> Multiple <aop:config/> sections are @@ -3596,6 +3598,7 @@ http://www.springframework.org/schema/context <context:load-time-weaver/> element. Find below an example of doing just that: + <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" @@ -3607,7 +3610,7 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <context:load-time-weaver - weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/> + weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/> </beans> diff --git a/src/reference/docbook/beans-customizing.xml b/src/reference/docbook/beans-customizing.xml index bbf75350a2b..5578d5cb9a2 100644 --- a/src/reference/docbook/beans-customizing.xml +++ b/src/reference/docbook/beans-customizing.xml @@ -168,7 +168,7 @@ } } - <beans default-init-method="init"> + <beans default-init-method="init"> <bean id="blogService" class="com.foo.DefaultBlogService"> <property name="blogDao" ref="blogDao" /> diff --git a/src/reference/docbook/beans-extension-points.xml b/src/reference/docbook/beans-extension-points.xml index b5e19641274..3d6bf22f586 100644 --- a/src/reference/docbook/beans-extension-points.xml +++ b/src/reference/docbook/beans-extension-points.xml @@ -161,7 +161,7 @@ public class InstantiationTracingBeanPostProcessor implements BeanPostProcessor // simply return the instantiated bean as-is public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { - return bean; // we could potentially return any object reference here... + return bean; // we could potentially return any object reference here... } public Object postProcessAfterInitialization(Object bean, String beanName) @@ -351,10 +351,10 @@ org.springframework.scripting.groovy.GroovyMessenger@272961 <bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource"> - <property name="driverClassName" value="${jdbc.driverClassName}"/> - <property name="url" value="${jdbc.url}"/> - <property name="username" value="${jdbc.username}"/> - <property name="password" value="${jdbc.password}"/> + <property name="driverClassName" value="${jdbc.driverClassName}"/> + <property name="url" value="${jdbc.url}"/> + <property name="username" value="${jdbc.username}"/> + <property name="password" value="${jdbc.password}"/> </bean> The actual values come from another file in the standard Java @@ -472,7 +472,7 @@ dataSource.url=jdbc:mysql:mydb already non-null (presumably initialized by the constructors). In this example... - foo.fred.bob.sammy=123 + foo.fred.bob.sammy=123 ... the sammy property of the bob property of the fred property @@ -491,6 +491,7 @@ dataSource.url=jdbc:mysql:mydb configuration element: <context:property-override location="classpath:override.properties"/> + diff --git a/src/reference/docbook/beans-scopes.xml b/src/reference/docbook/beans-scopes.xml index 677e6e2bd91..c87fde5cb56 100644 --- a/src/reference/docbook/beans-scopes.xml +++ b/src/reference/docbook/beans-scopes.xml @@ -404,16 +404,16 @@ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> <!-- an HTTP Session-scoped bean exposed as a proxy --> - <bean id="userPreferences" class="com.foo.UserPreferences" scope="session"> + <bean id="userPreferences" class="com.foo.UserPreferences" scope="session"> <!-- instructs the container to proxy the surrounding bean --> - <aop:scoped-proxy/> + <aop:scoped-proxy/> </bean> - <!-- a singleton-scoped bean injected with a proxy to the above bean --> + <!-- a singleton-scoped bean injected with a proxy to the above bean --> <bean id="userService" class="com.foo.SimpleUserService"> - <!-- a reference to the proxied userPreferences bean --> + <!-- a reference to the proxied userPreferences bean --> <property name="userPreferences" ref="userPreferences"/> </bean> @@ -489,7 +489,7 @@ objects: <bean id="userPreferences" class="com.foo.UserPreferences" scope="session"> - <aop:scoped-proxy/> + <aop:scoped-proxy/> </bean> <bean id="userManager" class="com.foo.UserManager"> @@ -524,7 +524,7 @@ <!-- DefaultUserPreferences implements the UserPreferences interface --> <bean id="userPreferences" class="com.foo.DefaultUserPreferences" scope="session"> - <aop:scoped-proxy proxy-target-class="false"/> + <aop:scoped-proxy proxy-target-class="false"/> </bean> <bean id="userManager" class="com.foo.UserManager"> @@ -633,7 +633,7 @@ Scope threadScope = new SimpleThreadScope(); -beanFactory.registerScope("thread", threadScope); +beanFactory.registerScope("thread", threadScope); You then create bean definitions that adhere to the scoping rules of your custom Scope: @@ -657,10 +657,10 @@ beanFactory.registerScope("thread", threadScope <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"> <property name="scopes"> - <map> + <map> <entry key="thread"> <bean class="org.springframework.context.support.SimpleThreadScope"/> - </entry> + </entry> </map> </property> </bean> diff --git a/src/reference/docbook/beans.xml b/src/reference/docbook/beans.xml index 634d0b49321..046abb49851 100644 --- a/src/reference/docbook/beans.xml +++ b/src/reference/docbook/beans.xml @@ -944,7 +944,7 @@ List userList service.getUsernameList(); - + diff --git a/src/reference/docbook/index.xml b/src/reference/docbook/index.xml index dfefdc3810f..40d3c881f9d 100644 --- a/src/reference/docbook/index.xml +++ b/src/reference/docbook/index.xml @@ -232,7 +232,7 @@ This document is a reference guide to Spring Framework features. If you have any requests, comments, or questions on this document, please post them on the user mailing list or on the support forums at - . + . @@ -490,8 +490,6 @@ xmlns:xi="http://www.w3.org/2001/XInclude" /> - - Appendices @@ -511,8 +509,9 @@ - + diff --git a/src/reference/docbook/jdbc.xml b/src/reference/docbook/jdbc.xml index a81fd14ffa9..1f274f3a7af 100644 --- a/src/reference/docbook/jdbc.xml +++ b/src/reference/docbook/jdbc.xml @@ -2600,6 +2600,7 @@ public class TitlesAfterDateStoredProcedure extends StoredProcedure { of a DefaultLobHandler. You typically set this value through dependency injection. + + DefaultLobHandler @@ -2647,13 +2648,14 @@ clobReader.close(); + --> Now it's time to read the LOB data from the database. Again, you use a JdbcTemplate with the same instance variable lobHandler and a reference to a DefaultLobHandler. - + + retrieve the contents of the BLOB. - + -->
diff --git a/src/reference/docbook/spring.tld.xml b/src/reference/docbook/spring.tld.xml index 9e480fb9371..bb5a2fade29 100644 --- a/src/reference/docbook/spring.tld.xml +++ b/src/reference/docbook/spring.tld.xml @@ -55,7 +55,7 @@ Attributes - + @@ -119,6 +119,7 @@
+
The <literal>escapeBody</literal> tag @@ -128,7 +129,7 @@ Attributes - + @@ -185,7 +186,7 @@
Attributes - + @@ -242,7 +243,7 @@
Attributes - + @@ -284,7 +285,7 @@
Attributes - + @@ -453,7 +454,7 @@
Attributes - + @@ -496,7 +497,7 @@
Attributes - + @@ -662,7 +663,7 @@
Attributes - + @@ -751,7 +752,7 @@
Attributes - + @@ -868,7 +869,7 @@
Attributes - + diff --git a/src/reference/docbook/swf-sidebar.xml b/src/reference/docbook/swf-sidebar.xml index cdd9c6e8928..ecf7ced6262 100644 --- a/src/reference/docbook/swf-sidebar.xml +++ b/src/reference/docbook/swf-sidebar.xml @@ -1,8 +1,7 @@ + xmlns:xi="http://www.w3.org/2001/XInclude"> Spring Web Flow Spring Web Flow (SWF) aims to be the best solution for the management diff --git a/src/reference/docbook/view.xml b/src/reference/docbook/view.xml index 27af1dbc6c8..5ca53a2e02d 100644 --- a/src/reference/docbook/view.xml +++ b/src/reference/docbook/view.xml @@ -209,8 +209,7 @@ productList.url=/WEB-INF/jsp/productlist.jsp best practice), then you can bind the form to the named variable like so: - <form:form commandName="user"> + <form:form commandName="user"> <table> <tr> <td>First Name:</td>