-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextEnvelope should be reimplemented to be a simple envelope #1287
Comments
@paulodamaso/z please, pay attention to this issue |
@paulodamaso I think this should also be tackled soon, like with #1335. I just got bitten by it because |
@victornoel I see this "envleope" classes as default classes which have default methods for all instances; in this case, for example, it has the basic behavior for all The problem I see is "envelope" seems a bad name to me. An envelope is something that wrap another thing, like an envelope and a letter; in this case we are using the name in the opposite of the real meaning: envelope is a basic / default / common implementation of I'm still a bit unsure how we could solve these problems; seems that changing the code as you propose don't avoid the problem of getting wrong results on |
Lets move all system methods implementations ( |
That's my whole point when I propose to add a
@wladyan can you please edit your comment so that we know who you are talking to? :)
I think |
@0crat in |
@0crat assign me |
@victornoel 3 puzzles #1460, #1461, #1462 are still not solved. |
Job was finished in 8 hours, bonus for fast delivery is possible (see §36) |
@victornoel 2 puzzles #1460, #1461 are still not solved; solved: #1462. |
@victornoel the puzzle #1461 is still not solved; solved: #1460, #1462. |
@victornoel the puzzle #1560 is still not solved; solved: #1460, #1461, #1462. |
@victornoel all 4 puzzles are solved here: #1460, #1461, #1462, #1560. |
The current
TextEnvelope
implementation, like many of the other envelopes in cactoos, is plain wrong (see for example #1185 and other like that).If
TextEnvelope
takes aScalar
, it is NOT an envelope, it's an implementation ofText
based on aScalar
, and making it abstract is a mistake because 1) it promotes (bad) inheritance and 2) it can't be used directly.I propose to:
TextOf
the current implementation ofTextEnvelope
.TextEnvelope
just delegateasString()
,toString()
,equals()
andhashCode()
to a wrappedText
Text
that previously relied onTextEnvelope
behaviour via inheritance by relying onTextOf
via wrapping by passing it toTextEnvelope
as a superclass.See also #942 #1156 for related tickets
The text was updated successfully, but these errors were encountered: