GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixed issue where file handler would sometimes return null for existing files; Optimized LIVELOAD file handler. by Katsute · Pull Request #118 · Ktt-Development/simplehttpserver

This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Conversation

@Katsute

@Katsute Katsute commented Nov 16, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Prerequisites

If all checks are not passed then the pull request will be closed.

  • My code follows the style listed in CONTRIBUTING.
  • I have checked that no other similar pull requests already exists.
  • Build compiles.
  • Build runs without exceptions.
  • I have added/modified documentation (if applicable).
  • I have added/modified test cases.

Changes Made

List changes made and/or relevant issues. Please keep changed in reverse chronological order (newest at top).

simplehttpserver/src/main/java/com/kttdevelopment/simplehttpserver/handler/DirectoryEntry.java

Lines 171 to 175 in ab1a8fd

if(entry == null){ // add new entry if not already added and file exists
final File file = getFile(path);
return file != null && file.exists()
? files.put(context, new FileEntry(file, adapter, loadingOption))
: null;

  • Fixed Folder that exists causes file handler to return null file. #117, The solution was already in the above comment, the bug was just a typo.
  • Optimized directory entry (fixed memory issue caused by saving files in liveload).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Katsute
Fix #117
ab1a8fd
@Katsute Katsute added the bug Something isn't working as expected label Nov 16, 2020
@Katsute Katsute self-assigned this Nov 16, 2020
@Katsute Katsute added this to the 4.2.0 milestone Nov 16, 2020
Katsute added 2 commits November 16, 2020 17:52
@Katsute
bump version
a97aa8a
@Katsute
Optimized directory entry
33f2ff9
Fixed files being added on liveload (this would cause memory issues over time).
@Katsute Katsute added the optimization Optimizations label Nov 16, 2020
@Katsute Katsute changed the title Fixed issue where file handler would sometimes return null for existing files. Fixed issue where file handler would sometimes return null for existing files; Optimized LIVELOAD file handler. Nov 16, 2020
@Katsute
Katsute merged commit e35aa59 into main Nov 17, 2020
@Katsute
Katsute deleted the fix#117@d15bc78 branch November 17, 2020 00:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Katsute Katsute

Labels

bug Something isn't working as expected optimization Optimizations

Projects

None yet

Milestone

4.2.0

Development

Successfully merging this pull request may close these issues.

Folder that exists causes file handler to return null file.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Katsute
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.