Skip to content

Use static final Patterns in XMLElement#1875

Merged
merks merged 2 commits intoeclipse-pde:masterfrom
merks:issue-1873
Jul 15, 2025
Merged

Use static final Patterns in XMLElement#1875
merks merged 2 commits intoeclipse-pde:masterfrom
merks:issue-1873

Conversation

@merks
Copy link
Copy Markdown
Contributor

@merks merks commented Jul 15, 2025

  • In o.e.pde.internal.genericeditor.target.extension.model.xml.XMLElement there are a number (5) of string constants that are compiled for each XMLELement instance that is created that could all instead be compiled once and recorded as static final variables.
  • Also the patterns used to computer isStartElement and isEndElement don't properly handle line breaks, i.e., don't handle \r, and are better compiled using Pattern.DOT_ALL.

#1873

- In o.e.pde.internal.genericeditor.target.extension.model.xml.XMLElement
there are a number (5) of string constants that are compiled for each
XMLELement instance that is created that could all instead be compiled
once and recorded as static final variables.
- Also the patterns used to computer isStartElement and isEndElement
don't properly handle line breaks, i.e., don't handle \r, and are better
compiled using Pattern.DOT_ALL.

eclipse-pde#1873
Copy link
Copy Markdown
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@eclipse-pde-bot
Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

ui/org.eclipse.pde.genericeditor.extension/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 11c5711c60e128efa733a45615863576243b2703 Mon Sep 17 00:00:00 2001
From: Eclipse PDE Bot <pde-bot@eclipse.org>
Date: Tue, 15 Jul 2025 10:38:55 +0000
Subject: [PATCH] Version bump(s) for 4.37 stream


diff --git a/ui/org.eclipse.pde.genericeditor.extension/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.genericeditor.extension/META-INF/MANIFEST.MF
index 26891db600..cb86c60b2d 100644
--- a/ui/org.eclipse.pde.genericeditor.extension/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.genericeditor.extension/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.genericeditor.extension;singleton:=true
-Bundle-Version: 1.3.100.qualifier
+Bundle-Version: 1.3.200.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.jface.text,
-- 
2.50.1

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Copy Markdown

Test Results

   765 files  ±0     765 suites  ±0   51m 30s ⏱️ - 2m 48s
 3 611 tests ±0   3 557 ✅ +1   54 💤 ±0  0 ❌  - 1 
10 834 runs  ±0  10 671 ✅ +1  163 💤 ±0  0 ❌  - 1 

Results for commit 5fce056. ± Comparison against base commit aa6f1da.

@merks merks merged commit b5a1589 into eclipse-pde:master Jul 15, 2025
19 checks passed
@merks merks deleted the issue-1873 branch July 15, 2025 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants