Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions eo-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,6 @@
ignore @to-do markers. See: https://github.com/objectionary/lints/issues/805
-->
<lint>comment-not-capitalized</lint>
<!--
@todo #4538:30min. Enable `object-has-data` lint.
The lint incorrectly flags all objects with bytes inside because they
don't have @base='Φ.org.eolang.bytes'. It was changed in
https://github.com/objectionary/eo/issues/4538. Right now we have just Φ.bytes
-->
<lint>object-has-data</lint>
</skipSourceLints>
<skipProgramLints>
<lint>inconsistent-args</lint>
Expand Down
14 changes: 1 addition & 13 deletions eo-runtime/src/main/java/org/eolang/PhDefault.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public class PhDefault implements Phi, Cloneable {
@SuppressWarnings("java:S5164")
private static final ThreadLocal<Integer> NESTING = ThreadLocal.withInitial(() -> 0);

/**
* From Java package name to forma.
*/
private static final Pattern TO_FORMA = Pattern.compile("(^|\\.)EO");

/**
* Data.
* @checkstyle VisibilityModifierCheck (2 lines)
Expand Down Expand Up @@ -210,14 +205,7 @@ public String forma() {
if (PhDefault.class.getSimpleName().equals(name)) {
form = "[]";
} else {
form = String.join(
".",
PhPackage.GLOBAL,
PhDefault.TO_FORMA.matcher(
this.getClass().getPackageName()
).replaceAll("$1"),
name
);
form = String.format("%s.%s", PhPackage.GLOBAL, name);
}
return form;
}
Expand Down
2 changes: 1 addition & 1 deletion eo-runtime/src/test/java/org/eolang/PhDefaultTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ void rendersFormaProperly() {
MatcherAssert.assertThat(
"forma of 'number' is the full name of the 'number' object",
new Data.ToPhi(42L).forma(),
Matchers.equalTo("Φ.org.eolang.number")
Matchers.equalTo("Φ.number")
);
}

Expand Down
Loading