Skip to content

Commit b89ebed

Browse files
authored
Merge branch 'master' into dependabot/gradle/com.google.code.gson-gson-2.9.1
2 parents 480898b + fcc22d2 commit b89ebed

File tree

8 files changed

+19
-10
lines changed

8 files changed

+19
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
77
## Unreleased - 2022-??-??
88
### Fixed
99
- Bumped gson from 2.9.0 to 2.9.1 ([#2136](https://github.com/spotbugs/spotbugs/pull/2136))
10+
- Fixed InvalidInputException in Eclipse while bug reporting ([#2134](https://github.com/spotbugs/spotbugs/issues/2134))
1011

1112
## 4.7.1 - 2022-06-26
1213
### Fixed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id "org.sonarqube" version "3.4.0.2513"
33
id "com.diffplug.spotless" version "6.5.2"
44
id "org.gradle.crypto.checksum" version "1.4.0"
5-
id "com.github.spotbugs" version "5.0.8"
5+
id "com.github.spotbugs" version "5.0.10"
66
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
77
}
88

@@ -37,7 +37,7 @@ allprojects {
3737
mavenCentral()
3838
}
3939
dependencies {
40-
implementation platform('org.junit:junit-bom:5.8.2')
40+
implementation platform('org.junit:junit-bom:5.9.0')
4141
}
4242
}
4343

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ repositories {
66
gradlePluginPortal()
77
}
88
dependencies {
9-
implementation("com.diffplug.gradle:goomph:3.37.1")
9+
implementation("com.diffplug.gradle:goomph:3.37.2")
1010
}

eclipsePlugin-junit/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tasks.named('compileJava', JavaCompile).configure {
1212
dependencies {
1313
implementation project(':eclipsePlugin')
1414
testImplementation 'junit:junit:4.13.2'
15-
testImplementation 'org.mockito:mockito-core:4.6.1'
15+
testImplementation 'org.mockito:mockito-core:4.7.0'
1616
}
1717

1818
tasks.named('jacocoTestReport', JacocoReport).configure {

eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,15 @@ private static IScanner initScanner(IType source, ISourceRange range) throws Jav
437437
if (charContent == null) {
438438
return null;
439439
}
440-
IScanner scanner = ToolFactory.createScanner(false, false, false, true);
440+
IScanner scanner;
441+
IJavaProject project = source.getJavaProject();
442+
if (project != null) {
443+
String sourceLevel = project.getOption(JavaCore.COMPILER_SOURCE, true);
444+
String complianceLevel = project.getOption(JavaCore.COMPILER_COMPLIANCE, true);
445+
scanner = ToolFactory.createScanner(false, false, true, sourceLevel, complianceLevel);
446+
} else {
447+
scanner = ToolFactory.createScanner(false, false, false, true);
448+
}
441449
scanner.setSource(charContent);
442450
int offset = range.getOffset();
443451
try {

spotbugs/src/main/java/edu/umd/cs/findbugs/DetectorFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public Class<?> getDetectorClass() {
159159
* comma separated list of bug pattern codes reported by the
160160
* detector; empty if unknown
161161
* @param requireJRE
162-
* string describing JRE version required to run the the
162+
* string describing JRE version required to run the
163163
* detector: e.g., "1.5"
164164
*/
165165
public DetectorFactory(@Nonnull Plugin plugin, @Nonnull String className,

spotbugs/src/main/java/edu/umd/cs/findbugs/bytecode/MemberUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static boolean couldBeLambda(final MethodGen m) {
9898
}
9999

100100
/**
101-
* Checks if the the given method was user-generated. This takes into
101+
* Checks if the given method was user-generated. This takes into
102102
* account for instance lambda methods, that even though they are marked as
103103
* "synthetic", they are user-generated, and therefore interesting to
104104
* analysis.
@@ -111,7 +111,7 @@ public static boolean isUserGenerated(final FieldOrMethod m) {
111111
}
112112

113113
/**
114-
* Checks if the the given method was user-generated. This takes into
114+
* Checks if the given method was user-generated. This takes into
115115
* account for instance lambda methods, that even though they are marked as
116116
* "synthetic", they are user-generated, and therefore interesting to
117117
* analysis.
@@ -124,7 +124,7 @@ public static boolean isUserGenerated(final ClassMember m) {
124124
}
125125

126126
/**
127-
* Checks if the the given method was user-generated. This takes into
127+
* Checks if the given method was user-generated. This takes into
128128
* account for instance lambda methods, that even though they are marked as
129129
* "synthetic", they are user-generated, and therefore interesting to
130130
* analysis.

spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindInconsistentSync2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ private void analyzeMethod(ClassContext classContext, Method method, Set<Method>
802802
}
803803

804804
/**
805-
* Determine whether or not the the given method is a getter method. I.e.,
805+
* Determine whether or not the given method is a getter method. I.e.,
806806
* if it just returns the value of an instance field.
807807
*
808808
* @param classContext

0 commit comments

Comments
 (0)