Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1000944 // Recursion when printing in System.out handler :)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (67L/1K/3K).

!747

m {
  static Class __javax;
  
  p {
    print(__javax);
    set(__javax, "customSystemOut", new Appendable() {
      // only using this one
      public Appendable append(CharSequence s) {
        print("recursion alert :) " + s);
        return this;
      }

      public Appendable append(char c) { return this; }
      public Appendable append(CharSequence s, int start, int end) { return this; }
    });
    print("wups");
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1000944
Snippet name: Recursion when printing in System.out handler :)
Eternal ID of this version: #1000944/1
Text MD5: f75632b7c00b43209f33c3f2b5197543
Transpilation MD5: bc89c465703970fcc41cae58d1d96c9a
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-11 15:11:50
Source code size: 459 bytes / 20 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 446 / 493
Referenced in: [show references]