diff --git a/lib/repair/repairmimetypes.php b/lib/repair/repairmimetypes.php
index db11f526ad669312fd0ad7a3bb532e80b000d273..b9cd42f3136cdaef0d4353da8f78c365d5e9f7fc 100644
--- a/lib/repair/repairmimetypes.php
+++ b/lib/repair/repairmimetypes.php
@@ -250,6 +250,39 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep {
 		self::updateMimetypes($updatedMimetypes);
 	}
 
+	private function introduceJavaMimeType() {
+		$updatedMimetypes = array(
+			'class' => 'application/java',
+			'java' => 'text/x-java-source',
+		);
+
+		self::updateMimetypes($updatedMimetypes);
+	}
+
+	private function introduceHppMimeType() {
+		$updatedMimetypes = array(
+			'hpp' => 'text/x-h',
+		);
+
+		self::updateMimetypes($updatedMimetypes);
+	}
+
+	private function introduceRssMimeType() {
+		$updatedMimetypes = array(
+			'rss' => 'application/rss+xml',
+		);
+
+		self::updateMimetypes($updatedMimetypes);
+	}
+
+	private function introduceRtfMimeType() {
+		$updatedMimetypes = array(
+			'rtf' => 'text/rtf',
+		);
+
+		self::updateMimetypes($updatedMimetypes);
+	}
+
 	/**
 	 * Fix mime types
 	 */
@@ -294,5 +327,24 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep {
 				$this->emit('\OC\Repair', 'info', array('Fixed Yaml/Yml mime types'));
 			}
 		}
+
+		// Mimetype updates from #19272
+		if (version_compare($ocVersionFromBeforeUpdate, '8.2.0.8', '<')) {
+			if ($this->introduceJavaMimeType()) {
+				$this->emit('\OC\Repair', 'info', array('Fixed java/class mime types'));
+			}
+
+			if ($this->introduceHppMimeType()) {
+				$this->emit('\OC\Repair', 'info', array('Fixed hpp mime type'));
+			}
+
+			if ($this->introduceRssMimeType()) {
+				$this->emit('\OC\Repair', 'info', array('Fixed rss mime type'));
+			}
+
+			if ($this->introduceRtfMimeType()) {
+				$this->emit('\OC\Repair', 'info', array('Fixed rtf mime type'));
+			}
+		}
 	}
 }
diff --git a/tests/lib/repair/repairmimetypes.php b/tests/lib/repair/repairmimetypes.php
index 3c100b808cff8d58f765117d6051b0446067f4dc..0288a476ede621313fb24249d7fcf2958f23c855 100644
--- a/tests/lib/repair/repairmimetypes.php
+++ b/tests/lib/repair/repairmimetypes.php
@@ -282,6 +282,68 @@ class RepairMimeTypes extends \Test\TestCase {
 		$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
 	}
 
+	/**
+	 * Test renaming the java mime types
+	 */
+	public function testRenameJavaMimeType() {
+		$currentMimeTypes = [
+			['test.java', 'application/octet-stream'],
+			['test.class', 'application/octet-stream'],
+		];
+
+		$fixedMimeTypes = [
+			['test.java', 'text/x-java-source'],
+			['test.class', 'application/java'],
+		];
+
+		$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+	}
+
+	/**
+	 * Test renaming the hpp mime type
+	 */
+	public function testRenameHppMimeType() {
+		$currentMimeTypes = [
+			['test.hpp', 'application/octet-stream'],
+		];
+
+		$fixedMimeTypes = [
+			['test.hpp', 'text/x-h'],
+		];
+
+		$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+	}
+
+	/**
+	 * Test renaming the rss mime type
+	 */
+	public function testRenameRssMimeType() {
+		$currentMimeTypes = [
+			['test.rss', 'application/octet-stream'],
+		];
+
+		$fixedMimeTypes = [
+			['test.rss', 'application/rss+xml'],
+		];
+
+		$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+	}
+
+	/**
+	 * Test renaming the hpp mime type
+	 */
+	public function testRenameRtfMimeType() {
+		$currentMimeTypes = [
+			['test.rtf', 'application/octet-stream'],
+		];
+
+		$fixedMimeTypes = [
+			['test.rtf', 'text/rtf'],
+		];
+
+		$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+	}
+
 	/**
 	 * Test renaming and splitting old office mime types when
 	 * new ones already exist
@@ -399,6 +461,11 @@ class RepairMimeTypes extends \Test\TestCase {
 			['test.cnf', 'text/plain'],
 			['test.yaml', 'application/yaml'],
 			['test.yml', 'application/yaml'],
+			['test.java', 'text/x-java-source'],
+			['test.class', 'application/java'],
+			['test.hpp', 'text/x-h'],
+			['test.rss', 'application/rss+xml'],
+			['test.rtf', 'text/rtf'],
 		];
 
 		$fixedMimeTypes = [
@@ -438,6 +505,11 @@ class RepairMimeTypes extends \Test\TestCase {
 			['test.cnf', 'text/plain'],
 			['test.yaml', 'application/yaml'],
 			['test.yml', 'application/yaml'],
+			['test.java', 'text/x-java-source'],
+			['test.class', 'application/java'],
+			['test.hpp', 'text/x-h'],
+			['test.rss', 'application/rss+xml'],
+			['test.rtf', 'text/rtf'],
 		];
 
 		$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
diff --git a/version.php b/version.php
index 925e897d1ab34410619ab60df30753be78ca8a07..7ba6c3d93bcb847398a87460e1f69610758eb9bd 100644
--- a/version.php
+++ b/version.php
@@ -23,7 +23,7 @@
 // We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades
 // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
 // when updating major/minor version number.
-$OC_Version = array(8, 2, 0, 7);
+$OC_Version = array(8, 2, 0, 8);
 
 // The human readable string
 $OC_VersionString = '8.2 beta1';