Skip to content

Commit 7bad837

Browse files
committed
Removed system line separator change from eclipse-base config
- changeSystemLineSeparator no longer part of default configuration - Added annotations due to spotbugs version bump
1 parent b2b1dfd commit 7bad837

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

_ext/eclipse-base/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.2.1`).
44

55
## [Unreleased]
6+
### Changed
7+
* **BREAKING** `changeSystemLineSeparator` is no longer part of default configuration (see [#1049](https://github.com/diffplug/spotless/issues/1049)).
68

79
## [3.5.2] - 2021-10-23
810
### Fixed

_ext/eclipse-base/src/main/java/com/diffplug/spotless/extra/eclipse/base/SpotlessEclipseServiceConfig.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 DiffPlug
2+
* Copyright 2016-2021 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -114,7 +114,6 @@ default public void useTemporaryLocations() throws ServiceException {
114114
* system property.
115115
* Change the system default to the UNIX line separator as required
116116
* by Spotless.
117-
* @throws ServiceException in case service has already been configured
118117
*/
119118
default public void changeSystemLineSeparator() throws ServiceException {
120119
System.setProperty("line.separator", LINE_DELIMITER);
@@ -149,6 +148,5 @@ default public void applyDefault() throws ServiceException {
149148
disableDebugging();
150149
ignoreUnsupportedPreferences();
151150
useTemporaryLocations();
152-
changeSystemLineSeparator();
153151
}
154152
}

_ext/eclipse-base/src/main/java/com/diffplug/spotless/extra/eclipse/base/osgi/ResourceAccessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ private static BundleFile getBundlFile(Class<?> clazz) throws BundleException {
8585
}
8686
}
8787

88+
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "DCN_NULLPOINTER_EXCEPTION", justification = "Null-checking costs higher than benefit.")
8889
private static URI getBundleUri(Class<?> clazz) throws BundleException {
8990
try {
9091
URL objUrl = clazz.getProtectionDomain().getCodeSource().getLocation();
9192
return objUrl.toURI();
9293
} catch (NullPointerException e) {
93-
//No bunlde should be used for RT classes lookup. See also org.eclipse.core.runtime.PerformanceStats.
94+
//No bundle should be used for RT classes lookup. See also org.eclipse.core.runtime.PerformanceStats.
9495
throw new BundleException(String.format("No code source can be located for class '%s'. Class is probably not within a bundle, but part of the RT.", clazz.getName()), BundleException.READ_ERROR, e);
9596
} catch (SecurityException e) {
9697
throw new BundleException(String.format("Access to class '%s' is denied.", clazz.getName()), BundleException.READ_ERROR, e);

_ext/eclipse-base/src/main/java/com/diffplug/spotless/extra/eclipse/base/service/TemporaryLocation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ public URL getDataArea(String path) throws IOException {
128128
}
129129

130130
@Override
131+
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification = "At shutdown everything is just done on best-efforts basis")
131132
public void close() throws Exception {
132133
try {
133134
Path path = Path.of(location.toURI());

0 commit comments

Comments
 (0)