Skip to content

Commit 945d9ef

Browse files
BananeweizenCalixte
authored andcommitted
Upgrade dom4j dependency
Use the current release of the Java 8 version of the library. Therefore some of the SuppressWarnings can be removed now.
1 parent 7172289 commit 945d9ef

File tree

9 files changed

+7
-16
lines changed

9 files changed

+7
-16
lines changed

net.sf.eclipsecs.core/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
44
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
55
<classpathentry kind="src" path="src"/>
6-
<classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
6+
<classpathentry exported="true" kind="lib" path="lib/dom4j-2.1.3.jar"/>
77
<classpathentry kind="output" path="target/classes"/>
88
</classpath>

net.sf.eclipsecs.core/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Bundle-SymbolicName: net.sf.eclipsecs.core;singleton:=true
55
Bundle-Version: 8.32.0.qualifier
66
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
77
Bundle-ClassPath: .,
8-
lib/dom4j-1.6.1.jar
8+
lib/dom4j-2.1.3.jar
99
Bundle-Activator: net.sf.eclipsecs.core.CheckstylePlugin
1010
Bundle-ActivationPolicy: lazy
1111
Bundle-Vendor: Eclipse Checkstyle Project

net.sf.eclipsecs.core/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ bin.includes = .,\
77
plugin.xml,\
88
schema/,\
99
core.properties,\
10-
lib/dom4j-1.6.1.jar
10+
lib/dom4j-2.1.3.jar
1111
source.. = src/
1212

-307 KB
Binary file not shown.
316 KB
Binary file not shown.

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/CheckConfigurationFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ private static void loadBuiltinConfigurations() {
397397
* the root element of the plugins central configuration file
398398
* @return the global check configurations configured therein
399399
*/
400-
@SuppressWarnings("unchecked")
401400
private static List<ICheckConfiguration> getGlobalCheckConfigurations(Element root) {
402401

403402
List<ICheckConfiguration> configs = new ArrayList<>();

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/ConfigurationReader.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ public void visit(final Element node) {
191191

192192
private static void addProperties(final Element moduleEl, final Module module) {
193193

194-
@SuppressWarnings("unchecked")
195194
final List<Element> propertyEls = moduleEl.elements(XMLTags.PROPERTY_TAG);
196195

197196
for (final Element propertyEl : propertyEls) {
@@ -231,7 +230,6 @@ private static void addProperties(final Element moduleEl, final Module module) {
231230

232231
private static void addMessages(final Element moduleEl, final Module module) {
233232

234-
@SuppressWarnings("unchecked")
235233
final List<Element> messageEls = moduleEl.elements(XMLTags.MESSAGE_TAG);
236234

237235
for (final Element messageEl : messageEls) {
@@ -245,7 +243,6 @@ private static void addMessages(final Element moduleEl, final Module module) {
245243

246244
private static void addMetadata(final Element moduleEl, final Module module) {
247245

248-
@SuppressWarnings("unchecked")
249246
final List<Element> metaEls = moduleEl.elements(XMLTags.METADATA_TAG);
250247

251248
for (final Element metaEl : metaEls) {

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/MetadataFactory.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ private static ResourceBundle getMetadataI18NBundle(String metadataFile,
399399
}
400400
}
401401

402-
@SuppressWarnings("unchecked")
403402
private static void parseMetadata(InputStream metadataStream, ResourceBundle metadataBundle)
404403
throws DocumentException, CheckstylePluginException {
405404

@@ -441,7 +440,6 @@ private static void parseMetadata(InputStream metadataStream, ResourceBundle met
441440
}
442441
}
443442

444-
@SuppressWarnings("unchecked")
445443
private static void processModules(Element groupElement, RuleGroupMetadata groupMetadata,
446444
ResourceBundle metadataBundle) throws CheckstylePluginException {
447445

@@ -484,7 +482,7 @@ private static void processModules(Element groupElement, RuleGroupMetadata group
484482
processProperties(moduleEl, module, metadataBundle);
485483

486484
// process alternative names
487-
for (Element altNameEl : (List<Element>) moduleEl.elements(XMLTags.ALTERNATIVE_NAME_TAG)) {
485+
for (Element altNameEl : moduleEl.elements(XMLTags.ALTERNATIVE_NAME_TAG)) {
488486

489487
String alternativeName = altNameEl.attributeValue(XMLTags.INTERNAL_NAME_TAG);
490488

@@ -494,14 +492,14 @@ private static void processModules(Element groupElement, RuleGroupMetadata group
494492
}
495493

496494
// process quickfixes
497-
for (Element quickfixEl : (List<Element>) moduleEl.elements(XMLTags.QUCKFIX_TAG)) {
495+
for (Element quickfixEl : moduleEl.elements(XMLTags.QUCKFIX_TAG)) {
498496

499497
String quickfixClassName = quickfixEl.attributeValue(XMLTags.CLASSNAME_TAG);
500498
module.addQuickfix(quickfixClassName);
501499
}
502500

503501
// process message keys
504-
for (Element quickfixEl : (List<Element>) moduleEl.elements(XMLTags.MESSAGEKEY_TAG)) {
502+
for (Element quickfixEl : moduleEl.elements(XMLTags.MESSAGEKEY_TAG)) {
505503

506504
String messageKey = quickfixEl.attributeValue(XMLTags.KEY_TAG);
507505
module.addMessageKey(messageKey);
@@ -568,7 +566,7 @@ private static void processProperties(Element moduleElement, RuleMetadata module
568566
}
569567

570568
// get explicit enumeration option values
571-
for (Element optionEl : (List<Element>) enumEl
569+
for (Element optionEl : enumEl
572570
.elements(XMLTags.PROPERTY_VALUE_OPTIONS_TAG)) {
573571
property.getPropertyEnumeration().add(optionEl.attributeValue(XMLTags.VALUE_TAG));
574572
}

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/projectconfig/ProjectConfigurationFactory.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ private static IProjectConfiguration getProjectConfiguration(InputStream in, IPr
202202
syncFormatter);
203203
}
204204

205-
@SuppressWarnings("unchecked")
206205
private static List<ICheckConfiguration> getLocalCheckConfigs(Element root, IProject project) {
207206

208207
List<ICheckConfiguration> configurations = new ArrayList<>();
@@ -255,7 +254,6 @@ private static List<ICheckConfiguration> getLocalCheckConfigs(Element root, IPro
255254
return configurations;
256255
}
257256

258-
@SuppressWarnings("unchecked")
259257
private static List<FileSet> getFileSets(Element root,
260258
List<ICheckConfiguration> localCheckConfigs) throws CheckstylePluginException {
261259

@@ -305,7 +303,6 @@ private static List<FileSet> getFileSets(Element root,
305303
return fileSets;
306304
}
307305

308-
@SuppressWarnings("unchecked")
309306
private static List<IFilter> getFilters(Element root) {
310307

311308
List<IFilter> filters = new ArrayList<>();

0 commit comments

Comments
 (0)