Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/gradle/com.google.code.gson-gso…
Browse files Browse the repository at this point in the history
…n-2.9.1
  • Loading branch information
KengoTODA committed Aug 27, 2022
2 parents 480898b + fcc22d2 commit b89ebed
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
## Unreleased - 2022-??-??
### Fixed
- Bumped gson from 2.9.0 to 2.9.1 ([#2136](https://github.com/spotbugs/spotbugs/pull/2136))
- Fixed InvalidInputException in Eclipse while bug reporting ([#2134](https://github.com/spotbugs/spotbugs/issues/2134))

## 4.7.1 - 2022-06-26
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Expand Up @@ -2,7 +2,7 @@ plugins {
id "org.sonarqube" version "3.4.0.2513"
id "com.diffplug.spotless" version "6.5.2"
id "org.gradle.crypto.checksum" version "1.4.0"
id "com.github.spotbugs" version "5.0.8"
id "com.github.spotbugs" version "5.0.10"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}

Expand Down Expand Up @@ -37,7 +37,7 @@ allprojects {
mavenCentral()
}
dependencies {
implementation platform('org.junit:junit-bom:5.8.2')
implementation platform('org.junit:junit-bom:5.9.0')
}
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Expand Up @@ -6,5 +6,5 @@ repositories {
gradlePluginPortal()
}
dependencies {
implementation("com.diffplug.gradle:goomph:3.37.1")
implementation("com.diffplug.gradle:goomph:3.37.2")
}
2 changes: 1 addition & 1 deletion eclipsePlugin-junit/build.gradle
Expand Up @@ -12,7 +12,7 @@ tasks.named('compileJava', JavaCompile).configure {
dependencies {
implementation project(':eclipsePlugin')
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:4.6.1'
testImplementation 'org.mockito:mockito-core:4.7.0'
}

tasks.named('jacocoTestReport', JacocoReport).configure {
Expand Down
10 changes: 9 additions & 1 deletion eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
Expand Up @@ -437,7 +437,15 @@ private static IScanner initScanner(IType source, ISourceRange range) throws Jav
if (charContent == null) {
return null;
}
IScanner scanner = ToolFactory.createScanner(false, false, false, true);
IScanner scanner;
IJavaProject project = source.getJavaProject();
if (project != null) {
String sourceLevel = project.getOption(JavaCore.COMPILER_SOURCE, true);
String complianceLevel = project.getOption(JavaCore.COMPILER_COMPLIANCE, true);
scanner = ToolFactory.createScanner(false, false, true, sourceLevel, complianceLevel);
} else {
scanner = ToolFactory.createScanner(false, false, false, true);
}
scanner.setSource(charContent);
int offset = range.getOffset();
try {
Expand Down
Expand Up @@ -159,7 +159,7 @@ public Class<?> getDetectorClass() {
* comma separated list of bug pattern codes reported by the
* detector; empty if unknown
* @param requireJRE
* string describing JRE version required to run the the
* string describing JRE version required to run the
* detector: e.g., "1.5"
*/
public DetectorFactory(@Nonnull Plugin plugin, @Nonnull String className,
Expand Down
Expand Up @@ -98,7 +98,7 @@ public static boolean couldBeLambda(final MethodGen m) {
}

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

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

/**
* Checks if the the given method was user-generated. This takes into
* Checks if the given method was user-generated. This takes into
* account for instance lambda methods, that even though they are marked as
* "synthetic", they are user-generated, and therefore interesting to
* analysis.
Expand Down
Expand Up @@ -802,7 +802,7 @@ private void analyzeMethod(ClassContext classContext, Method method, Set<Method>
}

/**
* Determine whether or not the the given method is a getter method. I.e.,
* Determine whether or not the given method is a getter method. I.e.,
* if it just returns the value of an instance field.
*
* @param classContext
Expand Down

0 comments on commit b89ebed

Please sign in to comment.