Skip to content

Commit

Permalink
fix(#355): fix all qulice suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jul 31, 2024
1 parent fa0ae78 commit e69fde8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@

import com.jcabi.log.Logger;
import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import java.nio.file.Path;
import java.util.stream.Stream;
import org.eolang.opeo.storage.FileStorage;
import org.eolang.opeo.storage.Storage;
import org.eolang.opeo.storage.XmirEntry;
import org.xembly.Directives;
import org.xembly.Xembler;

/**
* Decompiler that fixes XMIR generated by two plugins.
Expand Down Expand Up @@ -123,6 +120,4 @@ private XmirEntry format(final XmirEntry entry) {
private static XML format(final XML input) {
return new WithoutAliases(input).toXml();
}


}
15 changes: 15 additions & 0 deletions src/main/java/org/eolang/opeo/decompilation/WithoutAliases.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,29 @@
import org.xembly.Directives;
import org.xembly.Xembler;

/**
* XMIR representation without aliases.
* @since 0.4
*/
public final class WithoutAliases {

/**
* Xmir with aliases.
*/
private final XML original;

/**
* Constructor.
* @param original Xmir with aliases.
*/
public WithoutAliases(final XML original) {
this.original = original;
}

/**
* Xmir without aliases.
* @return Xmir without aliases.
*/
public XML toXml() {
return new XMLDocument(
new Xembler(
Expand Down

1 comment on commit e69fde8

@0pdd
Copy link

@0pdd 0pdd commented on e69fde8 Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 355-b9843d4a discovered in src/main/java/org/eolang/opeo/decompilation/FormattingDecompiler.java) and submitted as #358. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.