Skip to content

Commit df40274

Browse files
committed
Fix REXML compatibility issues for Ruby 3.4
- Update TomcatGeodeStore to properly create XML documents with REXML - Ruby 3.4's REXML no longer allows creating documents with just XML declaration - Remove trailing whitespace from XML fixture files (REXML Pretty formatter now strips these) - All 972 non-integration tests now passing
1 parent a3f1d4c commit df40274

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

lib/java_buildpack/container/tomcat/tomcat_geode_store.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ def cache_client_xml_path
129129
end
130130

131131
def create_cache_client_xml
132-
document = REXML::Document.new('<?xml version="1.0" encoding="UTF-8"?>')
132+
document = REXML::Document.new
133+
document << REXML::XMLDecl.new('1.0', 'UTF-8')
133134
add_client_cache document
134135
write_xml cache_client_xml_path, document
135136
end

spec/fixtures/container_no_tomcat_version_geode_store_context_after.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
~ See the License for the specific language governing permissions and
1616
~ limitations under the License.
17-
-->
17+
-->
1818
<Context allowLinking='true'>
1919
<Manager className='org.apache.geode.modules.session.catalina.TomcatDeltaSessionManager' enableLocalCache='true' regionAttributesId='PARTITION_REDUNDANT_HEAP_LRU'/>
2020
</Context>

spec/fixtures/container_tomcat_geode_store_context_after.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
~ See the License for the specific language governing permissions and
1616
~ limitations under the License.
17-
-->
17+
-->
1818
<Context allowLinking='true'>
1919
<Manager className='org.apache.geode.modules.session.catalina.Tomcat9DeltaSessionManager' enableLocalCache='true' regionAttributesId='PARTITION_REDUNDANT_HEAP_LRU'/>
2020
</Context>

spec/fixtures/container_tomcat_redis_store_context_after.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
~ See the License for the specific language governing permissions and
1616
~ limitations under the License.
17-
-->
17+
-->
1818
<Context allowLinking='true'>
1919
<Valve className='com.gopivotal.manager.SessionFlushValve'/>
2020
<Manager className='org.apache.catalina.session.PersistentManager'>

0 commit comments

Comments
 (0)