-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert change to DiscriminatorFunction parameter types
- Loading branch information
1 parent
096f88d
commit befcca8
Showing
8 changed files
with
15 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
core/src/main/java/dev/morphia/mapping/discriminator/LowerSimpleNameDiscriminator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
package dev.morphia.mapping.discriminator; | ||
|
||
import dev.morphia.mapping.DiscriminatorFunction; | ||
import dev.morphia.mapping.Mapper; | ||
|
||
public class LowerSimpleNameDiscriminator extends DiscriminatorFunction { | ||
@Override | ||
public String compute(String type) { | ||
return Mapper.simpleName(type).toLowerCase(); | ||
public String compute(Class<?> type) { | ||
return type.getSimpleName().toLowerCase(); | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
core/src/main/java/dev/morphia/mapping/discriminator/SimpleNameDiscriminator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
package dev.morphia.mapping.discriminator; | ||
|
||
import dev.morphia.mapping.DiscriminatorFunction; | ||
import dev.morphia.mapping.Mapper; | ||
|
||
public class SimpleNameDiscriminator extends DiscriminatorFunction { | ||
@Override | ||
public String compute(String type) { | ||
return Mapper.simpleName(type); | ||
public String compute(Class<?> type) { | ||
return type.getSimpleName(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters