Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

java.lang.NullPointerException-model.Item.iiIiiiiiIiiI(rk:290)

Featured Replies

org.osbot.rs07.api.model.Item.iiIiiiiiIiiI(rk:290)
java.util.stream.MatchOps$1MatchSink.accept(Unknown Source)
java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)

Anyone know what code in osbot use java.util.stream.AbstractPipeline.copyIntoWithCancel?

1 hour ago, Pegasus said:

org.osbot.rs07.api.model.Item.iiIiiiiiIiiI(rk:290)
java.util.stream.MatchOps$1MatchSink.accept(Unknown Source)
java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)

Anyone know what code in osbot use java.util.stream.AbstractPipeline.copyIntoWithCancel?

Might help to see the code or know what you're trying to do with this

  • Author
6 minutes ago, Team Cape said:

Might help to see the code or know what you're trying to do with this

thanks, I found out that it is caused  by a filter variable.

 public Filter<Item> jewFilter = (jew) -> {
       return jew.nameContains(this.getAllCharged());
};
   
   this.equipment.isWearingItem(JEW.getEquipmentSlot(), jewFilter))

 

I use this instead which works now

this.equipment.isWearingItem(JEW.getEquipmentSlot(), new NameFilter<Item>(JEW.getAllCharged()))

I am not familiar with filter class now.

 

Edited by Pegasus

2 hours ago, Pegasus said:

thanks, I found out that it is caused  by a filter variable.


 public Filter<Item> jewFilter = (jew) -> {
       return jew.nameContains(this.getAllCharged());
};
   
   this.equipment.isWearingItem(JEW.getEquipmentSlot(), jewFilter))

 

I use this instead which works now


this.equipment.isWearingItem(JEW.getEquipmentSlot(), new NameFilter<Item>(JEW.getAllCharged()))

I am not familiar with filter class now.

 

My guess is that some of your equipment slots were empty, so the items in there were returning null. You were calling a method on a null object as a result, which gave you the NPE. Filter is very straightforward. If you're not familiar with lambda, I'd recommend looking up what it's shorthand for, and you'll likely understand filters better :) 

  • Author
1 hour ago, Team Cape said:

My guess is that some of your equipment slots were empty, so the items in there were returning null. You were calling a method on a null object as a result, which gave you the NPE. Filter is very straightforward. If you're not familiar with lambda, I'd recommend looking up what it's shorthand for, and you'll likely understand filters better :) 

Your guess is correct.

I didn't think about that the filter variable can be null.

It is troublesome that NPE printstacktrace doesn't print the method

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.