Skip to content

Commit

Permalink
chore: support jakarta web methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mebigfatguy committed Jan 18, 2025
1 parent cbbdfe3 commit 0626b79
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Dave Brosius


deadmethods.version = 0.9.2
deadmethods.version = 0.9.3
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.mebigfatguy.deadmethods</groupId>
<artifactId>deadmethods</artifactId>
<version>0.9.2</version>
<version>0.9.3</version>

<parent>
<groupId>org.sonatype.oss</groupId>
Expand Down Expand Up @@ -48,7 +48,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.7</version>
<version>9.7.1</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
Expand All @@ -59,17 +59,17 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.3.34</version>
<version>5.3.39</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.34</version>
<version>5.3.39</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.10.14</version>
<version>1.10.15</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
23 changes: 18 additions & 5 deletions src/main/java/com/mebigfatguy/deadmethods/DeadMethods.java
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,25 @@ private void removeSPIClasses(ClassRepository repo, Set<String> methods) throws
}

private void removeWebMethods(ClassRepository repo, Set<String> methods) throws IOException {
ClassInfo info = repo.getClassInfo("javax/servlet/http/HttpServlet");

for (MethodInfo methodInfo : info.getMethodInfo()) {
clearDerivedMethods(methods, info, methodInfo.toString());
try {
ClassInfo info = repo.getClassInfo("javax/servlet/http/HttpServlet");

for (MethodInfo methodInfo : info.getMethodInfo()) {
clearDerivedMethods(methods, info, methodInfo.toString());
}
logger.verbose("Standard javax Web methods removed");
} catch (IOException e) {
}

try {
ClassInfo info = repo.getClassInfo("jakarta/servlet/http/HttpServlet");

for (MethodInfo methodInfo : info.getMethodInfo()) {
clearDerivedMethods(methods, info, methodInfo.toString());
}
logger.verbose("Standard jakarta Web methods removed");
} catch (IOException e) {
}
logger.verbose("Standard Web methods removed");
}

private void clearDerivedMethods(Set<String> methods, ClassInfo info, String methodInfo) {
Expand Down

0 comments on commit 0626b79

Please sign in to comment.