Skip to content
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

java.lang.NumberFormatException #4981

Open
Okuro3499 opened this issue Jan 9, 2025 · 0 comments · May be fixed by #4983
Open

java.lang.NumberFormatException #4981

Okuro3499 opened this issue Jan 9, 2025 · 0 comments · May be fixed by #4983
Assignees

Comments

@Okuro3499
Copy link
Collaborator

java.lang.NumberFormatException: empty String
	at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
	at jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
	at java.lang.Float.parseFloat(Float.java:487)
	at com.google.gson.JsonPrimitive.getAsFloat(JsonPrimitive.java:205)
	at org.ole.planet.myplanet.utilities.JsonUtils.getFloat(JsonUtils.kt:110)
	at org.ole.planet.myplanet.model.RealmMyHealthPojo$Companion.insert(RealmMyHealthPojo.kt:75)
	at org.ole.planet.myplanet.model.RealmMyHealthPojo.insert(Unknown Source:2)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.ole.planet.myplanet.service.TransactionSyncManager.callMethod(TransactionSyncManager.kt:222)
	at org.ole.planet.myplanet.service.TransactionSyncManager.continueInsert(TransactionSyncManager.kt:186)
	at org.ole.planet.myplanet.service.TransactionSyncManager.insertDocs$lambda$14(TransactionSyncManager.kt:171)
	at org.ole.planet.myplanet.service.TransactionSyncManager.$r8$lambda$-ZsMIzR4xVuGBBUi9T2EEUzJuII(Unknown Source:0)
	at org.ole.planet.myplanet.service.TransactionSyncManager$$ExternalSyntheticLambda0.execute(D8$$SyntheticClass:0)
	at io.realm.Realm$1.run(Realm.java:1745)
	at io.realm.internal.async.BgPriorityRunnable.run(BgPriorityRunnable.java:34)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)

pointing to each of these in the RealmMyHealthPojo

myHealth?.pulse = JsonUtils.getInt("pulse", act)
            myHealth?.height = JsonUtils.getFloat("height", act)
            myHealth?.setWeight(JsonUtils.getFloat("weight", act))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants