Skip to content

Commit

Permalink
Remove extraneous check of package name
Browse files Browse the repository at this point in the history
'c' is found using LegupUtils.getClasses("edu.rpi.legup.puzzle"), so it will start with it.
Fixes issue with STT rules not showing up.
  • Loading branch information
jadeandtea committed Oct 6, 2024
1 parent d3965f5 commit 53f29b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/edu/rpi/legup/model/Puzzle.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ private void registerRules() {
for (Class c : possRules) {

String classPackageName = c.getPackage().getName();
if (!classPackageName.startsWith("edu.rpi.legup.puzzle.")
|| !classPackageName.endsWith(".rules")) {
if (!classPackageName.contains(".rules")) {
continue;
}
System.out.println("possible rule: " + c.getName());
Expand Down

0 comments on commit 53f29b0

Please sign in to comment.