Thread: Sigex - Fix the note:stream overrides when compiling!

Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1 Sigex - Fix the note:stream overrides when compiling! 
    F*ck the rest join the best, WoR

    sigex's Avatar
    Join Date
    Mar 2008
    Age
    31
    Posts
    2,088
    Thanks given
    122
    Thanks received
    146
    Rep Power
    690
    Right when you compile you all ways get a warning

    Code:
    Note: stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Press any key to continue . . .Q
    and you will not be able to see this with out
    Code:
    -Xlint:deprecation
    in your compile line

    Code:
    Compiling Server.
    stream.java:234: warning: [deprecation] getBytes(int,int,byte[],int) in java.lan
    g.String has been deprecated
                    s.getBytes(0, s.length(), buffer, currentOffset);
                     ^
    1 warning
    Press any key to continue . . .
    so here is our problem

    Code:
    	public void writeString(java.lang.String s) {
    		s.getBytes(0, s.length(), buffer, currentOffset);s.length());
    		currentOffset += s.length();
    		buffer[currentOffset++] = 10;
    	}
    its not an error but just a warning, replace your writeString method with

    Code:
    	public void writeString(java.lang.String s) {
    		System.arraycopy(s.getBytes(),0,buffer,currentOffset,s.length());
    		currentOffset += s.length();
    		buffer[currentOffset++] = 10;
    	}
    credit for the System.arraycopy idea palindo76

    [Only registered and activated users can see links. ]



    This is not removing some words from your compiler its a warning its not ment to be there its of no use to you so fucking remove it..


    The wor has begun.

     

  2. #2  
    I'm kind of back :D

    Nick's Avatar
    Join Date
    Nov 2007
    Age
    25
    Posts
    803
    Thanks given
    0
    Thanks received
    5
    Rep Power
    384
    This helped and first post


     

  3. #3  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,784
    Discord
    View profile
    Rep Power
    5000
    i bet people thought thats what happens when you compile LOL, i found this out a while ago, i didnt delete the method though because i didnt know if it was used by anything so i just left it.

     

  4. #4  
    F*ck the rest join the best, WoR

    sigex's Avatar
    Join Date
    Mar 2008
    Age
    31
    Posts
    2,088
    Thanks given
    122
    Thanks received
    146
    Rep Power
    690
    Quote Originally Posted by Luke132 View Post
    i bet people thought thats what happens when you compile LOL, i found this out a while ago, i didnt delete the method though because i didnt know if it was used by anything so i just left it.
    nope i know it was not ment to be there from the start just couldn't work out why and didn't think of using "-Xlinteprecation" and seeing were in stream.java the warning was. just palindo76's RS2E does not have that problem when compiling so i hade a look at his writeString method and it uses the System.arraycopy method so i tryed it out and it fixed it


    The wor has begun.

     

  5. #5  
    Community Veteran

    Dust R I P's Avatar
    Join Date
    Jan 2008
    Posts
    2,556
    Thanks given
    183
    Thanks received
    198
    Rep Power
    561
    where to add?
     

  6. #6  
    Registered Member
    Firefight's Avatar
    Join Date
    Aug 2007
    Posts
    1,506
    Thanks given
    6
    Thanks received
    31
    Rep Power
    160
    Dust, learn to read...its in stream.java.
    Thanks Sigex, I didn't even know that was a warning. Thank you.
    Back for now...
     

  7. #7  
    Registered Member
    Shamon King's Avatar
    Join Date
    Aug 2007
    Posts
    3,336
    Thanks given
    90
    Thanks received
    228
    Rep Power
    1363
    so does this change anything in the server?
    anyways i use apache ant for my wL server and i never get that error anymore but i will add anyways good job
     

  8. #8  
    Banned

    Join Date
    Jul 2007
    Age
    28
    Posts
    1,438
    Thanks given
    43
    Thanks received
    21
    Rep Power
    0
    i like this nice job
     

  9. #9  
    Im Insane
    P Hatz Own's Avatar
    Join Date
    Oct 2006
    Posts
    222
    Thanks given
    1
    Thanks received
    0
    Rep Power
    29
    Awesome job.. Those two little lines of words would always annoy me =P


    Thanks.
     

  10. #10  
    Banned

    Join Date
    Jul 2007
    Age
    28
    Posts
    1,438
    Thanks given
    43
    Thanks received
    21
    Rep Power
    0
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Proof Video
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •